Expo sentry crashes on startup except the first time

Please provide the following:

  1. SDK Version: 40.0.0
  2. Platforms(Android/iOS/web/all): iOS

Herewith my package.json

  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest --watchAll"
  "dependencies": {
    "@expo/react-native-action-sheet": "^3.8.0",
    "@react-native-async-storage/async-storage": "^1.13.2",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/netinfo": "^5.9.7",
    "@react-native-community/segmented-control": "2.2.1",
    "@react-native-community/viewpager": "4.2.0",
    "@react-navigation/bottom-tabs": "^5.11.2",
    "@react-navigation/native": "^5.8.10",
    "@reduxjs/toolkit": "^1.5.0",
    "@sharcoux/slider": "^5.0.1",
    "axios": "^0.21.1",
    "buffer": "^6.0.3",
    "expo": "^40.0.0",
    "expo-auth-session": "~3.0.0",
    "expo-av": "~8.7.0",
    "expo-blur": "~8.2.2",
    "expo-constants": "~9.3.3",
    "expo-crypto": "~8.4.0",
    "expo-firebase-analytics": "~2.6.0",
    "expo-firebase-core": "~1.3.0",
    "expo-gl": "~9.2.0",
    "expo-haptics": "~8.4.0",
    "expo-image-picker": "~9.2.0",
    "expo-linear-gradient": "~8.4.0",
    "expo-linking": "~2.0.0",
    "expo-localization": "~9.1.0",
    "expo-random": "~10.0.0",
    "expo-secure-store": "~9.3.0",
    "expo-splash-screen": "~0.8.1",
    "expo-status-bar": "~1.0.3",
    "expo-store-review": "~2.3.0",
    "expo-video-thumbnails": "~4.4.0",
    "expo-web-browser": "~8.6.0",
    "gl-react": "^4.0.1",
    "gl-react-blurhash": "^1.0.0",
    "gl-react-expo": "^4.0.1",
    "i18next": "^19.8.4",
    "lodash": "^4.17.20",
    "pretty-bytes": "^5.5.0",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-i18next": "^11.8.5",
    "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz",
    "react-native-animated-spinkit": "^1.4.2",
    "react-native-expo-image-cache": "^4.1.0",
    "react-native-feather": "^1.0.2",
    "react-native-gesture-handler": "~1.8.0",
    "react-native-htmlview": "^0.16.0",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-reanimated": "2.0.0-rc.0",
    "react-native-safe-area-context": "3.1.9",
    "react-native-screens": "~2.15.0",
    "react-native-shimmer-placeholder": "^2.0.6",
    "react-native-svg": "12.1.0",
    "react-native-tab-view": "^2.15.2",
    "react-native-tab-view-viewpager-adapter": "^1.1.0",
    "react-native-toast-message": "^1.4.2",
    "react-navigation": "^4.4.3",
    "react-query": "^3.5.6",
    "react-redux": "^7.2.2",
    "react-timeago": "^5.2.0",
    "redux-persist": "^6.0.0",
    "redux-persist-expo-securestore": "^2.0.0",
    "sentry-expo": "^3.0.4",
    "tslib": "^2.0.3"
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "@babel/plugin-proposal-optional-chaining": "^7.12.1",
    "@babel/preset-typescript": "^7.12.7",
    "@expo/config": "^3.3.15",
    "@jest/types": "^26.6.2",
    "@react-navigation/stack": "^5.12.8",
    "@testing-library/jest-native": "^3.4.3",
    "@testing-library/react-hooks": "^3.7.0",
    "@testing-library/react-native": "^7.1.0",
    "@types/crypto-js": "^4.0.1",
    "@types/gl-react-expo": "^3.16.2",
    "@types/jest": "^26.0.19",
    "@types/lodash": "^4.14.164",
    "@types/react": "~16.9.35",
    "@types/react-dom": "~16.9.8",
    "@types/react-native": "~0.63.2",
    "@types/react-navigation": "^3.4.0",
    "@types/react-redux": "^7.1.12",
    "@types/react-test-renderer": "^17.0.0",
    "@types/react-timeago": "^4.1.2",
    "@welldone-software/why-did-you-render": "^6.0.4",
    "babel-plugin-module-resolver": "^4.1.0",
    "chalk": "^4.1.0",
    "dotenv": "^8.2.0",
    "jest": "^26.6.3",
    "jest-expo": "^40.0.1",
    "nock": "^13.0.5",
    "react-test-renderer": "^16.13.1",
    "typescript": "~4.1.3"
  "private": true

I tried the method mentioned here Critical Security - Upgrade @sentry/react-native to 1.3.9 · Issue #112 · expo/sentry-expo · GitHub but it doesn’t help.

This is the crash log

Application Specific Information:
*** Terminating app due to uncaught exception 'ExpoFatalError', reason: 'Expo encountered a fatal error: Unhandled JS Exception: s: Native Client is not available, can't start on native.'
terminating with uncaught exception of type NSException
abort() called
CoreSimulator 732.18.6 - Device: iPhone 12 Pro Max (912AFFFA-D54F-44BE-9D81-96AC23FD70C0) - Runtime: iOS 14.3 (18C61) - DeviceType: iPhone 12 Pro Max

It happens with both simulator and physical device.

Does this also happen in the Expo client app with expo start? Can you share a github repo with me that reproduces this?

After some playing around, I figure out what it could be. At least it seems fine now. I will play around for another day or two to see how it works out.

    environment: Constants.manifest.releaseChannel || 'expo', // <---
    dsn: Constants.manifest.extra.sentryDSN,
    enableInExpoDevelopment: false,
    debug: __DEV__

The highlighted line could be where the problem is, though I don’t know why. My plan was to properly tag environment in Sentry on top of existing Expo’s environment tag. I removed this line and so far it seems fine.

Hm… I don’t see how the environment tag would make a difference here. Did you happen to be calling Sentry.Native.init before?

Me neither, that’s it feels weird.

Nope, my code only had this single Sentry.init at the start of App file. That was it. I will give it a bit more test and see what happens.

Hi again, it is very weird behaviour. So I try a bit more, sometime crashes happens but somethings fine. Finally I remove completely Sentry.init and so far there is no crash anymore. I also keep only DSN within Sentry.init.

How can I debug more why this happens with physical device? Thanks!

providing a minimal example (as little code as possible, it’s best to start with expo init) that I can use to reproduce it would be really helpful!

I figure out now. It is because I am using Github Actions to publish, and somehow DSN is missing from the environment. But think missing DSN shall not result in app crash. :slight_smile: Closing this discussion now.

1 Like

Thanks for the information you shared. I am looking for the same info. Keep suggesting such content.

www.myaarpmedicare.com login

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.