Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo Go on Android "Something went wrong #21198

Closed
totallytotallyamazing opened this issue Feb 13, 2023 · 26 comments
Closed

Expo Go on Android "Something went wrong #21198

totallytotallyamazing opened this issue Feb 13, 2023 · 26 comments
Labels
invalid issue: question Issues on this repository are reserved for bug reports needs validation Issue needs to be validated

Comments

@totallytotallyamazing
Copy link

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

@totallytotallyamazing totallytotallyamazing added the needs validation Issue needs to be validated label Feb 13, 2023
@brentvatne brentvatne added the invalid issue: question Issues on this repository are reserved for bug reports label Feb 14, 2023
@expo-bot
Copy link
Collaborator

Hello! Our GitHub issues are reserved for bug reports.

If you have a question about Expo or related tools, please post on our forums at https://forums.expo.dev/ or join our Discord at https://chat.expo.dev/.

Resources

@matek075
Copy link

any updates?

1 similar comment
@ShivaBollam07
Copy link

ShivaBollam07 commented Mar 28, 2023

any updates?

@rimmelasghar
Copy link

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"

@vk-develops
Copy link

I'm also getting similar kind of error as "something went wrong. sorry about that you can go back to expo home or try to reload the project" please anyone help me resolve this error.

@totallytotallyamazing
Copy link
Author

totallytotallyamazing commented Sep 29, 2023

@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.

@rimmelasghar
Copy link

Any updates on this Issue?

@vk-develops
Copy link

No, I am still encountering the same problem as "something went wrong. sorry about that you can go back to expo home or try to reload the project". And I have recently figured out that my network IP address is different from the expo metro bundler IP address.

Example my IP: 10.10.10.18 Expo: Metro waiting on exp://192.168.1.13:19000.

So does anyone know how to resolve this issue. And I have connected my mobile phone and laptop to the same network connection.

Someone please help me resolve this problem.

@rimmelasghar
Copy link

Have you tried my solution?

@totallytotallyamazing
Copy link
Author

No, I am still encountering the same problem as "something went wrong. sorry about that you can go back to expo home or try to reload the project". And I have recently figured out that my network IP address is different from the expo metro bundler IP address.

Example my IP: 10.10.10.18 Expo: Metro waiting on exp://192.168.1.13:19000.

So does anyone know how to resolve this issue. And I have connected my mobile phone and laptop to the same network connection.

Someone please help me resolve this problem.

please check out my edit above. I missed a mistake in my directions, I'm using "skd 47" Not "skd 48", sorry about that!

@asrvd
Copy link

asrvd commented Nov 29, 2023

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

@vk-develops
Copy link

I have created a new folder and initialized a new expo project using the command npx create-expo-app my-app. Then I changes my directory using the command cd my-app, Then I used the command npx expo start to run that expo project. After running the project I got the QR code and expo metro bundler waiting port address.
expo out

Then after scanning the QR code using the expo go app on my mobile I got an error saying "something went wrong. sorry about that you can go back to expo home or try to reload the project". Also I have connected my mobile and my pc with the same Wi-Fi connection. And I have figured out that the expo metro bundler waiting port address is different to the IP address of my Wi-Fi connection.

**Example:
Expo: Metro waiting on exp://192.168.1.13:8081.
My IP address: 127.0.0.1

It should be as Expo: Metro waiting on exp://127.0.0.1:8081.**

Also I did the same process on creating a expo project on my friend's laptop, And it worked fine as the both IP's are same as
Expo: Expo: Metro waiting on exp://127.0.0.1:8081.
My friend's lap IP address: 127.0.0.1

Also when I run the project using the command npx expo start --tunnel it works fine and by using tunneling it makes the app to run very slow.

Someone please help me resolve this problem please.
Expo error

@Owhab
Copy link

Owhab commented Dec 27, 2023

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

@vk-develops
Copy link

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

Thank you! it works but using the tunneling makes the app loading speed very slow. Is there any other way to make it work as default??

@Chamesss
Copy link

I encountered this kind of issue and for me, switching to airplane mode then reconnecting solved the problem. I honestly still don't have any explanation to it, maybe some kind of misconfiguration or firewall related issue, anyways I hope this helps.

@niranjandasMM
Copy link

Try running with tunnel argument :
expo start --tunnel

@vk-develops
Copy link

I encountered this kind of issue and for me, switching to airplane mode then reconnecting solved the problem. I honestly still don't have any explanation to it, maybe some kind of misconfiguration or firewall related issue, anyways I hope this helps.

I have also tried this solution but it doesn't work. But anyways using the tunnel flag makes it work. But using tunneling makes the app loading speed very slow.

@ndigirigijohn
Copy link

ndigirigijohn commented Feb 12, 2024

Manually setting the environmental variable export REACT_NATIVE_PACKAGER_HOSTNAME="192.168.100.138" <- your ip address on the dotenv file and refreshing my phone's network(Flight mode and back as suggested above) worked.

@subham2sahoo
Copy link

I have created a new folder and initialized a new expo project using the command npx create-expo-app my-app. Then I changes my directory using the command cd my-app, Then I used the command npx expo start to run that expo project. After running the project I got the QR code and expo metro bundler waiting port address. expo out

Then after scanning the QR code using the expo go app on my mobile I got an error saying "something went wrong. sorry about that you can go back to expo home or try to reload the project". Also I have connected my mobile and my pc with the same Wi-Fi connection. And I have figured out that the expo metro bundler waiting port address is different to the IP address of my Wi-Fi connection.

**Example: Expo: Metro waiting on exp://192.168.1.13:8081. My IP address: 127.0.0.1

It should be as Expo: Metro waiting on exp://127.0.0.1:8081.**

Also I did the same process on creating a expo project on my friend's laptop, And it worked fine as the both IP's are same as Expo: Expo: Metro waiting on exp://127.0.0.1:8081. My friend's lap IP address: 127.0.0.1

Also when I run the project using the command npx expo start --tunnel it works fine and by using tunneling it makes the app to run very slow.

Someone please help me resolve this problem please. Expo error

have you got any sol on this ?

@BroLetsCodeIt
Copy link

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.

@ranbir7
Copy link

ranbir7 commented Feb 21, 2024

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

@vk-develops
Copy link

Changing the REACT_NATIVE_PACKAGER_HOSTNAME from the windows environmental variable is working fine for me, But everyday my network ipv4 address changes and for working on the project I need to setup the correct ip address on the REACT_NATIVE_PACKAGER_HOSTNAME everyday. So is there any way that the REACT_NATIVE_PACKAGER_HOSTNAME assign to the current ip address without manually setting it.

@NoobMahbub
Copy link

This is because your expo app ip address and your pc ip address is different

You can fix it by running this command as an administrator on you windows powershell:

setx /M REACT_NATIVE_PACKAGER_HOSTNAME 192.168.0.104 (replace this ip address with your current pc ip address)

I have also made a video on this topic

You can watch it for better understanding: https://youtu.be/tSP0VECZ61k?si=tG9j4Vcf7kySI4r9

@igordg777
Copy link

Hello! The solution to this problem for me was to create a new Windows account, where I wrote my name in English, rather than in Russian. A similar problem may arise with Android Studio. Now I am working with React Native under a new Windows account with an English name. Maybe this will help someone. Dear Expo creators, I would like to kindly request you to pay attention to this matter. Thank you.

@eulier1
Copy link

eulier1 commented Apr 14, 2024

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?.

@ionansantos
Copy link

ionansantos commented Apr 27, 2024

mudei o startscript de expo startpara expo start --tunnel(já que o global expo cli agora está obsoleto) e funcionou perfeitamente para Android e web!

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

imagem

essa solução deu certo para mim !! 💯 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid issue: question Issues on this repository are reserved for bug reports needs validation Issue needs to be validated
Projects
None yet
Development

No branches or pull requests