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

Rn debug error on Android java.lang.NumberFormatException at BundleDeltaClient #22806

Closed
zeyios opened this issue Dec 27, 2018 · 3 comments
Closed
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@zeyios
Copy link

zeyios commented Dec 27, 2018

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:
image

image

also, I found it parse this number as integer:

image

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

@react-native-bot react-native-bot added Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. Platform: Android Android applications. labels Dec 27, 2018
@bartolkaruza
Copy link

Looks like a module id is generated outside of the Java int allowed range. Are you able to consistently reproduce this issue?

@zeyios
Copy link
Author

zeyios commented Dec 30, 2018

Looks like a module id is generated outside of the Java int allowed range. Are you able to consistently reproduce this issue?

@bartolkaruza Yes, my app crashed every time when I want to debug. I also found a id outside of java int in my release bundle, but it works well in release mode.

@bartolkaruza
Copy link

Hello there 👋 this issue doesn't have a repro (which means, a react-native init-ed project with the minimal changes that leads to creating the same issue you are reporting). Unfortunately, I have no way of helping you in a meaningful way – there is no easy way for me to recreate the situation and check that the issue reported is still there when changing the code.

Because of this, we are going to close this issue - but if a repro is shared, we are happy to reopen it 🤗

@facebook facebook locked as resolved and limited conversation to collaborators Mar 20, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

4 participants