You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case payload is just a string, not a valid JSON.
The payload is a strings like "00012345|0006789".
The error is:
JSON.parse("00012345|0006789")
SyntaxError: UnexpectednumberatObject.parse(native)
at repl:1:7atREPLServer.self.eval(repl.js:110:21)atInterface.<anonymous>(repl.js:239:12)atInterface.emit(events.js:95:17)atInterface._onLine(readline.js:202:10)atInterface._line(readline.js:531:8)atInterface._ttyWrite(readline.js:760:14)atReadStream.onkeypress(readline.js:99:10)atReadStream.emit(events.js:98:17)
One solution is to add additional argument to channel.subscribe function, which will be indicating that there is no need to treat message payloads as JSON.
The text was updated successfully, but these errors were encountered:
There is assumption that message payload is JSON:
https://github.com/abhishiv/pusher-node-client/blob/master/lib/pusher-node-client.coffee#L117
Error I getting is:
In my case payload is just a string, not a valid JSON.
The payload is a strings like "00012345|0006789".
The error is:
One solution is to add additional argument to channel.subscribe function, which will be indicating that there is no need to treat message payloads as JSON.
The text was updated successfully, but these errors were encountered: