Comments (5)
I hope you don't really expect me to go through hundreds of lines of unformatted stack traces just to take a guess what the problem might be :). Please at least format code blocks as described for example at https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks
from laravel-firebase.
In general: if you expect to get JSON but instead get HTML, there's probably a problem with the request you're making. Please show me the code (only the relevant parts, and formatted) that you wrote using the SDK that leads to the error.
from laravel-firebase.
sorry for that but the response status is OK
but response not json this first
second when i add to dadabase it worked perfectly but when do messaging return this error
message":"SenderId mismatch","code":403,"status_code":500
this my code
public function sendNotification($deviceToken)
{
$firebase = (new Factory)
->withServiceAccount(__DIR__.'/enjeiz-firebase-adminsdk-da7sz-a31e87e601.json')
->withDatabaseUri('https://enjeiz.firebaseio.com/');
$database = $firebase->createDatabase();
$createPost = $database
->getReference('dbnameEx')
->push([
'title' => 'some title',
'body' => 'som body text.'
]);
$resltsend = $createPost->getvalue(); //this worked
$messaging = $firebase->createMessaging();
$message = CloudMessage::withTarget('token', $deviceToken)
->withNotification(Notification::create('someTitle', 'bodyTxt'))
->withData(['firstKey' => 'firstValue']);
$resultMsg = $messaging->send($message);// this return message":"SenderId mismatch","code":403,"status_code":500
...
....
I dont use this library
i use the original
https://github.com/kreait/firebase-php
from laravel-firebase.
thanks for you time with me
the SenderId mismatch error was because the firebase update the keyserver and the devicesTokens was old
from laravel-firebase.
Uh, I have the feeling that I didn‘t really help much, next time I‘ll do better! Nonetheless I‘m glad you found the solution and shared it here, this will certainly be useful for others (and I‘ll try to keep it in mind the next time a similar problem occurs).
Thank you! 🌺
from laravel-firebase.
Related Issues (20)
- Callable functions
- SenderId mismatch HOT 7
- Laravel error HOT 2
- getting error HOT 1
- Incompatibility with Eloquent Resources? HOT 1
- Confirm email verification Support
- Its not supported php 8. Please fix this
- Push notifications are not getting displayed in IOS and Android randomly HOT 1
- Be able to override FirestoreClient::DEFAULT_DATABASE HOT 7
- Support PHP8.3 HOT 2
- Firestore insert or update problem when using laravel-octane HOT 3
- Auto discovery not working similar to v4.x HOT 6
- Cannot mock final class for phpunit tests as it's return type is other final class HOT 1
- Support symfony/cache version 7 HOT 3
- Make Support For Laravel 11 HOT 2
- Curl error on Laravel 11 HOT 9
- laravel publish issue HOT 1
- Unable to install kreait/laravel-firebase on Laravel 11 project HOT 1
- Binding Error with 5.9 HOT 2
- Log Channel Not Working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-firebase.