Comments (3)
I am running in to a problem where I get this ERROR:
Unable to begin transaction: cannot start a transaction within a transaction.
It's really a bummer. 😞
From the past 4-5 years of supporting this plugin I have never seen such an error before. Given the level of testing we have done in the test suite, others (such as Nolan Lawson) have done with the PouchDB adapter, and number of users in the field I would be extremely surprised to see this as a bug in the CoffeeScript/JavaScript part.
Considering that this is a multi-page app, my theory is that this happens if the JavaScript part starts a transaction and then the app goes to another page before the transaction finishes.
In case of a multi-page app I think the safest workaround is to execute all SELECTs and changes using db.executeSql instead of using the standard transaction mechanism.
from cordova-sqlite-ext.
Dude. this is too wierd. I thought the answer was to use JS Promises - so I re-worked the code and the thing still happened (!?!)
frustrating.
So I ended up back here and tried the last paragraph in your response above - and I think that is the answer - so far it is working.
But why do I seem to think you have to use the standard transaction mechanism? Do you know? Is it a rule or standard for sqlite? Or what?
thanks
- Sandi
from cordova-sqlite-ext.
I would like to continue the discussion in storesafe/cordova-sqlite-storage#666 which I just opened on the main cordova-sqlite-storage version (sorry for the symbolism here).
from cordova-sqlite-ext.
Related Issues (20)
- New android apk does not update the device db. Is this normal? HOT 2
- IOS Shared App Group, how to? HOT 2
- issues in windows UWP HOT 2
- update populated database HOT 1
- cascading selects HOT 1
- Any plans to support the sqlite spatial extensions? HOT 2
- Cordova IOS insert/select out of column order. HOT 1
- Failed added plugin to [email protected] HOT 3
- Getting error while building after adding [email protected] HOT 1
- any reports of hangs with [email protected] and later ? HOT 9
- Cannot Open pre populated database. HOT 1
- Background thread per db
- Using the plugin with Ionic v4/v5
- Support for Android SDK v30 HOT 21
- DB not opening on oneplus7t Pro, Vivo V2050, RealMe 7i HOT 2
- Could not open database
- Query with RENAME breaks on Android 8, 9 and 10, but only with new versions HOT 1
- Google API Level 33 support HOT 1
- adding support electron
- Question about futures versions of iOS/Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-sqlite-ext.