question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use tunnelling with local expo-cli

See original GitHub issue

Summary

I’m attempting to migrate from using global expo-cli to local, I like the idea that projects contain all the tooling they need. I’ve always hated the idea of global packages.

The project I am having problems with is running on WSL2, so I can’t access the app on my mobile device without using tunnelling.

Global expo-cli allowed me to do expo start --dev-client --tunnel – This works fine

However, when running npx expo start --dev-client --tunnel I get the following error and the project doesn’t start:

Failed to resolve the Android SDK path. Default install location not found: /home/craig/Android/sdk. Use ANDROID_HOME to set the Android SDK location. Failed to resolve the Android SDK path. Default install location not found: /home/craig/Android/sdk. Use ANDROID_HOME to set the Android SDK location. Error: spawn adb ENOENT Error: spawn adb ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:485:16) at processTicksAndRejections (node:internal/process/task_queues:83:21)

If I revert to the old global expo-cli, this doesn’t happen but that defeats the purpose of migrating.

What platform(s) does this occur on?

Windows 11 with WSL2

SDK Version

46

Environment

expo-env-info 1.0.5 environment info: System: OS: Linux 5.10 Ubuntu 20.04.5 LTS (Focal Fossa) Shell: 5.8 - /usr/bin/zsh Binaries: Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm npmPackages: expo: ~46.0.9 => 46.0.16 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.9 npmGlobalPackages: eas-cli: 2.4.0 Expo Workflow: managed

Minimal reproducible example

npx expo start --dev-client --tunnel

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
eddielin0926commented, Nov 24, 2022

I have the same issue with the local expo! In addition, my global expo can not open the tunnel either.

Error starting ngrok: Starting tunnels timed out
Tunnel URL not found (it might not be ready yet), falling back to LAN URL.

By the way, is it necessary that wsl2 also needs to install Android SDK?

0reactions
aleqsiocommented, Nov 24, 2022

@Eddielin0926 Thanks for reporting the issue! It’s hard to offer better support on errors reported by ngrok - it can be caused by a variety of issues.

Can you please check if ngrok itself is working for you in WSL2 by exposing a test port?

Closing for now as I don’t think it’s related to the original issue, but happy to take a look if you’re able to provide more details.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to connect to expo xde using expo client on local ...
Use the tunnel URL that is slower, but works even if the device can't connect through LAN. Change firewall settings / use a...
Read more >
Expo CLI - Expo Documentation
Tunneling is slower than local connections because requests must be forwarded to a public URL. · Tunnel URLs are public and can be...
Read more >
How Run and Test React Native / Expo On Your Apple iOS ...
With support for connection via Tunnel, LAN, and Local. Got these two error messages by clicking on Run on Android, Run on iOS....
Read more >
Can't start project on expo app. Tunnel also not working - Reddit
I had to switch to using npx expo start --tunnel and install the latest version of node in order to get tunneling working...
Read more >
React-native – Unable to connect to expo xde ... - iTecNote
If you have multiple network interfaces and XDE shows the IP address of a wrong one, you can use Expo CLI and set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found