-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
- [ 1] Review the documentation: https://facebook.github.io/react-native
- [1 ] Search for existing issues: https://github.com/facebook/react-native/issues
- [1 ] Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
Run react-native info
in your terminal and paste its contents here.
React Native Environment Info:
System:
OS: Windows 7
CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Memory: 6.57 GB / 15.88 GB
Binaries:
Yarn: 1.10.1 - C:\Users\myname\AppData\Roaming\npm\yarn.CMD
npm: 5.6.0 - D:\Program Files\nodejs\npm.CMD
Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
I found there is a very big number (20771272033) in bundle, it works well when I pass bundle to my mobile and load it normally. But when I want to debug on my device, my app crashed.
Exception is :
java.lang.NumberFormatException: 20771272033
at android.util.JsonReader.nextInt(JsonReader.java:522)
at com.facebook.react.devsupport.BundleDeltaClient.patchDelta(BundleDeltaClient.java:104)
at com.facebook.react.devsupport.BundleDeltaClient.storeDeltaInFile(BundleDeltaClient.java:54)
at com.facebook.react.devsupport.BundleDownloader.processBundleResult(BundleDownloader.java:281)
at com.facebook.react.devsupport.BundleDownloader.access$200(BundleDownloader.java:35)
at com.facebook.react.devsupport.BundleDownloader$1.onResponse(BundleDownloader.java:153)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
I have found the number 20771272033 in my bundle:
also, I found it parse this number as integer:
react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BundleDeltaClient.java
Line 157 in e81adb9
int moduleId = jsonReader.nextInt(); |
Is this a bug or I generated my bundle in a wrong way?
Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve