Chapter 6: PostgreSQL Error: No password is required

After getting the PushNotifications project working, I ran into an issue where Fluent was complaining about the trust level access to the apns db.


The error in the console looks like this:

:warning: [PostgreSQLError.trust: No password is required]

[WARNING] [Async] [QueueHandler] Read triggered when input queue was empty, ignoring: parameterStatus(application_name: ).


In order to get a fix on exactly what was happening, I set a breakpoint on line 36 of the main.swift file where the line states:

var config = Config.default()

I also had the debuger give me a more detailed view of what was inside the error by running the print object command in the output window of Xcode.

po error

This output gives a little more details

:warning: PostgreSQL Error: No password is required

  • id: PostgreSQLError.trust

    • identifier : “trust”
    • reason : “No password is required”

If anyone runs into this issue while working through the Vapor example Chapter 6, you might need to do as I did ( or maybe there is a better way to fix this ).


I found the following article on the Vapor GitHub repository that pointed me in the right direction.

My fix involves:

Making the password an optional value:
let password: String?

And, setting password to nil ( i.e. NOT including my password in the call )

Now this works, and I have been able to verify the functionality as directed in the book via RESTed ( I love that tool !! )

Sincerely,
John Tyler

1 Like

@synerjohnny Thank you for sharing your solution - much appreciated! :]

1 Like

Hi John,
It is exciting to hear that you got the project working. I guess in this case you should know where to download the project source code and to get the pusher to work. Being new, I would appreciate it if if you could point me to where I could get them or forward them to me.
Thank you.
Andrew

@andrewwpham74

The packages are included in the download package when you purchase the tutorial from RW store.

I hope this helps!