question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A Bug in Reloading JS Bundle since react-native@0.29

See original GitHub issue

A very nice improvement of React Native since version 0.29 is using jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; to switch using packager server with DEBUG mode or pre-bundle with RELEASE mode in an actual device.

However it does not work when the packager server is already running when building the IOS product.

I guess the reason is caused by that the program decides to still use the pre-bundle when it fails to start a packager server since the 8081 port is already taken by another running packager server.

A workaround is to stopping the running packager server before building. But the bug still needs to be fixed since it causes a lot confusion.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
guilhermebruzzicommented, Sep 23, 2016

@Kureev @vjeux Hi Guys, can you take a look at this issue and the PR I mentioned (https://github.com/facebook/react-native/pull/9964) to see if it makes sense to be part of RN 0.34? I can update with the base branch if it looks ok for you and that would be great for our RN team, TY! 😄

1reaction
guilhermebruzzicommented, Sep 17, 2016

Thanks @Kureev your feedback definitely helped! 😄

This issue didn’t happen to me: Pre-bundling doesn’t work if there is an existing instance of packager running. It never worked even when i killed the existing instance of packager. Maybe by fixing the IP address detection this issue won’t occur anymore with @richarddlu, as it worked for me.

I agree with you that if it uses a pre-bundled version, it shouldn’t have a hot module replacement / live reload options.

In case of the IP detection i believe this PR will fix the issue: https://github.com/facebook/react-native/pull/9964

Because the IP address should be in either en0 or en1 depending on how you access the internet. I don’t know if a option to hook the ethN on ENV makes sense, maybe a option to pass your IP address via ENV could be even better, if the script doesn’t already find it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the influence of number of files on the bundle size of a ...
The objective of my React Native application is as small bundle size as possible. And while looking for ways to keep the bundle...
Read more >
How we reduced our React Native app size by 60% with a few ...
The bundling process already removes unused code paths, so what we see here is the code that is actually used by our app....
Read more >
@scxkkj/react-native-device-info - npm
Gets available storage size, in bytes. Examples. const freeDiskStorage = DeviceInfo.getFreeDiskStorage(); ...
Read more >
react-native-maps | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
error cannot read property 'configurations' of undefined. react ...
react -native-google-signin (to unlink run: "react-native unlink react-native-google-signin") This is likely happening when upgrading React Native from below ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found