Closed k0v4back closed 5 years ago
I don‘t know what role the parser plays here, and based on the Code and without a stack trace, I can’t determine the lines, but if the Firebase API returns „requested entity not found“, it means that the target device token is syntactically correct, but could not be found in the Firebase project‘s list of registered device tokens.
My device token was wrong, now all works brilliant. Thanks.
Glad it turned out to be „just“ that 😅, thanks for letting me know!
Hello, When I try to send push notifications, I get errors: Requested entity was not found But I try to catch error, I have: In Parser.php line 95: The JWT string must have two dots
It is my code: (https://pastebin.com/xeZ4tbP9) `public function sendPush(string $pushTitle, string $pushBody, User $user){ $serviceAccount = ServiceAccount::fromJsonFile($this->dir); $firebase = (new Factory()) ->withServiceAccount($serviceAccount) ->create(); if(null !== $user->getDeviceTokens()){ foreach ($user->getDeviceTokens() as $token){
I reshaped the token and the error was the same. The most interesting thing is that a few days ago this code worked, I did not change anything, but errors appeared.
What am I doing wrong?