Open brunolemos opened 6 years ago
Hi @brunolemos ,
Can you show us the exact error message? And could you maybe show us the lines around the sendNoRetry
call?
Have you defined message
as a const
? Or anything else?
Inside node-gcm
we don't use const
anywhere, so I'm trying to determine where this comes from.
Thanks for taking the time to report this :-)
Best, Niels
Also, apparently this error can happen when assigning something to a name used by a function (see https://github.com/babel/babel/issues/4166). Could this be the case anywhere in your code?
Closing due to lack of response. Feel free to reopen if you are still experiencing this.
The code was doing this two times: sender.sendNoRetry
and newSender.sendNoRetry
, using 2 different api keys (I think one was invalid/expired?). This is probably what was causing the issue, I removed the one with old api key and seems fine now.
That seems a bit odd imo! Were they two separate senders? Their state shouldn't be constant afaik.
I would love to see a stack trace on this, or the code as it was when the error occurred :smile:
(So we can figure out exactly what went wrong and get it fixed!)
Happening when using
x.sendNoRetry(message, { registrationTokens: [regToken] }, function (err, response) {
node-gcm v0.14.0 node v7.10.1