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.

Doesn't run on Android with RN > 0.58

See original GitHub issue

Current behavior

Running an app which includes AsyncStorage from this package instead of react-native will crash the app on startup.

Expected behavior

It doesn’t crash the app on startup.

Repro steps

Just include the package with any RN > 0.58 (I think with all the gradle upgrades coming in 0.58 as well)

Environment

  • Async Storage version: 1.2.1
  • React-Native version: > 0.58
  • Platform tested: Android only, iOS works fine
  • Logs/Error that are relevant:

This is the log from the production device / emulator:

2019-03-20 16:21:35.950 9719-9742/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: com.bundlenam, PID: 9719
    com.facebook.react.common.JavascriptException: null is not an object (evaluating 'l.multiMerge'), stack:
    <unknown>@1436:2386
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1435:298
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1434:447
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1428:293
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1420:875
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1419:207
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1418:164
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1414:345
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1413:164
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@358:416
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@11:71
    _@2:1514
    d@2:897
    o@2:435
    global code@1618:4
    
        at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
        at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:789)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
        at android.os.Looper.loop(Looper.java:164)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
        at java.lang.Thread.run(Thread.java:764)
2019-03-20 16:24:15.347 9940-9963/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: com.bundlename, PID: 9940
    com.facebook.react.common.JavascriptException: null is not an object (evaluating 'l.multiMerge'), stack:
    <unknown>@1436:2386
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1435:298
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1434:447
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1428:293
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1420:875
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1419:207
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1418:164
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1414:345
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@1413:164
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@358:416
    _@2:1514
    d@2:967
    o@2:435
    <unknown>@11:71
    _@2:1514
    d@2:897
    o@2:435
    global code@1618:4
    
        at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
        at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:789)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
        at android.os.Looper.loop(Looper.java:164)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
        at java.lang.Thread.run(Thread.java:764)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

10reactions
seasmurph2kcommented, Mar 22, 2019

Experiencing the same issue with RN0.59 running on a Nexus 5 emulator. Currently only using .setItem, .getItem and .removeItem.

Reverting back to import {AsyncStorage} from “react-native” for the moment.

2reactions
tkoolreactcommented, Apr 30, 2019

I think I believe I found the issue.

Using auto link, react-native link : react-native link @react-native-community/async-storage

(in my code) has a bug and doesn’t add the code in the section protected List<ReactPackage> getPackages()

new AsyncStoragePackage()

in MainApplication.java

If you follow the manual way:

https://github.com/react-native-community/react-native-async-storage/blob/master/docs/Linking.md

…should be good to go:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Doesn't run on Android with RN > 0.58 #44 - GitHub
Current behavior Running an app which includes AsyncStorage from this package instead of react-native will crash the app on startup.
Read more >
React Native navigation 0.58.X on Android - Stack Overflow
That error is usually caused by a linking issue. · After adding this code: const AppNav = createAppNavigator(RootStack); to my project it still ......
Read more >
Upgrade to React Native 0.58 - Matt Oakes
Learn how to upgrade to React Native 0.58 and why you need to make ... As always, it is good to run through...
Read more >
I upgraded for 0.58.1 to 0.61.5 and now i can't run the ... - Reddit
I upgraded for 0.58.1 to 0.61.5 and now i can't run the project on android ... I ran react-native upgrade to install to...
Read more >
Running On Device - React Native
You can use this method if your device is running Android 5.0 (Lollipop) or newer, it has USB debugging enabled, and it is...
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