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
iOS 14 requestPermission failure if iOS product name has non-English characters #4093
Comments
What is Have you tried mitigating at all via use of react-native-permissions? |
|
I migrated all via use react-native-permissions. and so I have this error message. Error: Notifications are not allowed for this application but. iOS 13, 12 I do not have this error message shown. |
@xyzlast perhaps this is related to your project config? In Xcode and the in the entitlements for the app on the apple developer website you have to enable notifications |
No. This is not project config issue. I do not have error in iOS 12, 13. env: iPhone SE2 (I have one test phone.);; |
We haven't heard any other reports of this, and your Podfile looks suspect in the sense that it does not look like it's correctly upgraded to current react-native, at the same time I'm not sure how the notification package is supposed to integrate since it is out of this module. If you can reproduce the problem in a simple throwaway/reproduction app using just react-native-firebase and sending pushes with notification payload from the console fails, then we could try your repro app out and isolate any problem |
Same issue in my application. |
@YounghoonYun please open a fresh issue - this one had a lot of not-correct-looking things in the information provided, and we have new versions of the libraries out as well. If you can include a minimal reproduction App.js that would be best, and stack trace is needed for the crash |
Did you found the solution? I have same issue too even though I'm not using react native (pure Swift project) |
OK I solved this issue by changing product name in Xcode. Mine was written in Korean and that was the problem. Try change that field into English |
@joona0825 that is unexpected but great information thank you for circling back! original reporter is likely in non-ASCII character set as well. Is there any documentation in related libraries (firebase-ios-sdk or similar) that document restrictions in name character set? 🤔 |
@joona0825 Thank you very much! |
For anyone affected - I'm not sure where the documentation is for the APIs you are using (it seems like perhaps react-native-permissions? perhaps react-native-community/push-notifications-ios?) but GitHub makes it very easy to do a documentation PR if you just click the edit button at the top right of the file on github. Documenting that this is important might save future developers a lot of time! Closing this now as there doesn't appear to be anything we can do in this module |
@mikehardy I could not found any documentation. Only thing I guess is it's iOS side issue, not about both Firebase or react native. |
I can confirm that special characters in "Product Name" in iOS 14 cause this bug. Unfortunately this also happens to previously deployed apps built with Xcode 11.x. So this seems to be unrelated to |
@rwichmann that is great to hear confirmation but also terrible news that it exists as a problem. I can only recommend opening an issue with Apple (if one is not already open). Thank you very much for confirming (this is marked as "Resolution: Solution Provided" which is true but I understand the solution is ridiculous, it's just not in our control, sorry) |
My app Product name is English, but it can't receive notification on iOS 14 |
@trananhtuat there is a mildly related issue in #4299 that may have bearing on your case. It should be conclusively fixed if you can update to the most recent (just released) versions of the react-native-firebase packages. That should be possible unless you're using on-device machine language inference and can't adopt the ML package breaking changes yet |
solution:-
|
Issue
First. I have no error in iOS 12/13 now. but iOS 14 Beta4 push notification permission failed.
Exception thrown when 'await messaging().requestPermission();' is called.
when
requestPermission()
called,didFailtoRegisterForRemoteNotificationsWithError
received nil error.here is the code.
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:Firebase
module(s) you're using that has the issue:TypeScript
?React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: