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.

Linking when using kotlin not possible? NativeModule.RCTAsyncStorage is null.

See original GitHub issue

You want to:

Since I was getting warnings that the react-native asyncStorags is becomming deprecated and is moved (here) to individual package, I decided to install… This seems to be a pain in the a** every time, was also troubleful when I installed RCs’ extracted WebView. (grumpy sorry)…

Anyway, this time I am stuck with failing jest tests that I have not been able to resolve after 24 hours of trying. Have had multiple colleges passing by as well as asked for help on SO. Please check this link for further issue despription: https://stackoverflow.com/questions/55418910/jest-test-fails-after-installing-react-native-async-storage

I did manual linking since react-native link will not work for this module as MainApplication.java does not exist when using kotlin. Instead I have MainApplication.kt

After linking manually the async functions are working just fine. Except the jest test are unable to find the module. @RNCommunity/AsyncStorage: NativeModule.RCTAsyncStorage is null.

Any suggestions?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tbergquist-godaddycommented, Mar 29, 2019

Hi, I answered your post on stackoverflow.

Also see our repo if you like.

0reactions
krizzucommented, Apr 11, 2019

v1.3.0 released, please check it out 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linking when using kotlin not possible? NativeModule ...
NativeModule.RCTAsyncStorage is null. #51 ... link will not work for this module as MainApplication.java does not exist when using kotlin.
Read more >
react native - NativeModule: AsyncStorage is null, with @RNC ...
This error can be rectified by linking the module like mentioned above but linking does not work if your app is Expo Managed...
Read more >
Null safety | Kotlin Documentation
Null safety. Nullable types and non-null types. Kotlin's type system is aimed at eliminating the danger of null references, also known as ...
Read more >
TypeError: null is not an object for Zeroconf-React Native
Coding example for the question TypeError: null is not an object for Zeroconf-React Native.
Read more >
Writing a native module for React Native using Kotlin - Callstack
We're about to build a react-native-utube-player, a Native UI component that allows playing YouTube videos in our React Native app.
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