Closed hebbian closed 7 years ago
@hebbian Looks like it's a problem with your encoding. Can you post the code right before and right after the send call? Additionally can you inform your node version?
There is an undefined variable error for two variables anyFail
&& anySuccess
which are used in /lib/fcm line 78 - 86. We couldn't see the declaration in the code. Please share the updated version. code snippet you can find bellow,
`anyFail = ((JSON.parse(data)).failure > 0);
if (anyFail) {
error = data.substring(0).trim();
}
anySuccess = ((JSON.parse(data)).success > 0);
if (anySuccess) {
id = data.substring(0).trim();
}`
@haneefatel, these variables are implicitly declared. This isn't the best approach but cannot imply the error described in this issue.
It successfully send push notification but then it crash in buffer.js as follows :
I tried it on Mac OSX El Capitan if that helps. Thanks