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

fix: use appStoragePath instead of cachesPath, as cachesPath is cleared with every release #47

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

bryanoltman
Copy link

@bryanoltman bryanoltman commented Sep 12, 2023

This changes our state.json storage location from /data/user/0/com.example.android_clientid/code_cache/shorebird_updater to /data/user/0/com.example.android_clientid/files/shorebird_updater. This is necessary because the code cache directory is cleared on every new release (see https://developer.android.com/reference/android/content/Context#getCodeCacheDir())

Fixes shorebirdtech/shorebird#1239

@eseidel
Copy link

eseidel commented Sep 12, 2023

This will also move all the code. I'm not sure if that's what we want? (I guess we already, at least partially, guard against our cached code being used with a non-matching app? (But only based on release version, not code contents). A "better" solution might be to pass both paths down to C++/Rust and store the state.json in one and the code in another?

@bryanoltman
Copy link
Author

@eseidel updated, with shorebirdtech/updater#84

@bryanoltman bryanoltman merged commit 6fbe0a4 into shorebird/dev Sep 12, 2023
1 check passed
@bryanoltman bryanoltman deleted the bo/cache-dir branch September 12, 2023 20:24
eseidel pushed a commit that referenced this pull request Sep 19, 2023
…ed with every release (#47)

* fix: use appStoragePath instead of cachesPath, as cachesPath is cleared with every new release

* Provide both app storage and code cache directory to updater

* bump updater rev
eseidel pushed a commit that referenced this pull request Sep 21, 2023
…ed with every release (#47)

* fix: use appStoragePath instead of cachesPath, as cachesPath is cleared with every new release

* Provide both app storage and code cache directory to updater

* bump updater rev
eseidel pushed a commit that referenced this pull request Oct 2, 2023
…ed with every release (#47)

* fix: use appStoragePath instead of cachesPath, as cachesPath is cleared with every new release

* Provide both app storage and code cache directory to updater

* bump updater rev
eseidel pushed a commit that referenced this pull request Oct 19, 2023
…ed with every release (#47)

* fix: use appStoragePath instead of cachesPath, as cachesPath is cleared with every new release

* Provide both app storage and code cache directory to updater

* bump updater rev
felangel pushed a commit that referenced this pull request Oct 26, 2023
…ed with every release (#47)

* fix: use appStoragePath instead of cachesPath, as cachesPath is cleared with every new release

* Provide both app storage and code cache directory to updater

* bump updater rev
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

Successfully merging this pull request may close these issues.

client_id changes across releases
2 participants