-
Notifications
You must be signed in to change notification settings - Fork 521
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
new transaction is waiting for open operation on Android #184
Comments
I ran into similar issues (on Android only) when trying to access a database downloaded at application start. I hit 3 main gotchas.
so what evetually worked for me was
pretty weird that the parameters are so different between the 2 platforms |
@hitgeek thank you for this detailed answer. Issue fixed! |
I had the same problem on Android. The This is what I'm using, on both Android and iOS:
On Android 7.0, the database will be saved to |
So I've been trying to open up an sqlite database. Everything worked perfectly fine on iOS, but the problem is with Android. It seems that it can't find database file anyhow. I've tried probably 100 different ways and none of them worked. All I need to do is to just read data from the database. There's no need for me to write any data to database. The thing is that I can't really put database sqlite file in the assets folder, because database file is being downloaded over the internet when the app is launched. I am using react-native-fs package to download db file. I then save it to "RNFS.ExternalDirectoryPath/maps" folder.
From my understanding, this is how the DB should be opened on Android:
SQLite.openDatabase({ name: "dbname.sqlite", createFromLocation: "/data/com.app_bundle_name/files/maps/dbname.sqlite", readOnly: true });
But whenever I'm trying to run executeSql method, I get this: "new transaction is waiting for open operation". I've tried running a debugger and it seems that it can't find this file. Please, whoever has any ideas, help me out. I am out of ideas what to do. Thank you!
The text was updated successfully, but these errors were encountered: