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

[Bug]: Various errors on Android when opening db since upgrading to 11.2.13 #227

Closed
mjmasn opened this issue Jan 22, 2025 · 8 comments · Fixed by #228
Closed

[Bug]: Various errors on Android when opening db since upgrading to 11.2.13 #227

mjmasn opened this issue Jan 22, 2025 · 8 comments · Fixed by #228

Comments

@mjmasn
Copy link
Contributor

mjmasn commented Jan 22, 2025

What happened?

Upgraded from 10.1.0 to 11.2.13 and now calling open on Android seems to give a different error each time.

Some examples:

Exception in HostFunction: filesystem error: in create_directories: Read-only file system [" ۆB|"]
Exception in HostFunction: filesystem error: in create_directories: Read-only file system ["!"]
Exception in HostFunction: <invalid utf-8 exception message>
Exception in HostFunction: filesystem error: in create_directories: No such file or directory [""]

It works fine if the location param is removed from the open() call.

op-sqlite version

11.2.13

React Native version

0.76.5 / 0.77.0

Reproducible Example

https://github.com/mjmasn/FileSystemErrors

@ospfranco
Copy link
Contributor

Create a reproducible example please

@mjmasn
Copy link
Contributor Author

mjmasn commented Jan 22, 2025

@ospfranco sorry had some ssh issues, should be pushed now

@mjmasn
Copy link
Contributor Author

mjmasn commented Jan 22, 2025

Interestingly, location: `${ANDROID_DATABASE_PATH}`, works but not location: `${ANDROID_DATABASE_PATH}folder`, or location: `${ANDROID_DATABASE_PATH}/folder/`, etc.

@ospfranco
Copy link
Contributor

From the error it looks like the file system is somehow in Read only mode, using ANDROID_DATABASE_PATH will not create any folders. Maybe your app is missing disk write permissions?

@mjmasn
Copy link
Contributor Author

mjmasn commented Jan 22, 2025

Don't think it's anything to do with the app, upgrading op-sqlite was the only change I made. I can't repro on 11.2.9 so maybe something to do with #218 ?

Edit actually 11.2.10 works too so probably #219 but looks like you've spotted it already, cheers!

@ospfranco
Copy link
Contributor

Oh yeah... that's failing... weird. I'll fix it

Image

@ospfranco
Copy link
Contributor

New version is out, give it a try

@mjmasn
Copy link
Contributor Author

mjmasn commented Jan 22, 2025

@ospfranco working nicely, thanks again!

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 a pull request may close this issue.

2 participants