New installation issues - randomly register or not
See original GitHub issueHi, I’m using your lib to get notification, I’m getting them by using Firebase but I have problem sometimes - randomly I have problem with registration of device on brand new installation (for example by removing app and reinstall it again) on devices
I did get
Sending `FCMTokenRefreshed` with no listeners registered.
In my xcode logs and I can’t get notification
I did put
this.refreshTokenListener = FCM.on(FCMEvent.RefreshToken, (token) => {
console.log('token received', token);
Alert.alert('Alert', token);
});
inside index.ios.js before AppRegistry.registerComponent('MyApp', () => app);
but when this error comes I was not able to get notifications
my Podfile:
platform :ios, '9.0'
target 'App' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for App
pod 'Firebase/Messaging'
pod 'GoogleMaps'
inherit! :search_paths
end
I did check 9.5.0, 9.4.0 and 9.3.0 and it occurs randomly on all versions using react-native 0.46.4
I have
[FIRApp configure];
[[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
Inside AddDelegate inside - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
before return YES
full logs from xcode:
2017-09-26 17:16:03.579 [info][tid:main][RCTCxxBridge.mm:186] Initializing <RCTCxxBridge: 0x16e2a660> (parent: <RCTBridge: 0x16e45390>, executor: (null))
2017-09-26 17:16:03.667 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-09-26 17:16:03.754 [info][tid:main][RCTRootView.m:302] Running application App ({
initialProps = {
};
rootTag = 1;
})
2017-09-26 17:16:06.461 [warn][tid:com.facebook.react.JavaScript] Warning: PropTypes has been moved to a separate package. Accessing React.PropTypes is no longer supported and will be removed completely in React 16. Use the prop-types package on npm instead. (https://fb.me/migrating-from-react-proptypes)
2017-09-26 17:16:06.833 [warn][tid:com.facebook.react.JavaScript] Warning: React.createClass is no longer supported. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement. (https://fb.me/migrating-from-react-create-class)
2017-09-26 17:16:07.488 [warn][tid:main][RCTEventEmitter.m:54] Sending `FCMTokenRefreshed` with no listeners registered.
2017-09-26 17:16:07.690 [warn][tid:com.facebook.react.JavaScript] Warning: Invalid argument supplied to oneOfType, expected an instance of array.
2017-09-26 17:16:07.736 [warn][tid:com.facebook.react.JavaScript] Warning: View.propTypes has been deprecated and will be removed in a future version of ReactNative. Use ViewPropTypes instead.
2017-09-26 17:16:07.795 [info][tid:com.facebook.react.JavaScript] register listener
2017-09-26 17:16:07.806 [info][tid:com.facebook.react.JavaScript] Running application "App" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
Issue Analytics
- State:
- Created 6 years ago
- Comments:54 (23 by maintainers)
Top Results From Across the Web
Windows Installer keeps popping up or starting, Preparing to ...
8] Run Program Install and Uninstall Troubleshooter · Problems that prevent new programs from being installed, uninstalled or updated · Corrupted ...
Read more >Troubleshooting Windows device enrollment errors in Intune
Suggestions for troubleshooting some of the most common error messages when you enroll Windows devices in Microsoft Intune.
Read more >Troubleshoot installation issues - Google Workspace Admin ...
Installations usually are unsuccessful because the version of Microsoft Windows or Outlook doesn't meet the system requirements. Review the system requirements, ...
Read more >Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >How to Fix Registry Errors in Windows 10 - Help Desk Geek
If your registry is corrupted, the computer may not restart. This usually happens when the computer is shut down, and you can't track...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@suhabaobaid it might happen when you start the app because the token refreshed before react is ready. but when you call getFCMToken again in javascript it should return the new token
Thanks for your link. looks like Firebase has already fixed the bug in coming release. For now we should lock version to 2.0.0 as you did