Skip to content

ERROR Warning: Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null. #1183

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

Open
1 of 5 tasks
fai07600521 opened this issue Feb 6, 2025 · 12 comments
Open
1 of 5 tasks
Labels
bug Something isn't working

Comments

@fai07600521
Copy link

fai07600521 commented Feb 6, 2025

What happened?

I got this error every time I delete and run start my application I try everything but it's no hope please help me

Version

"@react-native-async-storage/async-storage": "^1.24.0""@react-native-async-storage/async-storage": "^1.24.0"

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

Bridgeless mode is enabled
 (NOBRIDGE) ERROR  Warning: Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.

To fix this issue try these steps:

  • Uninstall, rebuild and restart the app.

  • Run the packager with --reset-cache flag.

  • If you are using CocoaPods on iOS, run pod install in the ios directory, then rebuild and re-run the app.

  • Make sure your project's package.json depends on @react-native-async-storage/async-storage, even if you only depend on it indirectly through other dependencies. CLI only autolinks native modules found in your package.json.

  • If this happens while testing with Jest, check out how to integrate AsyncStorage here: https://react-native-async-storage.github.io/async-storage/docs/advanced/jest

If none of these fix the issue, please open an issue on the GitHub repository: https://github.com/react-native-async-storage/async-storage/issues
 INFO  
 💡 JavaScript logs will be removed from Metro in React Native 0.77! Please use React Native DevTools as your default tool. Tip: Type j in the terminal to open (requires Google Chrome or Microsoft Edge).
 (NOBRIDGE) LOG  Running "SampleApp" with {"rootTag":1,"initialProps":{"concurrentRoot":true},"fabric":true}
 (NOBRIDGE) ERROR  Invariant Violation: "SampleApp" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and AppRegistry.registerComponent wasn't called. it don't work none of every work I frustrate already please help me straight

Steps to Reproduce

just delete app and install everything and run start the app

@fai07600521 fai07600521 added the bug Something isn't working label Feb 6, 2025
@ericstakebake
Copy link

I'm experiencing the same issue. Any help would be greatly appreciated!

@facuescobar
Copy link

facuescobar commented Feb 11, 2025

Same here, I have "@react-native-async-storage/async-storage": "^2.1.1", installed, and it's working correctly but fails while running tests.

  Test suite failed to run

    [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.

    To fix this issue try these steps:

       Uninstall, rebuild and restart the app.

       Run the packager with `--reset-cache` flag.

      • If you are using CocoaPods on iOS, run `pod install` in the `ios` directory, then rebuild and re-run the app.

      • Make sure your project's `package.json` depends on `@react-native-async-storage/async-storage`, even if you only depend on it indirectly through other dependencies. CLI only autolinks native modules found in your `package.json`.

       If this happens while testing with Jest, check out how to integrate AsyncStorage here: https://react-native-async-storage.github.io/async-storage/docs/advanced/jest

    If none of these fix the issue, please open an issue on the GitHub repository: https://github.com/react-native-async-storage/async-storage/issues

...
    > 3 | import AsyncStorage from '@react-native-async-storage/async-storage';
...

@fai07600521
Copy link
Author

fai07600521 commented Feb 13, 2025 via email

@blacklightske
Copy link

unistalling the app and installing it doesn't work

@astridlujo
Copy link

astridlujo commented Feb 14, 2025

This is also happening to me when running my unit tests. I'm mocking AsyncStorage in my jest config file. Everything was working before updating to this version 2.1.1.

Image

@mikeathers
Copy link

I'm getting the same, re-installing doesn't work

@amalcltpba
Copy link

I'm experiencing the same issue. Any help would be greatly appreciated!
"@react-native-async-storage/async-storage": "^2.1.1",

@amalcltpba
Copy link

Stop the Metro bundler and restart it using the --reset-cache command.
Open a new terminal tab and run npx react-native run-android.

@blacklightske
Copy link

still doesn't work

@bouajo
Copy link

bouajo commented Feb 27, 2025

I uninstalled the last version, installed the new version, and now it works.

@skjortan23
Copy link

i have totally reinstalled and still get the same error.

@kadamSnehal
Copy link

I have same issue. Several times clear cache, reinstalled. But this error still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants