Skip to content

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.

4 participants