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

Continuous Reloading with Hot Reloading! #6597

Closed
myusuf3 opened this issue Mar 23, 2016 · 11 comments
Closed

Continuous Reloading with Hot Reloading! #6597

myusuf3 opened this issue Mar 23, 2016 · 11 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@myusuf3
Copy link
Contributor

myusuf3 commented Mar 23, 2016

I just starting trying out the hot loading on my log screen of my app.

I am getting the following being emmitted to my debug console and the app is consistently reloading itself.

I actually have to kill simulator to get out of this state.

[RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0
2016-03-22 20:24:48.376 [fatal][tid:com.facebook.React.JavaScript] Unable to execute JS call: __fbBatchedBridge is undefined
2016-03-22 20:24:49.497 [info][tid:NSOperationQueue 0x7f80e9754120 :: NSOperation 0x7f80eb9cb880 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0
2016-03-22 20:24:50.515 [info][tid:NSOperationQueue 0x7f80e9754120 :: NSOperation 0x7f80e97c7ec0 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0
2016-03-22 20:24:50.741 [info][tid:NSOperationQueue 0x7f80e9754120 :: NSOperation 0x7f80e946abd0 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0
2016-03-22 20:24:52.509 [info][tid:NSOperationQueue 0x7f80e9754120 :: NSOperation 0x7f80ebc83b30 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0
2016-03-22 20:24:53.248 [info][tid:NSOperationQueue 0x7f80e9754120 :: NSOperation 0x7f80ebabef10 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0
2016-03-22 20:24:55.028 [info][tid:com.facebook.React.JavaScript][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 4
2016-03-22 20:24:55.620 [info][tid:NSOperationQueue 0x7f80e9754120 :: NSOperation 0x7f80ebd3e910 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0
2016-03-22 20:24:56.024 [info][tid:NSOperationQueue 0x7f80e9754120 :: NSOperation 0x7f80e97f74b0 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0
2016-03-22 20:24:56.670 [info][tid:com.facebook.React.JavaScript][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 4
2016-03-22 20:24:56.788 [info][tid:NSOperationQueue 0x7f80e9754120 :: NSOperation 0x7f80ebcd2c00 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0

Basically unusable here. If you need more information ping me here I would love to use this feature for quicker design etc.

@myusuf3
Copy link
Contributor Author

myusuf3 commented Mar 23, 2016

Similar error code has been references in this issue. #3747

@myusuf3
Copy link
Contributor Author

myusuf3 commented Mar 23, 2016

Live reload seems to work fine.

@aprilzero
Copy link

Everything seems to work fine until hot reload is turned on, and then it just throws that error a few times a second and app keeps trying to reload until it eventually crashes or simulator is quit.

Live reload still works as it used to. Seems like something in our app is not happy to be hot reloaded, but unclear where to look since this error is not very informative...

Some tips about what that error means or where to look would be appreciated.

@martinbigio
Copy link
Contributor

As per the line that says Unable to execute JS call: __fbBatchedBridge is undefined looks like there's an error loading the JS bundle.

Could you try getting it using curl maybe? curl "localhost:8081/index.ios.js?platform=ios"?

@aaronschachter
Copy link

I'm getting this too, trying to upgrade from 0.19 to 0.22. Pinging curl "localhost:8081/index.ios.js?platform=ios"?returns code.

The simulator is constantly reloading, with the specific error repeating:

2016-04-01 13:48:08.117 [info][tid:NSOperationQueue 0x7f8c13d0eb40 :: NSOperation 0x7f8c13ebbb20 (QOS: LEGACY)][RCTPerformanceLogger.m:29] Unbalanced calls start/end for tag 0

Digging into my node_modules/react-native/package.json I see that I have

  "bin": {
    "react-native": "local-cli/wrong-react-native.js"
  },

Trying to reinstall globally doesn't work as suggested in #4515 (comment)

@aaronschachter
Copy link

After walking away from this for a few days, and again attempting to upgrade 0.19 to 0.22 - I was getting this behavior again (constantly reloading, can't click on Disable Hot Loading within developer menu because of constant reloading). Resolved it by resetting the simulator's content and settings (Simulator > Reset Content and Settings) and re-running.

Seems like the local-cli/wrong-react-native.js I mention in the comment above was a red herring -- my package.json still has that wrong-react-native.js set

@myusuf3
Copy link
Contributor Author

myusuf3 commented Apr 7, 2016

hmm interesting i will check it out! @aaronschachter

@aprilzero
Copy link

we managed to fix this by cleaning up our index.ios to closer match a brand new react project. We first started at around 0.11 so a lot of stuff had diverged since then. Not sure exactly what the original cause was, but many things were going wrong. We finally got hot reload working by a combination of wrapping navigator in a view, extending component instead of the old create class, switching to es6 syntax, removing mixins, setting a fixed dimensions on the parent container, specifying platform type in the appdelegate JS, etc.

Now there is a red border around the thing when hot reload is on (is that normal?), but besides that is works quite smoothly.

@adrienbrault
Copy link
Contributor

So, I fixed this issue by replacing:

jsCodeLocation = [NSURL URLWithString:@"http://0.0.0.0:8081/index.ios.bundle"];

with

jsCodeLocation = [NSURL URLWithString:@"http://0.0.0.0:8081/index.ios.bundle?platform=ios&dev=true"];

in my app delegate

🙈

aaronschachter added a commit to DoSomethingArchive/LetsDoThis-iOS that referenced this issue Apr 26, 2016
@digitaldavenyc
Copy link

digitaldavenyc commented Sep 28, 2016

Make sure you don't have any tasks running (i.e. Dropbox) inside your project folder that can cause changes to the contents of your project, this will trigger the continuous reload.

@lacker
Copy link
Contributor

lacker commented Feb 7, 2017

It looks like this is workarounded so I am going to close this issue. Thanks folks for helping out!

@lacker lacker closed this as completed Feb 7, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants