-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to setup bundle, json is ignored #8
Comments
well, I updated the composer json, and it looks to be working now (both, the default option and locating the json). my bad But its not fully working yet and I would like to ask 2 more questions
2. About my code, I'm trying to do
but receiving error
Any idea about what could be the invalid argument or how to discover it? |
Your stack trace shows that the exception is thrown in I cannot confirm that the error is thrown - I tried reproducing this be deleting the database rules in the Firebase Web console, by deactivating the Database and by emptying my test database - with no success. I will try to make the errors more descriptive in a future release. In your case, the error is that only topics are supported in the condition field (see https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream-http-messages-json), that means you can't use You can check if you message is valid as described in https://firebase-php.readthedocs.io/en/latest/cloud-messaging.html#validating-messages with try {
$firebase->getMessaging()->validate($msg);
} catch (InvalidMessage $e) {
print_r($e->errors());
} In the Firebase PHP SDK, you can specify custom Guzzle Middlewares that can be used e.g. to debug HTTP Requests to the Firebase APIs - this is not yet implemented in the Bundle, but I will look to add this in one of the next releases. |
1. Which version of
kreait/firebase-php
andkreait/firebase-bundle
are you using?"kreait/firebase-bundle": "1.0"
kreait/firebase-php ^4.0
2. Which version of PHP are you using?
7.1.9
3. What's the issue? and 4. Code that lead to the issue
I setup the bundle as show in the readme
my config.yml is
The php I created more or less as done in the
app:fcm:send-message
example ( https://github.com/jeromegamez/firebase-php-examples )But despite having indicated the path to the json in the config.yml, I'm receiving this error
also, the doc, say that I could set default: true, but decommenting this line result in
The text was updated successfully, but these errors were encountered: