-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 50] Unable to load dev client bundle on Android device (expo-dev-client@3.3.8) #27027
Comments
I am having the same issue. |
Same issue here, and I would also add that the suggested workaround in the initial issue ( In fact, prefixing the command with |
Same, but seems to work if i load it with http:// |
You are correct, connecting to |
Same issue here, works fine in SDK 49 tho, after upgrade to SDK50 i'm facing this issue, Have anyone figure this out yet?. |
That is a decent workaround, but still no back to ideal user experience. I guess we can assume that the main difference between those of us who still have the issue, and those who had i solved (previous issue) is the fact that we are using the |
@wodin was able to shed some more detail on the background of this issue:
So these appear to be the combined insights:
All things considered, it would be great to have an acknowledgement from the Expo team, in particular for someone who was involved in making the move from |
Same issue here. Works when manually using |
Same issue for me as well. Edit: Works with ‘http’ |
I have the same issue |
Thank you for filing this issue! |
Well even with the --tunnel i do have a problem with connection to the dev client. After some tests it appears that my issue is ESET Firewall (AV) |
I'm having the same issue. I thought I'd add my experience, looks like this tallies with others:
|
I have the same issue that --tunnel doesn't work unless I enter it manually and use 'http' rather than 'https' I'm using: |
Same issue here. Cannot connect any device (ios, android, emulator/simulator/real-device) if not connected via tunnel. On android also have to change the address from |
this issue still happens until today |
We are still having this issue on 50.0.14. Starting with |
Update: I have managed to solve this by updating my node to the LTS version. Make sure to clean node cache as well to set up the correct version. I am running 20.12.0 and then there is no need for any tunnel or url manipulation. |
I think you might be misunderstanding the larger issue. Most people here (as I interpret it) need to run tunnel, for network reasons. When doing so, we run into the issue that the default So, could you confirm that you mean that you don't need the tunnel, and therefore overall it works (for you)? |
I can confirm I do not have a need for tunnel. I used it because the regular connection was not working which I solved by updating node. If there is still a need for tunnel regardless then I think the manipulation from 'https' to 'http' is still required. |
I encountered the same issue and found that using |
@AhmedMannai10 - please share a minimal reproducible example |
@brentvatne I think this thread on Discord explains it: It seems a dot in the username causes the SSL certificate not to validate |
^^ Thanks @wodin for referring me to this ticket. I had a team member hit this issue and was struggling to get past it. When I heard they got it to work if they changed the URL to HTTP, I thought it might be a cert issue. This is what I shared over on discord: A team member was struggling today to get Expo Direct to work. They ended up figuring out if they downgraded to http:// in the url, things worked. I took a look and found out that when expo direct generated the URL it is using their Expo username like so:
the Lets Encrypt cert is a I advised my co-worker to change his username on expo and remove the Until expo changes the algorithm they use to create expo direct URLs, you must change your username if it has a period |
Same. Not working with a tunnel, works with http. Also, I do not have periods in my user name. The biggest hint from me is it stops working only in a coworking space and does work on a home network. |
@RohovDmytro - can you try using ngrok on its own for a simple webserver? something like:
you should then see something like this:
try opening the https hrl from your device that is unable to connect over tunnel |
Yeah, my username has hyphens, no periods. |
@vivek-pai - please try #27027 (comment) and report back |
This is interesting, can confirm my username also has a dash (but no period). What would cause this issue to differ on android vs ios though, are they handling the cert validation differently? |
@kyelewis can you try Brent's test? |
I see similar behavior as others. Using There are no periods in my username, and if I use the HTTPS URL in Chrome it says the I tried Brent's test, I'm able to connect to the http-server just fine via ngrok. Just for kicks I tried putting the same ngrok in front of
If I start Expo with
|
This has been causing me an enormous headache, slight relief as a beginner when I saw that this issue was faced by many. Was too scared to try out any weird moves/changes as it might be hard to revert/make things worse. |
# Why As highlighted in #27027 (comment), users with `.` in their usernames are unable to use HTTPS tunneling due to a limitation of our SSL certificate, where we can only have one level deep wild card domains. # How Update `_getIdentifyingUrlSegmentsAsync` to filter out `.` when slugifying the username. This shouldn't cause any clashes given that we concat the username with `getProjectRandomnessAsync()` # Test Plan `yarn start --tunnel` using an account with `.` in the username # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
@brentvatne I tried doing what you described (if I understand you correctly):
i.e. I set up an ngrok tunnel from my developer machine's localhost and opened a browser tab on my test device opening the ngrok URL. As reported by @ristewar, this works just fine. |
As highlighted in #27027 (comment), users with `.` in their usernames are unable to use HTTPS tunneling due to a limitation of our SSL certificate, where we can only have one level deep wild card domains. Update `_getIdentifyingUrlSegmentsAsync` to filter out `.` when slugifying the username. This shouldn't cause any clashes given that we concat the username with `getProjectRandomnessAsync()` `yarn start --tunnel` using an account with `.` in the username <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
416b04b seems promising. Is that available for test somewhere? My typical workflow is to run
|
Looks like the fix has been released for Expo SDK 51, but as far as I can see it has not yet been released for Expo SDK 50. |
Upgraded to Expo 51 and it works like it used to now. |
Minimal reproducible example
https://github.com/vivek-pai/expo-reproducible-example
Summary
This is a continuation of issue #26364.
I am still seeing the same error on the Android dev client build with expo-dev-client 3.3.8:
The linked reproducible example is just from running
npx create-expo-app
and installing the dev client.I use WSL and build the dev client
eas build --profile development --platform android
and then run
expo start --dev-client --tunnel
Upon running, I'll see the following warning
But, it still provides a usable url:
› Metro waiting on exp+expo-test://expo-development-client/?url=https%3A%2F%2Fxxxxxx-y-8081.exp.direct
Connecting to that URL from my dev client (on my Android device), I get the "Unable to load script" error
To rule out the tunnel warning being an issue, I started without the expo tunnel
expo start --dev-client
› Metro waiting on exp+expo-test://expo-development-client/?url=http%3A%2F%2F172.20.72.246%3A8081
and used localtunnel to create a public accessible tunnel
npx localtunnel --port 8081
Connected to that public address from my Android dev client=> Same "Unable to load script" error
In all attempts, I don't see any "BUNDLE" or any other entries in the console.
The iOS dev client works fine, however. The non-dev client Android/iOS builds also work.
This error only occurs on the Android dev client.
Environment
The text was updated successfully, but these errors were encountered: