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.
po error
This output gives a little more details
▿ 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 !! )
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