You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Ionic app which uses this plugin to store data in a single table and I get an issue where I execute a query on the table and I receive no success or error callback instead it just hangs. It has happened on a Samsung S4 and S6 but I dont have a IOS test device so cannot confirm if its the same for IOS as well.
Closing the app and re-opening it opens the DB again and things start working again.
I have no idea what chain of events cause this (it just seems random) so replicating it is hard but my app consists of inserting a single record into said table, selecting ALL from table, updating a single record, and deleting a single record.
Also, it doesn't happen very often so 90% of the time the queries I have written will work as expected.
Just to note:
I use the ng-cordova wrapper class $cordovaSQLite.execute() so that queries get returned as promises.
I'm not working with much data either. It can happen with just 1-5 records in the table.
If you need more info or you want to see code let me know.
Update
I think I've found the cause for this. I have a list in one of my views and for each item there is an option to open it in the native Google maps app on the device. When I click this and then return to the app the database stops working. By not working I mean none of my queries return a success or error callback.
I have never seen an issue like this before and find it really strange. I wonder if the issue is specific to this plugin or if it may affect other plugins such as cordova-plugin-file. You may want to try closing the database before such a window "navigation" event and reopening it when you need to do the database operation.
It is really strange, would be good to know if anybody else has ever experienced this because I don't think any of my code does anything out of the ordinary.
I do make use of the cordova-plugin-file so I will knock up a test method and see what happens. I'm going to be out of office until the new year so won't be able to report back until then.
I just realised I've experienced something like this before when using the Google Maps JavaScript API in an Ionic project and it turned out I didn't whitelist the URL in the config.xml.
i've just added <allow-intent href="*" /> to my config.xml as stated in the cordova-plugin-whitelist docs for when you use window.open() and I think that has now fixed it, shall I delete this issue now?
I have an Ionic app which uses this plugin to store data in a single table and I get an issue where I execute a query on the table and I receive no success or error callback instead it just hangs. It has happened on a Samsung S4 and S6 but I dont have a IOS test device so cannot confirm if its the same for IOS as well.
Closing the app and re-opening it opens the DB again and things start working again.
I have no idea what chain of events cause this (it just seems random) so replicating it is hard but my app consists of inserting a single record into said table, selecting ALL from table, updating a single record, and deleting a single record.
Also, it doesn't happen very often so 90% of the time the queries I have written will work as expected.
Just to note:
If you need more info or you want to see code let me know.
Update
I think I've found the cause for this. I have a list in one of my views and for each item there is an option to open it in the native Google maps app on the device. When I click this and then return to the app the database stops working. By not working I mean none of my queries return a success or error callback.
My code that opens the native map is:
The text was updated successfully, but these errors were encountered: