react-native-async-storage/async-storage

Error: Failed to write manifest。

chen834921478 opened this issue · 11 comments

What happened?

[Error: Failed to write manifest file.Error Domain=NSCocoaErrorDomain Code=4 "The folder “manifest.json” doesn’t exist." UserInfo={NSFilePath=/Users/xxx/Library/Developer/CoreSimulator/Devices/ABA7A135-7070-41CE-8A0B-80192332E934/data/Containers/Data/Application/13CD016E-0375-465C-9F4F-C6C3257A66D1/Library/Application Support/xxx/RCTAsyncLocalStorage_V1/manifest.json, NSUserStringVariant=Folder, NSUnderlyingError=0x600000da02d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}, NSURL=file:///Users/xxx/Library/Developer/CoreSimulator/Devices/ABA7A135-7070-41CE-8A0B-80192332E934/data/Containers/Data/Application/13CD016E-0375-465C-9F4F-C6C3257A66D1/Library/Application%20Support/xxxx/RCTAsyncLocalStorage_V1/manifest.json}]

Version

1.23.1

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M3
  Memory: 94.28 MB / 24.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.17.0
    path: /opt/homebrew/opt/node@20/bin/node
  Yarn:
    version: 4.5.0
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: /opt/homebrew/opt/node@20/bin/npm
  Watchman:
    version: 2024.09.09.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2412.12266719
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Steps to Reproduce

After performing multiple AsyncStorage.remove operations and then restarting the app:

Hi, @chen834921478!

detail more about the problem and if possible provide a minimal example of reproducing the problem

Also encountering this. Unsure of STR, I think it just started happening once I upgraded to the latest version. Can't write, fetch, or clear items.

Exact same issue here. But with version async storage@1.18.1 – has anyone repro'd?

If you or anyone else is still having this issue and can share a minimal reproduction of it, I would be happy to try to help.

Any update on this?, after updated to react-native: 0.76.1 & react-native-async-storage: 2.0.0
(NOBRIDGE) ERROR Error storing data [Error: Failed to write manifest file.Error Domain=NSCocoaErrorDomain Code=4 "The folder “manifest.json” doesn’t exist." UserInfo={NSUnderlyingError=0x301950360 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}, NSUserStringVariant=Folder, NSURL=file:///private/var/mobile/Containers/Data/Application/D99F0782-0F91-4DC3-8C8A-F93AC816A7EA/Library/Application%20Support/gt.school.app/RCTAsyncLocalStorage_V1/manifest.json}]

Same issue with expo 51

Hey, here is a temporary fix I found to the issue.

  1. npm install patch-package
  2. In your package.json scripts, add "postinstall": "patch-package"
  3. Within the base dir of your project, create a folder named patches
  4. Within that folder, create a file named xcode+3.0.1.patch
  5. Paste the following into the file, save, and re-run npm install. After that it should patch the issue and be fixed.
diff --git a/node_modules/xcode/lib/pbxProject.js b/node_modules/xcode/lib/pbxProject.js
index 068548a..b478056 100644
--- a/node_modules/xcode/lib/pbxProject.js
+++ b/node_modules/xcode/lib/pbxProject.js
@@ -1678,8 +1678,7 @@ function correctForFrameworksPath(file, project) {

 function correctForPath(file, project, group) {
     var r_group_dir = new RegExp('^' + group + '[\\\\/]');
-
-    if (project.pbxGroupByName(group).path)
+    if (project.pbxGroupByName(group)&&project.pbxGroupByName(group).path)
         file.path = file.path.replace(r_group_dir, '');

     return file;
kiorq commented

still hasn't been resolved yet?

RejoV commented

If you or anyone else is still having this issue and can share a minimal reproduction of it, I would be happy to try to help.

Minimal reproductions steps:

  1. After creating app and installing async-storage package
  2. Create a root file called by App.js followed by 2 screen namely home & profile
  3. In root based. Initially call async get item in useEffect hook.
  4. Based on value present in get item show appropriate screen.
    When these steps are followed error is showing.
    I'm using react-native 0.76.3 and @react-native-async-storage/async-storage ^2.1.0.

Thanks in advance for the help.

Also experiencing this same issue.