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:
[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.
This output gives a little more details
▿ PostgreSQL Error: No password is required
- 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 !! )