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

use cacheDir for setting TMPDIR env to solve android 12 issue #25

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SebastianSingle99
Copy link

sqlite3.c tries to use the TMPDIR environment variable which resolves to /data/user/0/<app-id>/cache except for Android 12 devices. I'm not sure if this is a bug in android, but it leads to this error message:

WebSQL threw an error [Error: [react-native-quick-sqlite] SQL execution error: disk I/O error

sqlite cannot write the temporary file, because it cannot find a valid file path.

This pull requests overwrites the TMPDIR variable explicitly with the cache directory. Any other ideas or solutions are welcome.

@gegana
Copy link

gegana commented Oct 19, 2023

I noticed this exact problem as well and had to configure the temp store to be in memory. I think this problem has existed even before the ownership transition.

PRAGMA temp_store = memory;

@EduFrazao
Copy link

I noticed this exact problem as well and had to configure the temp store to be in memory. I think this problem has existed even before the ownership transition.

PRAGMA temp_store = memory;

Yes, its a know problem with the same workaround in different libraries. On android, TEMP STORE is set to temp.

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.

None yet

4 participants