use cacheDir for setting TMPDIR env to solve android 12 issue
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
- related sql error code 10 - io Error
- extended sql error 6410 , see https://www.sqlite.org/rescode.html#ioerr_gettemppath
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.
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;
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.