expo: Expo Go on Android "Something went wrong

Summary

myApp is built in the masOS Monterey V 12.6.3 os and I’m using VSCode. I was able to run my dev tests in ios and web simulators, and the Expo go android app simulator loaded on my android phone, all from the terminal command npx expo start. Suddenly my Expo Go android stopped working, so I found that I can run expo start --tunnel as a work around to get Expo Go and ios simulators running but now this does not work with web.

Does anyone know what has happed with the npx expo start terminal command effecting the Expo Go app for android?

package.json

{
  "name": "myApp",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/webpack-config": "^0.17.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/checkbox": "^0.5.14",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.0",
    "expo": "^46.0.14",
    "expo-application": "^4.2.2",
    "expo-auth-session": "~3.7.4",
    "expo-camera": "~12.5.0",
    "expo-image-manipulator": "~10.4.0",
    "expo-image-picker": "~13.3.1",
    "expo-linear-gradient": "~11.4.0",
    "expo-random": "~12.3.0",
    "expo-status-bar": "~1.4.0",
    "expo-updates": "~0.14.7",
    "expo-web-browser": "~11.0.0",
    "firebase": "^9.10.0",
    "nativewind": "^2.0.11",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.6",
    "react-native-deck-swiper": "^2.0.12",
    "react-native-dotenv": "^3.4.7",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-web": "~0.18.7",
    "yarn": "^1.22.19"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "tailwindcss": "^3.2.1"
  },
  "private": true,
  "packageManager": "yarn@1.22.1"
}

What platform(s) does this occur on?

Android

Environment

expo-env-info 1.0.5 environment info: System: OS: macOS 12.6.3 Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node Yarn: 1.22.19 - ~/Documents/Derek/WebProjects/React_Native/iluvluv/node_modules/.bin/yarn npm: 9.4.2 - ~/.nvm/versions/node/v16.17.0/bin/npm SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 IDEs: Xcode: 14.2/14C18 - /usr/bin/xcodebuild npmPackages: @expo/webpack-config: ^0.17.0 => 0.17.4 expo: ^46.0.14 => 46.0.20 react: 18.0.0 => 18.0.0 react-dom: 18.0.0 => 18.0.0 react-native: 0.69.6 => 0.69.6 react-native-web: ~0.18.7 => 0.18.10 npmGlobalPackages: eas-cli: 2.3.0 expo-cli: 6.3.0 Expo Workflow: managed

Minimal reproducible example

npx expo start in VSCode terminal causes this error in Expo Go Android App but not ios simulator or web. Screenshot_20230213-151749 Screenshot_20230213-182954

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 26

Most upvoted comments

i changed the start script from expo start to expo start --tunnel (since global expo cli is now deprecated) & it worked perfectly for both android & web !

  "scripts": {
    ...
    "start": "expo start --tunnel",
    ...
  },

image

any updates?

For others who find this error.

  1. your connection should be the same on your phone and on your PC.
  2. Internet connection your PC is connected to should have the firewall disabled.
  3. If still a problem you see something like exp:127… You can change your lan address and you can see it using expo start --lan. And use this command to change your URL set REACT_NATIVE_PACKAGER_HOSTNAME=192.168.0.200 <- your ip address

powershell command: $Env:REACT_NATIVE_PACKAGER_HOSTNAME=“192.168.0.200”

i changed the start script from expo start to expo start --tunnel (since global expo cli is now deprecated) & it worked perfectly for both android & web !

  "scripts": {
    ...
    "start": "expo start --tunnel",
    ...
  },

image

This Works for me. Thnaks

any updates?

For others who find this error.

1. your connection should be the same on your phone and on your PC.

2. Internet connection your PC is connected to should have the firewall disabled.

3. If still a problem you see something like exp:127..... You can change your lan address and you can see it using expo start --lan. And use this command to change your URL set REACT_NATIVE_PACKAGER_HOSTNAME=192.168.0.200 <- your ip address

powershell command: $Env:REACT_NATIVE_PACKAGER_HOSTNAME=“192.168.0.200”

For those working on WSL this solution from @rimmelasghar works just instead.

  1. Go inside your WSL react-native or expo app
  2. add this command in your bash export REACT_NATIVE_PACKAGER_HOSTNAME="local ip address"

And this works like charm.

Just a question, how do we get access to the React native Environment variables reference?.

using the tunnel argument worked for me ! npx expo start --tunnel

This works for me .

  • Uninstall the expo-cli :
npm rm -g expo cli
  • Again install the expo cli :
npm  install -g expo-cli
  • Install the latest version of nodejs from the offical nodejs website.

  • Create the Application :

npx create-expo-app  my-app

Now start the development server

npx expo start --tunnel

then stop the server again start the server with LAN connection

npx expo start

This works for me. I hope it will works for you as well .

Thank you.

@vk-develops I’m currently using skd 47 using node -v 18, I run: npx expo start and it works for ios and android. In a second terminal I switch to node -v 16 with nvm (Node Version Manager), and run: GENERATE_SOURCEMAP=false npx expo start --web This works for me. Good Luck!

PS: use NVM, (Node Version Manager) to have multiple terminals running different versions of Node at the same time.