Title: App crashing on device but ok on simulators · Issue #318 · fullstackreact/react-native-firestack · GitHub
Open Graph Title: App crashing on device but ok on simulators · Issue #318 · fullstackreact/react-native-firestack
X Title: App crashing on device but ok on simulators · Issue #318 · fullstackreact/react-native-firestack
Description: Really need someone's help to figure this one out. Our app has started crashing on device, but during dev all is good on sims. Narrowed it down to the listenForAuth method in XCode where the exception is being thrown - specifically it's ...
Open Graph Description: Really need someone's help to figure this one out. Our app has started crashing on device, but during dev all is good on sims. Narrowed it down to the listenForAuth method in XCode where the except...
X Description: Really need someone's help to figure this one out. Our app has started crashing on device, but during dev all is good on sims. Narrowed it down to the listenForAuth method in XCode where the ex...
Opengraph URL: https://github.com/fullstackreact/react-native-firestack/issues/318
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"App crashing on device but ok on simulators","articleBody":"Really need someone's help to figure this one out. Our app has started crashing on device, but during dev all is good on sims.\r\n\r\nNarrowed it down to the listenForAuth method in XCode where the exception is being thrown - specifically it's the \"userTokenError\" event. \r\n\r\nFirstly how should we be protecting against this crash scenario ? Im assuming we need to call reauthenticateWithCredentialForProvider() ? If yes, not sure where to put that call, in relation to the \"listenForAuth\" listener which we invoke on app startup (in an action).\r\n\r\nAppreciate anyone's help/guidance on this, thanks.\r\n\r\n\r\n```\r\nRCT_EXPORT_METHOD(listenForAuth)\r\n{\r\n self->listening = true;\r\n self->authListenerHandle =\r\n [[FIRAuth auth] addAuthStateDidChangeListener:^(FIRAuth *_Nonnull auth,\r\n FIRUser *_Nullable user) {\r\n\r\n if (user != nil) {\r\n // User is signed in.\r\n [self userPropsFromFIRUserWithToken:user\r\n andCallback:^(NSDictionary *userProps, NSError * error) {\r\n if (error != nil) {\r\n [self\r\n sendJSEvent:AUTH_CHANGED_EVENT\r\n props: @{\r\n **crashing here ====>** @\"eventName\": @\"userTokenError\",\r\n @\"authenticated\": @((BOOL)false),\r\n @\"errorMessage\": [error localizedFailureReason]\r\n }];\r\n } else {\r\n [self\r\n sendJSEvent:AUTH_CHANGED_EVENT\r\n props: @{\r\n @\"eventName\": @\"user\",\r\n @\"authenticated\": @((BOOL)true),\r\n @\"user\": userProps\r\n }];\r\n }\r\n }];\r\n\r\n```","author":{"url":"https://github.com/ajonno","@type":"Person","name":"ajonno"},"datePublished":"2017-03-23T22:20:25Z","url":"https://github.com/fullstackreact/react-native-firestack/issues/318"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:20da7dc9-9b45-8227-9500-8aeb1a23857d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A68A:2058EE:47AE6B:5E6D6D:6AFE6719 |
| html-safe-nonce | 072bb041329a55a42ab23895174684885a9d3530d0a2207e3cddfa0a77483271 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjhBOjIwNThFRTo0N0FFNkI6NUU2RDZEOjZBRkU2NzE5IiwidmlzaXRvcl9pZCI6IjczMTM5Njk1OTQ3ODIwODI4NDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c60e092ef9e63fa0980c41b9ce6d1205e9b3c098149fd836d71fd2faa10d6e79 |
| hovercard-subject-tag | issue:216589919 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/fullstackreact/react-native-firestack/318/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cb814cf0661e3d23e6545515b82b784b7330689e789e0eeec8fef4a9c82c7c65/fullstackreact/react-native-firestack/issues/318 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cb814cf0661e3d23e6545515b82b784b7330689e789e0eeec8fef4a9c82c7c65/fullstackreact/react-native-firestack/issues/318 |
| og:image:alt | Really need someone's help to figure this one out. Our app has started crashing on device, but during dev all is good on sims. Narrowed it down to the listenForAuth method in XCode where the except... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ajonno |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/fullstackreact/react-native-firestack git https://github.com/fullstackreact/react-native-firestack.git |
| octolytics-dimension-user_id | 16674738 |
| octolytics-dimension-user_login | fullstackreact |
| octolytics-dimension-repository_id | 60655868 |
| octolytics-dimension-repository_nwo | fullstackreact/react-native-firestack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 60655868 |
| octolytics-dimension-repository_network_root_nwo | fullstackreact/react-native-firestack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width