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 Time out, no manifest in cache #598

Closed
thebakerdev opened this issue Mar 15, 2018 · 14 comments
Closed

Expo Time out, no manifest in cache #598

thebakerdev opened this issue Mar 15, 2018 · 14 comments

Comments

@thebakerdev
Copy link

Description

Created a project using the create-react-native-app then scanned the QR code using an android phone but I get a timeout error on expo app. There was an unhandled error: Timed out, no manifest in cache

Expected Behavior

Create a project using create-react-native-app and run npm start
Scanned the QR code
It's supposedly built the project on my phone

Observed Behavior

I get this error on the expo at without a stack trace: There was an unhandled error: Timed out, no manifest in cache

Environment

Please run these commands in the project folder and fill in their results:

  • react-native-scripts@1.11.1
  • react-native@0.52.0
  • expo@25.0.0
  • 8.10.0
  • 5.6.0
  • 1.5.1

Windows 10
Samsung Phone

@ianchanning
Copy link

I had the same issue using yarn on Windows 10. Following the trouble shooting my http:// version timed out too. I then switched to using the mobile hotspot as suggested and this gives the same errors as described here

@thebakerdev
Copy link
Author

thebakerdev commented Mar 16, 2018

I think this has something to do with the network and virtual host. I have a virtualbox host besides my wifi connection. So what's currently happing is when I use npm start it uses the virtualbox host instead of the wifi connection. So basically they are using different network thus expo can't connect to the app.

One solution that I did was to disable the virtual host network the do npm or yarn start. Another is change some network settings as stated in #60 (comment).

This solved the problem in my case, but a better approach will be much appreciated. 😃

@ianchanning
Copy link

@thebakerdev fantastic, thanks! That solves the problem for me.

Although actually I don't have Virtual Box installed but I had a couple of other old VPN network connections. I deleted both of those and followed the steps in the #60 comment. I probably didn't need to do both.

One thing I noticed that changed was the IP switched from something like 10.8.0.14 (didn't work) to 192.168.1.7 (now works).

@anp
Copy link
Contributor

anp commented Mar 16, 2018

Hi! Sorry you're having issues with this. Unfortunately this is a common problem on Windows, and the main way we can work around it without having a lot of fragile logic for retrying all network interfaces is to provide these troubleshooting instructions in the generated project's README. Please post back if that's still not working for you though!

@anp anp closed this as completed Mar 16, 2018
@pranavb
Copy link

pranavb commented Mar 18, 2018

I had this same issue, while running a few Docker instances. The trick is to ensure that the IP address that the packager sees is the one that's associated with your WiFi adapter.

Quick Solution

@jimmylee had an excellent solution that I've included below.

  • Run ipconfig
  • Your WiFi adapter (called something like 'Wireless LAN adapter Wi-Fi') will probably not be first in the list (that's the whole problem, because Expo only looks at the first entry in this list).
  • Set the REACT_NATIVE_PACKAGER_HOSTNAME environment variable to the IPv4 address of your WiFi adapter
  • Say the IPv4 address associated with your Wireless LAN adapter Wi-Fi is X.X.X.X
    • Set an environment variable for a relatively permanent solution. There's a quick run down of how to do this at ComputerHope.
    • For a solution that will work for one session of the Command Prompt use:
      SET REACT_NATIVE_PACKAGER_HOSTNAME=X.X.X.X
  • Rerun the packager
    • yarn start

Best Solution

You could also change the 'Automatic metric' value for all your network adapters so that the WiFi adapter has the lowest value (highest priority). This is probably the best solution.

Full credit to @Himujjal for this. Check out his detailed answer here.

@jhalborg
Copy link

Also a problem on macOS, and an issue is open on the Expo client repo - it seems that 2.3.1 and 2.3.2 are affected.

@gitteraz
Copy link

I have tried all proposed Solutions, Upgrade, Downgrade, set Environment Variables, Disable Virtual box and so on.

Only thing that worked for me was changing my computer and mobile IP addresses.

@lsiden
Copy link

lsiden commented Mar 23, 2018

I started from a fresh create-react-native-app on Ubuntu Linux 4.4.0. When I run ifconfig, my Wireless network indeed shows up as the last interface. In my browser, I can open http://192.168.1.9 (my wireless IP) and I see a manifest.

So I ran "REACT_NATIVE_PACKAGER_HOSTNAME=192.168.1.9 yarn start" but I only get a timeout.

Here's the actual manifest:

{
  "sdkVersion": "25.0.0",
  "name": "crna-baseline",
  "slug": "crna-baseline",
  "version": "0.1.0",
  "xde": true,
  "developer": {
    "tool": "crna",
    "projectRoot": "/home/lsiden/proj/crna-baseline"
  },
  "packagerOpts": {
    "hostType": "tunnel",
    "lanType": "ip",
    "dev": true,
    "minify": false,
    "urlRandomness": null
  },
  "env": {
    "REACT_NATIVE_PACKAGER_HOSTNAME": "192.168.1.9"
  },
  "bundleUrl": "http://192.168.1.9:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&minify=false&hot=false&assetPlugin=/home/lsiden/proj/crna-baseline/node_modules/expo/tools/hashAssetFiles",
  "debuggerHost": "192.168.1.9:19001",
  "mainModuleName": "./node_modules/react-native-scripts/build/bin/crna-entry",
  "logUrl": "http://192.168.1.9:19000/logs",
  "id": "@anonymous/crna-baseline-676eb673-21e6-404f-9599-dc8f465f5846"
}

I do notice that hostType is set to "tunnel". Wny not "lan"? Isn't tunnel for working with an emulator?

What's especially puzzling is that this was all working on my Linux box earlier today. I had my wifi disconnected on my Linux box and I was connecting to my phone over 192.168.1.4 which is my wired Ethernet connection to my router, while I had my phone plugged into the USB port in debug mode. (It doesn't matter, because my phone can reach the wired IP over the Wifi router). All was going well. I could see debug messages in the console. Then it stopped working and I don't know what changed.

@SourceCipher
Copy link

The issue is still here

@bLuka
Copy link

bLuka commented Mar 27, 2018

I spent several hours trying to fix it, and I have still not a single clue.

I run React-Native with Expo on Gentoo/Linux.

The bug appears with no apparent reason, sometimes on a fresh project, sometimes not.

I tried the REACT_NATIVE_PACKAGER_HOSTNAME fix, with no result.

@baba43
Copy link

baba43 commented Mar 27, 2018

I get this error even when using exp publish. How can that be?

My issue was not related to exp but to my build. I got an Script error when running my local build with --no-dev. After fixing it, exp publish worked fine. I know this is not the initial problem in this thread, but maybe this helps future researchers.

@bLuka
Copy link

bLuka commented Mar 28, 2018

I tried a lot of things, I don't know which one fixed this issue.

I ran into multiple random issues (sometimes this one: facebook/react-native#15025), and tried downgrading npm as told in the discussion (npm i -g npm@4.6.1).

I will follow any details if I run into this issue again.

@richnavarro
Copy link

richnavarro commented Mar 29, 2018

I have been getting this error recently. A quick workaround - going to the project directory and running "exp start" and using expo via the command line. Seems to work fine without any issues this way for me.

@fiowak
Copy link

fiowak commented Apr 4, 2018

Run cmd as administrator and set netsh int ip reset - after that just restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests