Skip to content

«Unable to load script» fro Android Studio #26590

Closed
@RohovDmytro

Description

@RohovDmytro
1. Running react-native start

Metro is running fine.

  1. Building a project in Android studio. Running on a real device. (Meizu M2, Android 5.1)

  2. Seeing a message:

09-26 09:44:03.986 28080-28113/com.metronome E/unknown:ReactNative: Exception in native call
java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.

But if I do this:

react-native run-android

And then start rebuilding project in Android Studio everything will run smoothly.

System:
    OS: macOS Mojave 10.14.2
    CPU: (4) x64 Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
    Memory: 26.11 MB / 4.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.13.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.11.3 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    Android SDK:
      API Levels: 22, 25, 27, 28, 29
      Build Tools: 28.0.3, 29.0.0
      System Images: android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 10.1/10B61 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.1 => 0.61.1 
  npmGlobalPackages:
    react-native: 0.59.9

P.S. Additional error I've managed to pull out from Android:

09-26 09:46:05.378 26975-26975/? E/Finsky: [1] yfi.b(2): Package name null is not an installed package
09-26 09:46:05.380 26975-26975/? E/Finsky: [1] ybc.c(54): PSIC will not run.
    java.lang.IllegalArgumentException: Provided installer data is not valid (uid: -1, package name: null). Data could be missing, invalid, or just not match each other. PSIC will not run.
        at ybc.c(PG:51)
        at com.google.android.finsky.verifier.impl.PackageVerificationService.a(PG:8)
        at com.google.android.finsky.verifier.impl.PackageVerificationService.onStartCommand(PG:4)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3301)
        at android.app.ActivityThread.access$2200(ActivityThread.java:187)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1687)
        at android.os.Handler.dispatchMessage(Handler.java:111)
        at android.os.Looper.loop(Looper.java:194)
        at android.app.ActivityThread.main(ActivityThread.java:5877)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1015)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
09-26 09:46:07.446 800-1233/? E/Sensors: handleToDriver handle(0)
09-26 09:46:07.446 800-1233/? E/Sensors: handleToDriver handle(0)
09-26 09:46:07.447 800-1233/? E/Sensors: new setDelay handle(0),ns(20000000)m, error(0), index(2)
09-26 09:46:07.447 800-1233/? E/Accel: ACC batch: handle:0, en:0,samplingPeriodNs:20000000 maxBatchReportLatencyNs:0 
09-26 09:46:07.447 800-1233/? E/Sensors: sensor 0 go to common batch
09-26 09:46:07.447 800-1233/? E/Sensors: handleToDriver handle(0)
09-26 09:46:08.307 800-815/? E/Sensors: handleToDriver handle(0)
09-26 09:46:24.841 26096-26145/? E/NativeCrypto: ssl=0xd5d0bc00 cert_verify_callback x509_store_ctx=0xdcef4110 arg=0x0
09-26 09:46:24.841 26096-26145/? E/NativeCrypto: ssl=0xd5d0bc00 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
09-26 09:46:25.812 800-1517/? E/Sensors: handleToDriver handle(0)
09-26 09:46:25.812 800-1517/? E/Sensors: handleToDriver handle(0)
09-26 09:46:25.813 800-1517/? E/Sensors: new setDelay handle(0),ns(66667000)m, error(0), index(2)
09-26 09:46:25.813 800-1517/? E/Accel: ACC batch: handle:0, en:0,samplingPeriodNs:66667000 maxBatchReportLatencyNs:0 
09-26 09:46:25.814 800-1517/? E/Sensors: sensor 0 go to common batch
09-26 09:46:25.814 800-1517/? E/Sensors: handleToDriver handle(0)
09-26 09:46:25.981 28392-28427/com.metronome E/GED: Failed to get GED Log Buf, err(0)
09-26 09:46:26.048 28392-28429/com.metronome E/unknown:ReactNative: Exception in native call

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: AndroidAndroid applications.Ran CommandsOne of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions