Closed songoten28 closed 4 years ago
Update Confirm. The below version working fine on iOS
"react-native-firebase": "^5.6.0"
pod 'Firebase/Messaging', '~> 6.13.0'
pod 'Firebase/Core', '~> 6.13.0'
Now, Im using both version
"react-native-firebase": "^5.6.0" for ios
and
"@react-native-firebase/app": "^6.4.0",
"@react-native-firebase/messaging": "^6.4.0"````
for android
inconvenience much!
You shouldn't be mixing v5 & v6, this is going to cause a lot more problems than it's worth.
Can you provide the stack trace of the error message, it should show the stack trace on the left of Xcode when it crashes - can't really tell where this is coming from otherwise.
this is stack screen
2020-04-09 11:19:12.282818+0700 viettimes[2152:456044] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2020-04-09 11:19:12.634713+0700 viettimes[2152:456045] 6.13.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.
2020-04-09 11:19:12.732951+0700 viettimes[2152:456045] 6.13.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60106000 started
2020-04-09 11:19:12.733258+0700 viettimes[2152:456045] 6.13.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2020-04-09 11:19:12.859713+0700 viettimes[2152:456050] 6.13.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
2020-04-09 11:19:13.020 [info][tid:main][RCTRootView.m:293] Running application viettimes ({
initialProps = {
};
rootTag = 1;
})
2020-04-09 11:19:13.055978+0700 viettimes[2152:456053] [] nw_connection_get_connected_socket_block_invoke 5 Connection has no connected handler
2020-04-09 11:19:13.581240+0700 viettimes[2152:456043] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2020-04-09 11:19:13.581946+0700 viettimes[2152:456043] [MC] Reading from public effective user settings.
2020-04-09 11:19:16.415126+0700 viettimes[2152:456055] [] nw_connection_get_connected_socket_block_invoke 7 Connection has no connected handler
2020-04-09 11:19:16.743 [tid:com.facebook.react.AsyncLocalStorageQueue][RNCAsyncStorage.m:399] Manifest does not exist - creating a new one.
(null)
2020-04-09 11:19:16.810 [warn][tid:com.facebook.react.JavaScript] Require cycle: src/screens/AuthorSettingsScreen.js -> src/screens/ArticleScreen.js -> src/screens/AuthorSettingsScreen.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-04-09 11:19:16.963 [info][tid:com.facebook.react.JavaScript] Reactotron Configured
2020-04-09 11:19:16.965 [info][tid:com.facebook.react.JavaScript] Running "viettimes" with {"rootTag":1,"initialProps":{}}
2020-04-09 11:19:16.970914+0700 viettimes[2152:456047] [] nw_connection_get_connected_socket_block_invoke 8 Connection has no connected handler
2020-04-09 11:19:17.377 [warn][tid:com.facebook.react.JavaScript] { [TypeError: undefined is not an object (evaluating 'fetch("https://itunes.apple.com/" + countryCode + "lookup?bundleId=" + opt.packageName, opt.fetchOptions).then')]
line: 278565,
column: 155,
sourceURL: 'http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false' }
2020-04-09 11:19:17.420 [warn][tid:com.facebook.react.JavaScript] { [TypeError: undefined is not an object (evaluating '_await$providers$opti.version')]
line: 278716,
column: 45,
sourceURL: 'http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false' }
2020-04-09 11:19:17.505 [info][tid:main][RNGestureHandlerManager.m:136] [GESTURE HANDLER] Initialize gesture handler for root view <RCTRootContentView: 0x10181bf30; reactTag: 1; frame = (0 0; 414 736); gestureRecognizers = <NSArray: 0x170245c10>; layer = <CALayer: 0x17003dd00>>
2020-04-09 11:19:20.288 [warn][tid:com.facebook.react.JavaScript] Possible Unhandled Promise Rejection (id: 0):
TypeError: undefined is not an object (evaluating 'res.storeUrl')
checkUpdate$@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:96660:32
tryCatch@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:29295:23
invoke@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:29471:32
tryCatch@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:29295:23
invoke@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:29371:30
http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:29381:21
tryCallOne@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:3270:16
http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:3371:27
_callTimer@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:30625:17
_callImmediatesPass@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:30661:19
callImmediates@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:30880:33
callImmediates@[native code]
__callImmediates@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:2682:35
http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:2459:34
__guard@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:2665:15
flushedQueue@http://192.168.1.7:8081/index.bundle?platform=ios&dev=true&minify=false:2458:21
flushedQueue@[native code]
callFunctionReturnFlushedQueue@[native code]
2020-04-09 11:19:20.862 [info][tid:main][RCTRootView.m:293] Running application viettimes ({
initialProps = {
isHeadless = 0;
};
rootTag = 1;
})
2020-04-09 11:19:20.918 [info][tid:com.facebook.react.JavaScript] Running "viettimes" with {"rootTag":1,"initialProps":{"isHeadless":false}}
2020-04-09 11:19:35.938087+0700 viettimes[2152:456045] [react-native-permissions] ios.permission.NOTIFICATIONS permission checked: granted
2020-04-09 11:19:35.957 [info][tid:com.facebook.react.JavaScript] registerAppWithFCM
2020-04-09 11:19:36.623 [info][tid:com.facebook.react.JavaScript] subscribeTopic newsa
2020-04-09 11:19:52.217363+0700 viettimes[2152:455906] -[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0xb000000000000015
2020-04-09 11:19:52.217661+0700 viettimes[2152:455906] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0xb000000000000015'
*** First throw call stack:
(0x184592fe0 0x182ff4538 0x184599ef4 0x184596f54 0x184492d4c 0x100280290 0x10027c4fc 0x100146f00 0x100145180 0x18a958294 0x18a95c634 0x18a95ba90 0x18a9470ec 0x18a946d68 0x18ac81360 0x18610f22c 0x18613c884 0x18613c6f0 0x18613caa0 0x18454142c 0x184540d9c 0x18453e9a8 0x18446eda4 0x185ed9074 0x18a729c9c 0x10009f7c0 0x18347d59c)
libc++abi.dylib: terminating with uncaught exception of type NSException
Message from debugger: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
I not really good about Xcode much.
closed. This one make this work https://github.com/invertase/react-native-firebase/issues/3447#issuecomment-612564093
Issue
Android version is working fine iOS App crash after Splash screen when click on to notification ( from background and closed State) I have tried to downgrade to @react-native-firebase/app|messaging 6.4.0-rc4 version, it doesn't get this error but getInitialNotification () doesn't fire.
Temporary I will try to downgrade back to ver 5 for release Our app
Project Files
``
Click to expand
#N/A
Javascript
Click To Expand
#### `package.json`: ```json { "name": "viettimes", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "postinstall": "./script/fixlib/script.sh", "test": "jest", "lint": "eslint .", "clean": "npx react-native-clean-project" }, "dependencies": { "@dooboo-ui/native-switch-toggle": "^0.4.0", "@emotion/core": "^10.0.27", "@emotion/native": "^10.0.27", "@emotion/sheet": "^0.9.4", "@react-native-community/async-storage": "^1.7.1", "@react-native-community/masked-view": "^0.1.5", "@react-native-community/netinfo": "^5.3.3", "@react-native-community/slider": "^2.0.8", "@react-native-firebase/app": "^6.4.0", "@react-native-firebase/messaging": "^6.4.0", "@react-navigation/bottom-tabs": "^5.0.4", "@react-navigation/material-top-tabs": "^5.0.4", "@react-navigation/native": "^5.0.4", "@react-navigation/stack": "^5.0.4", "aspectratio": "^2.2.2", "axios": "^0.19.0", "axios-mock-adapter": "^1.17.0", "date-fns": "2.8.1", "emotion-server": "^10.0.27", "emotion-theming": "^10.0.27", "i18next": "^19.0.2", "lodash": "^4.17.15", "mobx": "^5.15.1", "mobx-persist": "^0.4.1", "mobx-react": "^6.1.4", "moment": "^2.24.0", "parse5": "^5.1.1", "polished": "^3.4.2", "react": "16.9.0", "react-avatar": "^3.9.0", "react-dom": "^16.12.0", "react-i18next": "^11.2.7", "react-icons": "^3.8.0", "react-native": "0.61.5", "react-native-af-video-player": "^0.2.1", "react-native-app-link": "^1.0.0", "react-native-auto-height-image": "^1.1.3", "react-native-cookie-store": "^3.4.1", "react-native-draggable-grid": "^1.1.1", "react-native-elements": "^1.2.7", "react-native-email": "^1.0.2", "react-native-gesture-handler": "^1.5.2", "react-native-htmlview": "^0.15.0", "react-native-image-zoom-viewer": "^2.2.27", "react-native-keyboard-spacer": "^0.4.1", "react-native-linear-gradient": "^2.5.6", "react-native-modal": "^11.5.3", "react-native-modalbox": "^2.0.0", "react-native-navigation-bar-color": "^1.0.0", "react-native-notifications": "^3.1.2", "react-native-permissions": "^2.0.9", "react-native-reanimated": "^1.4.0", "react-native-render-html": "^4.2.0", "react-native-root-toast": "^3.2.0", "react-native-safe-area-context": "^0.7.2", "react-native-screens": "^2.0.0-beta.2", "react-native-share": "^2.0.0", "react-native-slider": "^0.11.0", "react-native-splash-screen": "^3.2.0", "react-native-svg": "^9.13.6", "react-native-svg-transformer": "^0.14.3", "react-native-swipeout": "^2.3.6", "react-native-tab-view": "^2.11.0", "react-native-vector-icons": "^6.6.0", "react-native-version-check": "^3.4.0", "react-native-video": "^5.0.2", "react-native-webview": "^8.0.6", "react-navigation-transitions": "^1.0.12", "react-use": "^13.14.0", "rn-placeholder": "^3.0.0", "string-strip-html": "^4.3.17", "styled-components": "^4.4.1", "swr": "0.1.14", "util": "^0.12.1", "walk-parse5": "^2.0.0" }, "devDependencies": { "@babel/core": "^7.7.7", "@babel/plugin-proposal-class-properties": "^7.7.4", "@babel/plugin-proposal-decorators": "^7.7.4", "@babel/runtime": "^7.7.7", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.9.0", "eslint": "^6.8.0", "googleapis": "^48.0.0", "husky": "^4.2.1", "jest": "^24.9.0", "metro-react-native-babel-preset": "^0.57.0", "pretty-quick": "^2.0.1", "react-test-renderer": "16.9.0", "reactotron-react-native": "^4.0.3" }, "jest": { "preset": "react-native" }, "husky": { "hooks": { "pre-commit": "pretty-quick --staged" } } } ``` #### `firebase.json` for react-native-firebase v6: ```json # N/A ```
iOS
Click to expand
2020-04-08 10:56:11.622664+0700 viettimes[743:144382] [] nw_socket_get_input_frames recvmsg(fd 4, 1024 bytes): [57] Socket is not connected 2020-04-08 10:56:11.623715+0700 viettimes[743:144382] [] nw_socket_get_input_frames recvmsg(fd 12, 1024 bytes): [57] Socket is not connected 2020-04-08 10:56:11.626 [info][tid:com.facebook.react.WebSocketExecutor][RCTInspectorPackagerConnection.m:309] Error occurred, shutting down websocket connection: Websocket exception Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={_kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1} 2020-04-08 10:56:11.626759+0700 viettimes[743:145124] [] nw_endpoint_handler_add_write_request [13.1 74.125.24.95:443 failed socket-flow (satisfied)] cannot accept write requests 2020-04-08 10:56:11.631865+0700 viettimes[743:143054] [] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument 2020-04-08 10:56:11.731280+0700 viettimes[743:142670] -[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0xb000000000000015 2020-04-08 10:56:11.734428+0700 viettimes[743:142670] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0xb000000000000015' *** First throw call stack: (0x184592fe0 0x182ff4538 0x184599ef4 0x184596f54 0x184492d4c 0x100280290 0x10027c4fc 0x100146f00 0x100145180 0x18a958294 0x18a95c634 0x18a95ba90 0x18a9470ec 0x18a946d68 0x18ac81360 0x18610f22c 0x18613c884 0x18613c6f0 0x18613caa0 0x18454142c 0x184540d9c 0x18453e9a8 0x18446eda4 0x185ed9074 0x18a729c9c 0x10009f7c0 0x18347d59c) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
ios/Podfile
:AppDelegate.m
:react-native info
output:react-native-firebase
version you're using that has this issue:6.4.0
Firebase
module(s) you're using that has the issue:@react-native-firebase/messaging
TypeScript
?N
React Native Firebase
andInvertase
on Twitter for updates on the library.