-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
(FIXED) "[messaging/unknown] The operation couldn’t be completed". #2657
Comments
I am also getting this error on RN 0.61.1 when I call |
For iOS, add the following in Info.plist: |
cc @Salakar |
Does this only happen on RN61? Is it fine on 60? |
I just rolled back to a previous release branch for my app which had RN60.5 and I still get this error. cjishnu solution did not work me. Is there maybe some logic missing that we have to do now before calling this function? I have read the docs but can't see anything obvious. I managed to get a workaround for now. Since I am on iOS >= 12
So I use the |
I tried this workaround but got no lucky :( still got no token but error 1001 |
I can confirm this is a temporary workaround for now. |
Does not work for me - |
@AdamGold have you added the required methods to your AppDelegate.m file?
These methods can be found on the README on the repo. |
@dwyery Yes, I have. |
react-native-permissions is also pretty good...anyone tried that? |
Yes, I can confirm that using |
I'm doing the following with
I'm getting the error the first time I run this code although the notification prompt is popping up and I'm confirming it. The second time (after reload) it's working. |
I'm still getting an error after calling |
I think what worked for me was using |
@oskaryil Were you able to get the token in the simulator ? This produces error when trying to get the token:
It was working fine getting the token in simulator before upgrading firebase. |
Using Xcode11 I was able to get it somewhat working on the device ( ios 13.1.2 ). When i use requestNotifications and get the permissions, first time the getToken is called i get the error
second time i click the button ( call the function to getToken ) it works and i get the token. Thats of course not ideal solution in any case, but at least it is somewhat working on the device. Any idea why it has to be triggered twice ? Edit:
Edit: Edit: |
Actually I'm not sure whether I tested on a simulator (Xcode 11 / iOS 13) or my physical device 4 days ago (see my comment). However it looks like the error is not popping up on my iPhone 6 with iOS 12.4.2. My code is:
|
@leuchtdiode Yeah, i am pretty sure based on all the testing i did that its related to iOS 13 rather than to RNFirebase V6 or RN 0.61. It seems to be working fine on older iOS versions with both firebase.messaging().getToken() and React-Native-Permissions. Could work on V5 and iOS 13 tho, i did not test that. |
We're trying to investigate a bit in relation to this and ios 13: |
That last comment is fascinating - could be unexpected behavior needing underlying SDK docs and maybe a mention in docs here - seems like it would affect v5 and v6 if you have default data collection disabled firebase/firebase-ios-sdk#4011 (comment) |
and (linked off from there) possibly of interest https://onesignal.com/blog/ios-13-introduces-4-breaking-changes-to-notifications/ |
Well for what it's worth we didn't actively set any value in the info.plist (we don't have that field) so not sure if the default is off? Going to try a few combinations Edit: still getting the error in ios 13 with FirebaseDataCollectionDefaultEnabled: YES in info.plist Edit 2: As others said, second time loading it works. Very strange |
@Salakar thanks for the update. Will there be a patch fix for v5 as well? I am currently on v5 and unable to upgrade currently. |
There is no way to backport all the fixes for messaging that went in to v6 to v5, they were massive and v5 has been on life support only for months and months. I understand (as a v5 user currently) that the prospect of upgrading something so fundamental is daunting, but it's about time. Notifee has iOS support in testing now (developed in conjunction with those fixes) and there are other libraries as well |
Just updated to
Coming from |
Hello, I use the following to retrieve a token (same statement as with v5.x): When trying to send a remote message from Firebase, it gives me this error: Any ideas? Do I have to set a scope or authorizedEntity? |
did you do |
Yes. In my case it is used for data messages only in a (weak) 2Factor Auth Scenario:
Requesting permissions shouldn't even be necessary for my use case. All the above functions work. But the serverside complains when trying to send a message and no message handler gets fired. That's why I'm wondering if in v5 a different default scope or authorizedEntity was used. |
By As far as I understand you should call the Regarding the message handler - share the code that is not working for you. What I do usually when testing is getting apns token and try to send push witha different service - you can easily find a tool or python script that would do that. Then you can rule out at least push notification setup on iOS part. |
Exactly, it's a silent push. The message handle part should not be concerned as the error happens on the server side.
|
Did you try to send push notification without firebase? If error is on server side are you sure you should be looking here for resolution? How do you send the push? Via firebase cloud messaging platform directly or API? |
Well, it's working with v5.x and it stops working when trying to upgrade to v6.4. For sure the error could be in my implementation, but so far I could not find a working solution. Thanks a lot for your help, I'll get back if I get more insights |
This comment has been minimized.
This comment has been minimized.
Same for me on server - Auth error from APNS or Web Push Service |
I am running on v 6.7.1 and I also get the:
As soon as I try to get the token on Android. |
Same issue on "@react-native-firebase/app": "^7.1.4", "@react-native-firebase/messaging": "^7.1.3", "react-native": "0.62.2". Any solution to fix it? |
Check your internet connection. May be little help |
I am running on v 7.2.0 for app and v 7.1.4 for messaging and I also get the: Error: [messaging/unknown] SERVICE_NOT_AVAILABLE As soon as I try to get the token on Android. |
I am still having this issue in iOS. Please help if there is any escape? |
I downgrade for app v 6.7.1 and messaging v 6.7.1 and work |
@RaulCorreia I am already using 6.7.1 and it was working fine by last week but today when I ran again. It alerts me same error. |
What I did was, generate another google-services.json in the firebase panel and use version 6.7.1 and it worked again. |
@RaulCorreia I am having the same issue with the latest version of @react-native-firebase/app and @react-native-firebase/messaging. When I try to get device token with messaging.getToken(), it returns this error: Has anyone solved a similar problem recently? @luvnish19 how did you solve the problem on your end? |
@BoluwajiDavids |
Thank you @luvnish19 |
thanks alot it worked for me. changed only google services.json file |
"react-native": "0.61.5",
Facing this issue: |
The same issue +1 |
EDIT (by @Salakar): This is fixed since the 6.4.0 release.
Issue
Cloud messaging gives an error when using
messaging().getToken
after upgrading to V6 and RN 0.61:iOS
Click To Expand
ios/Podfile
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:6.0.0
Firebase
module(s) you're using that has the issue:Cloud messaging
TypeScript
?N
The text was updated successfully, but these errors were encountered: