tmolitor-stud-tu / mod_push_appserver

Simple and extendable appserver for XMPP pushes (aka. XEP-0357)
MIT License
25 stars 9 forks source link

Errors starting #15

Closed anurodhp closed 5 years ago

anurodhp commented 5 years ago

using current master: Feb 15 01:08:28 general error Top-level error, please report: .../mod_push_appserver_apns/mod_push_appserver_apns.lua:261: attempt to index field '?' (a nil value) Feb 15 01:08:28 general error
stack traceback: .../mod_push_appserver_apns/mod_push_appserver_apns.lua:261: in function <.../mod_push_appserver_apns/mod_push_appserver_apns.lua:260> (tail call): ? (tail call): ? /usr/lib/prosody/util/timer.lua:51: in function '?' /usr/lib/prosody/net/server_select.lua:917: in function </usr/lib/prosody/net/server_select.lua:861> C: in function 'xpcall' /usr/bin/prosody:400: in function 'loop' /usr/bin/prosody:431: in main chunk

tmolitor-stud-tu commented 5 years ago

That's a weird error. Line 261 is correct, lines 262 and 263 should contain the error (wrong variable for id). I'll push a commit in a minute that solves this obvious id error, but I'm not sure if it solves this error, too. Maybe you changed something which renumbered the lines and caused this off by one error?!

anurodhp commented 5 years ago

no change, I used the code from git

tmolitor-stud-tu commented 5 years ago

I added debug output...could you give a debug log of the error? Everything logged for one push (apns frame, apns ID, apns ID in timer)

Am 16. Februar 2019 00:58:43 MEZ schrieb Anu Pokharel notifications@github.com:

no change, I used the code from git

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/tmolitor-stud-tu/mod_push_appserver/issues/15#issuecomment-464253741

anurodhp commented 5 years ago

still a problem Feb 17 12:05:54 general error Top-level error, please report: .../mod_push_appserver_apns/mod_push_appserver_apns.lua:262: attempt to index field '?' (a nil value) Feb 17 12:05:54 general error
stack traceback: .../mod_push_appserver_apns/mod_push_appserver_apns.lua:262: in function <.../mod_push_appserver_apns/mod_push_appserver_apns.lua:260> (tail call): ? (tail call): ? /usr/lib/prosody/util/timer.lua:51: in function '?' /usr/lib/prosody/net/server_select.lua:917: in function </usr/lib/prosody/net/server_select.lua:861> C: in function 'xpcall' /usr/bin/prosody:400: in function 'loop' /usr/bin/prosody:431: in main chunk

tmolitor-stud-tu commented 5 years ago

I need the debug log, without this I'm not able to debug this further, sorry.

anurodhp commented 5 years ago

hmm this is happening on the production server. it will be very hard to isolate one push. Do you mean turning on the mod push debug ?

tmolitor-stud-tu commented 5 years ago

No, not the mod_push_debug but prosody's debug logging in general. Or you promote all module:log() statements from "debug" to "error".

tmolitor-stud-tu commented 5 years ago

Problem is: I don't have an APNS certificate to test push for myself in a test environment :/

tmolitor-stud-tu commented 5 years ago

I managed to reproduce your error using a simple APNS backend emulator written in python.

I just pushed a new and cleaner implementation and tested it against the emulator. Everything should just work now :)