Host remains without network after a while
Description
Okay, so this is a bit of a weird one, but I will try my best to explain what happens
Expected Behavior
- Start expo cli
- Work without any network issues
Observed Behavior
- Start expo cli
- Work without any network issues for a while
- After a while (5-10 minutes) all network requests (e.g. browser pages, stuff like that) fail
- Expo reports a network connectivity problem with the tunnel (the same error that shows when turning off WiFi)
The weird thing is:
- ping works
- Windows reports having internet connectivity
- telnet on port 80 fails
Environment
Please run expo diagnostics in the project folder and copy the output here:
Environment:
OS: Windows 10 version1809 build 17763.55 with WSL
Node: 10.12.0
npm: 6.4.1
Packages: (wanted => installed)
expo: ^30.0.0 => 30.0.1
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4
Diagnostics report:
https://exp-xde-diagnostics.s3.amazonaws.com/bogdan.marius.calapod-40e5c934-3c30-4ed2-b306-07524d995597.tar.gz
Phone:
Xiaomi Redmi Note 4 running Android 8.1.0
Reproducible Demo
This seems to happen without any specific project - even new expo projects show this behavior
What I've tried
- Resetting the network adapter
- Uninstalling and reinstalling network adapter
- Running the Windows 10 network troubleshooter
- Running the
reset networktool in the Windows 10 Settings - Connecting an ethernet/USB tether to attempt restoring network connectivity
- Turning off Windows Firewall and Windows Defender
- Running
ipconfig /flushdns - Reinstalling Windows 10 and only installing
nodeto runexpo-cli - All of the above with expo killed after tunnel error
This is driving me nuts and I can't figure out how to debug it properly. It only happens when running Expo apps - I also do a lot of web development and CRA, Gatsby and the like don't cause network problems, so I guess it's something specific to expo-cli.
I have no antivirus or firewall apart from those that came with Windows
Small repro update - I noticed that simply starting expo start and waiting for a while reproduces the same issue. Any ideas on how I could debug more into this issue ?
Adding to this issue. If expo is started on Windows but on Linux Subsystem (wsl) internet requests fail imedeately. I have tried the same things as OP but the only way I could restore internet connection was via a reboot. Observed behaviour is the same except for:
- ~~Work without any network issues for a while~~
- ~~After a while (5-10 minutes)~~ Immedeately all network requests (e.g. browser pages, stuff like that) fail
With Windows using command prompt this issue is not present
Having the same issue on WSL (linux subsystem for Windows). Expo is running fine but after +/- 5 minutes all connections are dropped. Ping works, Windows reports no issues but getting a no internet connection in all browsers & applications. Need to restart my PC before it's fixed.
Anyone have any more info how to work around this?
Same problem here
I found a palliative solution not to restart the machine:
1 - WIN+R -> services.msc 2 - Find LxssManager 3 - Right-click -> Restart
This should restart the WSL service, normalizing the network.
Facing the same issue! At least I know I am not being haunted. I was using expo without problem on my mac until it broke down. To save some money I bought a Windows laptop and this issue was driving me crazy. What does restarting LxssManager do?
LxssManager is the service that manages the layer that communicates between Windows and Linux. Restarting it is basically equivalent to restarting Windows regarding everything that happens in WSL.
Obs: When I run the expo-cli start in CMD and then run on WSL, a network does not fail anymore....
I ran this same problem, first I thought it was problem I faced if using tunnel, but other options do very same.
I found related warnings from event viewer, maybe these give some direction where to continue debugging: first event
Log Name: System
Source: Tcpip
Date: 17.3.2019 18.31.05
Event ID: 4231
Task Category: None
Level: Warning
Keywords: Classic
User: N/A
Computer: mylaptop
Description:
A request to allocate an ephemeral port number from the global TCP port space has failed due to all such ports being in use.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Tcpip" />
<EventID Qualifiers="32768">4231</EventID>
<Level>3</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2019-03-17T16:31:05.020635700Z" />
<EventRecordID>5313</EventRecordID>
<Channel>System</Channel>
<Computer>mylaptop</Computer>
<Security />
</System>
<EventData>
<Data>
</Data>
<Binary>00000000010000000000000087100080000000000000000000000000000000000000000000000000</Binary>
</EventData>
</Event>
second event
Log Name: System
Source: Tcpip
Date: 17.3.2019 18.33.58
Event ID: 4227
Task Category: None
Level: Warning
Keywords: Classic
User: N/A
Computer: mylaptop
Description:
TCP/IP failed to establish an outgoing connection because the selected local endpoint was recently used to connect to the same remote endpoint. This error typically occurs when outgoing connections are opened and closed at a high rate, causing all available local ports to be used and forcing TCP/IP to reuse a local port for an outgoing connection. To minimize the risk of data corruption, the TCP/IP standard requires a minimum time period to elapse between successive connections from a given local endpoint to a given remote endpoint.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Tcpip" />
<EventID Qualifiers="32768">4227</EventID>
<Level>3</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2019-03-17T16:33:58.000531100Z" />
<EventRecordID>5314</EventRecordID>
<Channel>System</Channel>
<Computer>mylaptop</Computer>
<Security />
</System>
<EventData>
<Data>
</Data>
<Binary>00000000010000000000000083100080000000000000000000000000000000000000000000000000</Binary>
</EventData>
</Event>
Restarting LxssManager restores network connectivity immediately. My system Windows 10 Pro, Version 1809, OS Build 17763.379 Expo was started inside wsl.
This is likely an issue with WSL. There is an issue for this at https://github.com/Microsoft/WSL/issues/2913.
I created docker container which prevents this issue from happening. For saving trouble from others to create build similar, it can be found here: https://hub.docker.com/r/kerbe/expo There is also information how to get hot reload working, as that is also problem with WSL/Windows Docker.
Same issue here using WSL. But any google site works fine. WHY??
Any workaround at the moment?
I had the same problem here.It's not the best solution but help me a lot!!!! THX!
I am having the same problem. It only seems to happen with Expo, otherwise WSL works fine.
Can confirm that Windows Insider Build 18890 fixes this issue.
I have the same problems! I hope Microsoft to solve this problem
I simuled two VM's with Oracle now with OSX. I'm disappointed with Windows but not surprised.
Em seg, 22 de jul de 2019 02:23, Andrew Jongyun Kim < [email protected]> escreveu:
I brought my answer from stackoverflow
I had stuck on the same issue. To solve this, I have to reboot whole PC or restart LxssManager manually.
net stop LxssManager net start LxssManager
Then, I found which one causes this problem while I was testing many things on Expo.
Instead of using Hot reloading, I used Live Reload as functional component doesn't have render().
There is only one exception that does not cause the issue even though I run expo and connected with my iphone through the Expo client. If I do not change any code and the live loading never worked at least once, the internet was alive. So, I figured it out that Live Reload causes this issue.
So, do disable Live Reload and do Reload JS Bundle manually.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/expo/expo-cli/issues/99?email_source=notifications&email_token=AG5A52GEF4IMLR7EOUJA46TQAU73VA5CNFSM4F5ZSNGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2OZPSY#issuecomment-513644491, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5A52H2YCV2OPJS65PGTKDQAU73VANCNFSM4F5ZSNGA .
@troyamtec I deleted my comment that was not correct solution for this issue. I realized, the debugging cause very serious crash to internet connection. Live reload is fine if there is no syntax error.
~~this issue makes me cannot sleep now lol.~~
~~I updated node 8 to 10~~
~~reinstalled expo~~
~~but still it caused problem.~~
~~However, it seems working well now lol~~
~~adding in .zshrc or .bash_profile~~
~~export EXPO_DEBUG=true~~
~~is there anyone try this? and tell me what your result.~~ ~~Thank you~~
Never mind, I just bring out my old macbook air :P
Same here. Subscribing to this thread in case there is a fix. Maybe switching to the new WSL2 will fix this, but I was on the fast track Insider Program and ran into issues with VirtualBox, so I've dropped back to the slow track. If anyone out there is on the fast track, try switching (instructions) and see if it works.