'Code:Messaging/Incorrect-GCM-sender-id' error message in browser - google-cloud-messaging

In my web application i was taking GCM ids. Now to move to FCM, we added the code to get the token generated and also changed the sender id in manifest.
In our case, since we lost the old gmail id associated with our old GCM token, we are using a new account & new FCM key.
Getting the below error:
Unable to get permission to notify. Or {code:
"messaging/incorrect-gcm-sender-id", message: "Messaging: Please change
your web app manifest's '…e messaging.
(messaging/incorrect-gcm-sender-id).", stack: "FirebaseError: Messaging:
Please change your web
a…gstatic.com/firebasejs/5.9.3/firebase.js:1:29212)"} code:
"messaging/incorrect-gcm-sender-id" message: "Messaging: Please change
your web app manifest's 'gcm_sender_id' value to 'XXXXXXXXXXX' to use
Firebase messaging. (messaging/incorrect-gcm-sender-id)." stack:
"FirebaseError: Messaging: Please change your web app manifest

I think you'll need to unregister any current subscriptions and re- subscribe the user.

Related

Flutter Google Sign In Couchbase Authentication Code Flow

As we are migrating our app from Firebase to Couchbase, we also need to change the authentication part. We are using the google_sign_in package and would like to continue using it to have the native Google Sign In popup. Using the package we can get a serverAuthCode, which from my understanding we can then send to the _oidc_callback endpoint of Couchbase Sync Gateway. First I had to set disable_callback_state to true in the Sync Gateway configuration ("DisableCallbackState determines whether or not to maintain state between the /_oidc and /_oidc_callback endpoints."). However, when I now send the serverAuthCode to the _oidc_callback endpoint, I get the following error with status code 500:
body: {"error": "Internal Server Error", "reason": "Failed to exchange token: oauth2: cannot fetch token: 400 Bad Request\nResponse: {\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}"}
I assume it is because the login was done using the package and not through the browser with a redirect to the app afterwards. Now I have no idea how to do this correctly though, that I sign in with the google_sign_in package and then use the code to get the tokens from the Sync Gateway. I can't find any helpful information for this problem.
I would be very happy if someone could help me, possibly in a call. Maybe this way something like this can be solved faster.

Google GCM server returns Unauthorized Error 401 while subscribing

I get subscription success in app. But I see Google GCM server returns Unauthorized Error 401 in the server logs.
When I push a message from adapter, I get an authorization failure in server logs. But My adapter gives success response Notification sent to set user.
Can somebody tell me what could be the mistake I would be doing. (can this error also occur when my firewall is restricting this call.)
While subscribing i was getting Reason: 401 unable to authenticate with gcm services. something like this. And While pushing a notification from adapter i was getting reason : unable to authenticate for Api key "ASYI-" with GCM. the error messages may not be exact but the message means just like above
I am getting below error while sending notification
Failed to invoke Google GCM push service.
GCM Service invocation failed (reason: Authentication has failed for sender key starting with 'AIzaSyCk')
also getting below error
GCM push token 'ssdsddsdsdsds' is not added to GCM notification key. GCM Service invocation failed (reason: Returned HTTP/1.1 401 Unauthorized when invoking GCM push service to get the notification key.)
GCM Service invocation failed (reason: Returned HTTP/1.1 401 Unauthorized when invoking GCM push service to get the notification key.)
on the Android studio i see below error :
GCMAPIClient$BackgroundRegistrationHandler.run in GCMAPIClient.java:130 :: Failed to register with GCM using Google Play Services. Error:Error :INVALID_SENDER
Finally it worked for me, two things i did it to work.
Took the GCM.jar file from the sample project and placed it in my project . removed the other gcm dependencies
Created a project in FCM Console (https://console.firebase.google.com/)
and took the google-services.json and placed it in my android studio project under app. Took the web API key from FCM Console and placed it in the mobilefirst app project.(There are two keys now one for app and other for web).
I had to create a new project in the fcm console and new keys..

Push notification support in Twilio IOS sdk

I'm trying to get push notifications on an app that's using Twilio IP Messaging. After following the instructions on twilio guides.
The AppDelegate functions to register for remote notifications is working well - the iOS devices successfully provides the device token to the Twilio Client. However, the TwilioIPMessagingClient gives no indication of success or failure while registering the token.I have used delegates also for that Moreover, I don't get any sign of push notifications when messages get sent.
I have checked logs also where I can see the correct logs:
TNNotificationClient | Starting registration..., id: <....>
TNRegTransport | Creating registration: apn - <....>
TNRegTransport | Registration is created, location: https://ers.us1.twilio.com/v1/registrations/<...>
Where exactly I'm missing? One hint I got to know after much research that in server PHP app, I need to enable push on IPMesaging services client becuase its disabled by default. If yes, where exactly or in which .php file I have to enable it?
Reference:
https://www.twilio.com/docs/api/ip-messaging/guides/push-notification-configuration
Someone else recently solved this problem realizing that they had not set the New Message notification type to be explicitly enabled as follows from the PHP example:
// Update the service webhooks
$service = $client->services->get("YOUR_IP_MESSAGING_SERVICE_SID");
$response = $service->update(array(
"Notifications.NewMessage.Enabled" => "true",
"Notifications.NewMessage.Template" => "A New message in ${CHANNEL} from ${USER}: ${MESSAGE}",
));
?>
Would this solve it for you?

Box API token request enterprise configuration issue

I am making a call to https://api.box.com/oauth2/token to get a token for a user.
I get a 400 with the following error:
Cannot obtain token based on the enterprise configuration for your app
I don't see this error message defined anywhere. Any ideas what I'm doing wrong?
The issue here was that I was requesting a token for a non app user and my application was configured to allow access to app users only.

GCM - Google cloud messaging: Connection closed when ccs client logins

I created my Project Number, API key, registration ID and implemented a http server sucessfullly, but when implement css(xmpp) server, it doesn't work. I use the tutorial for java in http://developer.android.com/google/gcm/ccs.html
the console displays red alert:
INFO: Loading providers for file [classpath:META-INF/extension.providers]
SASL authentication PLAIN failed: text:
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:342)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:243)
at org.jivesoftware.smack.Connection.login(Connection.java:368)
at server.SmackCcsClient.connect(SmackCcsClient.java:334)
at server.SmackCcsClient.main(SmackCcsClient.java:344)
Apr 16, 2014 3:48:29 PM server.SmackCcsClient$2 connectionClosed
INFO: Connection closed.
line 334 is:
connection.login(username, password);
Does anyone know what is going wrong here? Thanks
I was getting the same Error when I tried to implement XMPP(CCS).So after going through so many site I found that to use up streaming feature of GCM (XMPP) you need to register for this service as a trail partner.
they are saying something like this
After you have created your GCM enabled project in the API Console you must fill out this form and become a trial partner to use upstream messaging and user notifications via CCS. Access is limited to those that fill out the form. You will receive an email from Google informing you that you now have access; Google will also send you the address of an echo server that you can use to bounce messages back to your application.
so visit this site and fill form
Upstream Google Cloud Messaging and User Notifications Sign-up
Update
Now up-streaming using GCM(CCS) is open for all developers !!!