-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Could not connect to GCM: The operation couldn’t be completed. (com.google.gcm error 501.) #205
Comments
similar problem, wanna know its status and how to solve. |
@earlyfai : Its better to keep on eye on this issue. I don't have any input for now.... |
Hey guys, we are also having this problem. Any fixes here? |
@urjitbhatia : Can you follow all comments related to this issue. In my case it was three major changes:
See those steps if it helps. |
@alexszilagyi still stuck with the same problem. We get the 501s for a bit I think and then eventually it succeeds registering with gcm. |
@alexszilagyi @urjitbhatia i have created new certificates still am getting the same error is there any fix for this |
501 means that the app is missing an id that GCM needs requires. The error code 7 is a known problem which occurs because of replication delay on our backend. If you guys are facing issues with this I would suggest moving to the new Firebase Cloud Messaging libraries. We don't expose these errors in the new library and we all the auto-retry and fetch stuff is in it so you wouldn't have to worry about these errors. Also for the 501 problem does it happen all the time or on first install etc e.g. error code 7 should only happen on first install. |
@iamakashrao We found the fix - if you enable detailed debug logging you will probably see a message saying something about using the instance id too soon. Once you make the call to the IID api you have wait for a bit before starting to use it to register with GCM. We put in a retry loop with some delay upfront and the problem was gone. |
will try that thanks @urjitbhatia - can you please share some code snippets |
I have downloaded the iOS example and tested Swift & Objective-C but none of them prove to work from the first run;
I am getting the following error message: Error registering with the GCM (The operation couldn't be completed. (com.google.iid. error 7.), based on documentation means Unknown error. Any clue?
.
Swift app log output:
and Objective-C example log output:
Mentions:
registrationOptions = [kGGLInstanceIDRegisterAPNSOption:deviceToken, kGGLInstanceIDAPNSServerTypeSandboxOption:true]
is set to developmentThe text was updated successfully, but these errors were encountered: