-
Notifications
You must be signed in to change notification settings - Fork 715
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
Cannot call method 'transaction' of null #355
Comments
Is missing something like: db = $cordovaSQLite.openDB("my.db");
$cordovaSQLite.execute(db,... |
I'm opening the db:
|
I am also getting the same error as soon as application loads. |
Looks like an installation problem. |
Hello @brodybits, and how could I solve this? |
Please start with a fresh, clean project and run a very simple test program. You may have to try one thing at a time to find out what is causing the problem. |
Hello @brodybits, can solve this error. What was happening to me was a keyboard error before initializing the database so db was nil. I installed the plugin ionic-plugin-keyboard keyboard. Thank you for your help. |
@lucascardoso happy to hear! Can you do us a favor and describe how you the keyboard error happened? I would like to get this documented somewhere since it may help others. Thanks! |
The error appeared that every time the application initializing. This was the error: Thank you @brodybits. |
I had the same exact problem as @lucascardoso where I was getting the error below (output from Genymotion with the 'adb logcat' command. Tried everything. Most of a day wasted on this. The fix was adding the ionic-plugin-keyboard
|
I just added a note to README.md and raised a question on the Ionic forum at: https://forum.ionicframework.com/t/keyboard-error-and-cordova-plugins/39851 (edited to add a question if I should raise this on the Ionic and/or Ionic2 project on Github) I am waiting for an answer from Ionic. Guys it would help if you can add comment(s) of support to my question and/or raise an issue on Github if you think it is appropriate. Closing since this does not seem to be fault of this plugin. |
I also published brodybits / Cordova-quick-start-checklist and brodybits / Cordova-troubleshooting-guide with this issue documented. |
I had the same issue, after a long search i found out that the root cause is in the "$ionicPlatform.ready", reach this method doesn't mean that the device is actually ready, this is an issue especially when dealing with cordova plugins. check the reference in the link below: http://gyf1.com/blog/2015/06/22/initialize-angularjs-app-after-deviceready/ I solved my issue by using "document.addEventListener" in the beginning of my controller to start my database: document.addEventListener("deviceready", function () { $scope.notes = []; }, false); |
sometimes do reinstall platform is working... ionic platform rm android, ionic platform add android |
@brodybits : I am having the same issue. I have installed cordova 6.1.0 and ionic 1.7.14 . I have ageGate Validation function that just checks age and then runs the code -
I when I call this function this js error comes. Please help me out |
Hey . I was able to fix the bug . It was not related to any specific cordova plugin but the cordova version. I have recently upgraded my cordova version from 5.x.x to 6.x.x which was a break release (unfortunately) and openDB function which was initially taking database name as a whole and sole required parameter needed to have one more argument 'location' clubbed with database name as json .. Due to this upgradation to break release my db var was getting a null value; and hence this problem. So $cordovaSQLite.openDB("myapp9.db"); needed to be changed with $cordovaSQLite.openDB({name:"myapp9.db", location:'default'}); Changing this solved my problem. |
Thanks @swastikpareek, this definitely needs to be documented. I raised #471 to track this. |
Hi there, |
Thanks @cisdev749 , this solved my problem |
This is due to you are trying to execute another excecutesql or transaction before finishing of current transaction. |
Hi guys, I'm having a problem when it comes to running a query in the database.
this is the query that is executed:
if anyone can help me right now thanks!
The text was updated successfully, but these errors were encountered: