Skip to content
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

clear should not throw if the db hasn't been created yet #1020

Closed
1 of 5 tasks
szmarczak opened this issue Oct 26, 2023 · 3 comments · Fixed by #1066
Closed
1 of 5 tasks

clear should not throw if the db hasn't been created yet #1020

szmarczak opened this issue Oct 26, 2023 · 3 comments · Fixed by #1066
Labels
bug Something isn't working released

Comments

@szmarczak
Copy link

What happened?

WARN  Possible Unhandled Promise Rejection (id: 0):
Error: Failed to delete storage directory.Error Domain=NSCocoaErrorDomain Code=4 "“RCTAsyncLocalStorage” couldn’t be removed." UserInfo={NSUserStringVariant=(
    Remove
), NSFilePath=/var/mobile/Containers/Data/Application/C716D281-73E6-43CC-9951-ACE53CB23C88/Documents/ExponentExperienceData/%40anonymous%2Fapp-d771027f-1b8a-4905-82e8-0b5bef0f00b0/RCTAsyncLocalStorage, NSUnderlyingError=0x2803286c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

Version

1.19.3

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

> npx react-native info
info Fetching system and libraries information...
System:
  OS: Windows 10 10.0.22621
  CPU: "(12) x64 AMD Ryzen 5 5600 6-Core Processor              "
  Memory: 16.06 GB / 31.91 GB
Binaries:
  Node:
    version: 20.2.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 9.7.2
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.5.33424.131 (Visual Studio Community 2022)
Languages:
  Java:
    version: 11.0.20.1
    path: C:\Program Files\Eclipse Adoptium\jdk-11.0.20.101-hotspot\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.5
    wanted: 0.72.5
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Steps to Reproduce

useEffect(() => {
    (async () => {
        await AsyncStorage.clear();
    })();
}, []);
@szmarczak szmarczak added the bug Something isn't working label Oct 26, 2023
Copy link

This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed.

@github-actions github-actions bot added the Stale label Dec 26, 2023
@tido64 tido64 removed the Stale label Dec 26, 2023
@hieucd04
Copy link

hieucd04 commented Jan 4, 2024

Running into this issue today.

From this SO post, it looks like this issue has been around for about 6 years.

@AsyncStorageBot
Copy link
Collaborator

🎉 This issue has been resolved in version 1.22.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

4 participants