`clear` should not throw if the db hasn't been created yet
szmarczak opened this issue · 3 comments
szmarczak commented
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();
})();
}, []);
github-actions commented
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.
hieucd04 commented
Running into this issue today.
From this SO post, it looks like this issue has been around for about 6 years.
AsyncStorageBot commented
🎉 This issue has been resolved in version 1.22.2 🎉
The release is available on:
Your semantic-release bot 📦🚀