Skip to content

Updated to version 1.8.0 but data doesn't copy #305

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

Closed
nicomontanari opened this issue Feb 25, 2020 · 14 comments
Closed

Updated to version 1.8.0 but data doesn't copy #305

nicomontanari opened this issue Feb 25, 2020 · 14 comments

Comments

@nicomontanari
Copy link

Current behavior

The warning says:
Failed to copy old storage directory to new storage directory location during migration: Error Domain=NSCocoaErrorDomain Code=4 "The file "RCTAsyncLocalStorage_V1" doesn't exist""

Environment

  • Async Storage version: 1.8.0
  • React-Native version: 0.61.5
  • Platform tested: iOS
@chiendh1
Copy link

I got the same issue

@krizzu krizzu added the LEGACY label Feb 25, 2020
@krizzu
Copy link
Member

krizzu commented Feb 25, 2020

Yes, we're aware of the issue,
Here's the PR that fixes that:
#303

@cx5168
Copy link

cx5168 commented Feb 26, 2020

I got the same issue

@krizzu
Copy link
Member

krizzu commented Feb 28, 2020

Version v1.8.1 is released, please try that one

@ck86
Copy link

ck86 commented Mar 9, 2020

Upgraded to 1.8.1 (coming from 1.6.3), but the data is still not migrated.

@cx5168
Copy link

cx5168 commented Mar 9, 2020

use the v1.7.1.

@ck86
Copy link

ck86 commented Mar 9, 2020

use the v1.7.1.

Not really an option to stay on an old version forever because the migration does not work?

@krizzu
Copy link
Member

krizzu commented Mar 9, 2020

@ck86
Can you give some more hints of what you see?

@ck86
Copy link

ck86 commented Mar 9, 2020

@ck86
Can you give some more hints of what you see?

Somehow on my first try to upgrade from <1.8 to 1.8.1 failed, but later on it worked. I don't know why.

Unfortunately we already published an app with 1.8.0 where the migration failed.
I will now publish another version which the app tries to migrate the old data manually by checking whether the manifest.json exist or not in "RCTAsyncLocalStorage_V1" directory.

@krizzu
Copy link
Member

krizzu commented Mar 9, 2020

Unfortunately we already published an app with 1.8.0 where the migration failed.

Sorry to hear that.

I will now publish another version which the app tries to migrate the old data manually by checking whether the manifest.json exist or not in "RCTAsyncLocalStorage_V1" directory.

In your case, publishing version with AsyncStorage 1.8.1 won't work?

@ck86
Copy link

ck86 commented Mar 9, 2020

As far as I understood is that AsyncStorage >= 1.8 will not migrate old data when the manifest.json already exists in the new directory (Application Support/com.example/...?)

@krizzu
Copy link
Member

krizzu commented Mar 10, 2020

I'm afraid so, in that scenario, the migration is "done".

I think we only check if RCTAsyncLocalStorage_V1 directory is created there, instead checking if manifest.json is in place. Not sure if manifest.json check would change anything in this situation.

@ck86
Copy link

ck86 commented Mar 10, 2020

Not sure what is actually checked, but this is what was mentioned in the release:

This feature also includes a migration process. On app startup, a check is run to see if Application Support contains the manifest file:

  • If it does, do nothing
  • if it does not, copy over the manifest from previous location (either NSDocumentDirectory or NSCachesDirectory)

Anyway, when the new storage location is used the old one is not checked anymore. I could switch between my Apps in Testflight and saw different states of the app.

@ck86
Copy link

ck86 commented Mar 10, 2020

Regardless of my issue which I solved by manually migrating the data, I think 1.8.1 fixed this issue. :)

@krizzu krizzu removed the LEGACY label Apr 12, 2020
@krizzu krizzu closed this as completed Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants