Skip to content

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

@zeyios

Description

@zeyios

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: AndroidAndroid applications.Resolution: LockedThis issue was locked by the bot.Tech: Bundler 📦This issue is related to the bundler (Metro, Haul, etc) used.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions