Infinite Refreshing without doing anything

Hi !

I got this problem since one month one multiple projects.
At first, i hadn’t give attention to this but now it’s beginning to be annoying!

it make multiple refresh like cmd+r on the simulator and on iOS (didn’t test on Android).

On the console, got sequences of finished building :

14:52:49: Finished building JavaScript bundle in 78378ms
14:52:51: Finished building JavaScript bundle in 1103ms
14:52:53: Finished building JavaScript bundle in 599ms
14:53:04: Finished building JavaScript bundle in 663ms
14:53:06: Finished building JavaScript bundle in 843ms
14:53:08: Finished building JavaScript bundle in 1253ms
14:53:16: Finished building JavaScript bundle in 680ms
14:53:20: Finished building JavaScript bundle in 1143ms
14:53:21: Finished building JavaScript bundle in 988ms
14:53:23: Finished building JavaScript bundle in 1105ms
14:53:28: Finished building JavaScript bundle in 1445ms
14:53:37: Finished building JavaScript bundle in 3051ms
14:53:41: Finished building JavaScript bundle in 1598ms
14:53:48: Finished building JavaScript bundle in 971ms
14:53:49: Finished building JavaScript bundle in 1042ms
14:53:54: Finished building JavaScript bundle in 1181ms
14:53:57: Finished building JavaScript bundle in 1030ms
14:53:59: Finished building JavaScript bundle in 1349ms
14:54:01: Finished building JavaScript bundle in 581ms
14:54:03: Finished building JavaScript bundle in 660ms
14:54:04: Finished building JavaScript bundle in 741ms
14:54:07: Finished building JavaScript bundle in 1058ms
14:54:12: Finished building JavaScript bundle in 1073ms

This console log is extract from a fresh project with create-react-native-app with a simple app.json

{
  "expo": {
    "sdkVersion": "19.0.0"
  }
}

And this is my package.json freshly with some yarn add

{
  "name": "mytemplate",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "jest-expo": "~19.0.0",
    "react-native-scripts": "1.1.0",
    "react-test-renderer": "16.0.0-alpha.12"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "node node_modules/jest/bin/jest.js --watch"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "bluebird": "^3.5.0",
    "deepmerge": "^1.5.0",
    "expo": "^19.0.0",
    "lodash": "^4.17.4",
    "mongodb-stitch": "^0.0.25",
    "promise.waterfall": "^3.2.0",
    "prop-types": "^15.5.10",
    "react": "16.0.0-alpha.12",
    "react-dom": "^15.6.1",
    "react-native": "^0.46.1",
    "react-native-nav": "^2.0.0",
    "react-navigation": "^1.0.0-beta.11",
    "react-redux": "^5.0.5",
    "react-router": "^4.1.2",
    "react-scripts": "^1.0.10",
    "redux": "^3.7.2",
    "redux-thunk": "^2.2.0",
    "uui": "^1.0.3"
  }
}

I’ve test by remove all dependencies, install one-by-one… But i still got the issue… It’s like refreshing the project constantly until i make some cmd+r to stop this bug.

Does anyone got the same problem ?

1 Like

Hi! Is your project inside of a Dropbox folder or something like it (iCloud, Google Drive, etc.)? If there’s another program consistently making changes to files (like marking them as uploaded or another filesystem event), the packager may incorrectly pick that up as a change even if you aren’t editing the files actively.

3 Likes

Nope !

But, now your talking about iCloud… With the recent updates of Apple, i’m gonna check it.

Yep!

@dikaiosune you’re right!

It was icloud drive that force the refresh!

To anybody who will have this problem, please, put ALL of your files outside of the “Documents” folder of OSX.
Then, desactivate iCloud Drive, it won’t delete all the files inside of Documents and it won’t refresh expo.

Thx!

3 Likes

My project folder is not in OneDrive folder but still got this problem. I dont know why :frowning:

1 Like

Did you figure out a fix for this? I am in the same boat here. The directory is not within a OneDrive folder and the expo client constantly refreshing whether I’m on a simulator or physical device.

I also have the same error the app keeps building javascript bundle .
It was running smoothly and just broke without really changing anything at all.
Can anyone suggest anything?. been stuck on this for hours.

I have also started facing this issue.
Everything was working fine and suddenly, it keeps rebuilding the Js bundle.
Has anyone found any solution to this?

+1 same here

The most likely issue is still:

  • dropbox
  • box
  • pcloud
  • onedrive
  • icloud

Make sure your folder is NOT being synced from or to from ANYWHERE.

I am also having this exact issue. My project files are in another partition which is not even a system partition so I don’t expect this to happen.

Did you make sure the folder tree is not being synced:

+1, folder is not synced in any way.

Windows

Had the same issue on Windows, I removed my project from all cloud services, and didn’t work… solved it by changing my project’s location from Local Disk(C:) to Local Disk(D:)(worked for me), try it!

1 Like

Thank you for sharing, this was it. I like the idea of having the code being synced to icloud (in my case) but won’t work with the refreshes. Just moved the folder outside the icloud “folder” and it’s all good. Thank you!!

This worked for me. Thanks!

In my case, it was the Windows Defender analysis. When it’s finished, it works

For me at least, I was not able to fix this issue other than just disabling Fast Refresh.