-
Notifications
You must be signed in to change notification settings - Fork 714
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
Error when adding sqlite plugin to Crosswalk Cordova HelloWorld example [x86_64] #247
Comments
By default, the Android version uses the sqlite4java library which contains a NDK part. A version was built for x86_64, but it has not been tested yet. The workaround for x86_64 is to specify the |
This project is now tested working OK with x86_64, but for some reason does not seem to work with Crosswalk when using sqlite4java (ref: #235). As I said before, the workaround is to specify the |
Thanks for investigating. For me it seems, the issue is occurring before I call openDatabase or any of the sqlitePlugin methods. The plugin javascript is included by Cordova but that's it. All I did was install the plugin using plugman in the Crosswalk HelloWorld example. |
I was testing this some more and found the sqlite plugin is working for me with Crosswalk when I use the Genymotion Android emulator but not when I use the Android SDK one. All the settings for the SDK emulator seem right and tried both x86_64 and ARM, so not sure what the deal is. I don't have an Android device, so not able to test on that. I also had to use the |
It also works with the Android SDK emulator when I don't use Crosswalk, but then I guess that's the standard Android use case. Also didn't require the two Android-specific initialization options in that case. |
We encounter the same issue from the PouchDB layout which use the Sqlite Plugin and Ionic Crosswalk.. plugins/io.litehelpers.cordova.sqlite/www/SQLitePlugin.js:171 OPEN database: _pouch_Db |
On May 1, 2015 1:03 PM, "ronyrun" [email protected] wrote:
Yes-this is now a known problem-you have to follow the workaround that I |
OK thank you brodybits |
@brodybits The PouchDB test suite can be run against this plugin pretty easily. I had to update it, though, on account of the name change and a few bugs in our test structure: pouchdb/pouchdb#3779 In any case, I can confirm that I can run the tests in both iOS and Android against this plugin, although I didn't run them to completion to see if they are at 100%. Most likely they are not at 100% and that will isolate the bug. :) Anybody have the time/patience to test these? It's literally as easy as:
Then it will run the test in your emulator like so: |
Hm, it gets to 49% and then just stops (Android 4.4 emulator + SQLite plugin). In logcat I see a lot of:
But that's only while it's working. Once it stops working, the last failed test is
^ This is repeated over and over again. |
I'm guessing this is some kind of memory leak, because once I restart the tests it works fine again... for awhile. |
👍
Stupid name changes :-|
Are you using the "normal" Android installation or did you dare to try it with Crosswalk?
Do you think this is (co)rel(l)ated to the plugin? Do you think this is caused by the plugin?
This definitely needs investigation! One thing: as now documented in README.md, if the result set gets too big the JSON encoding/decoding uses too much memory. |
Haven't tried Crosswalk yet. For a Crosswalk-esque experience, though, you can just run a 5.0 emulator. I agree, though, that the best would be to test Crosswalk itself, since it is slightly different from the WebView.
The tests pass in WebSQL and IndexedDB in a variety of browsers, so the bug is definitely in this plugin, sad to say. :( Also FWIW, the PouchDB test suite was passing last summer in both iOS (7+) and Android (4.0+), back when I submitted all those fixes. I'm kicking myself now for not adding automated Cordova tests to either PouchDB or this repo. We probably could have caught these bugs earlier. |
@nolanlawson I filed #255 to capture the problems with PouchDB. For this issue I would like to focus on testing this plugin with the Crosswalk version and finding the (root) cause. |
I may be off here, but this may have nothing to do with this plugin, but appears to be specific to cordova 5 and/or the new crosswalk plugin (https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview) . It seems the x86 and armv7 builds are swapped. I created a brand new HelloCordova project using Cordova 5.0.0 and cordova-android 4.0.0, then installed the I tried to dig up where this swap occurs, but I haven't been able to track it down. So I'll be making an exception for now and installing the one labeled with x86... |
@matb33 that sounds entirely possible-though we should keep in mind that |
@trevorpowell can you try running the |
On May 2, 2015 9:01 PM, "Mathieu Bouchard" [email protected] wrote:
Something else: @trevorpowell already was able to get it working on x86_64 IMHO the right way to solve the problem is to build crosswalk-cordova |
I can test using that method and the alternate apk. I was not using Cordova 5 and the Crosswalk plugin for Cordova at the time. I was using Cordova 4.3.0 and following the methods here with Crosswalk 11x: The x86_64 Crosswalk HelloWorld app I built worked fine on an x86_64 Android 21/22 SDK emulator but then stopped working when I installed the sqlite plugin (just installing the plugin, not calling |
The issue still occurs for me on the Android SDK emulator when I follow the Crosswalk HelloWorld guide and install the sqlite plugin, but works fine if I start from Cordova and install the Crosswalk webview plugin or if I use the Genymotion emulator. I am fine with closing this issue as the second method is probably the better way to go anyways. |
At the very least this issue really has to be documented in README.md which @ronyrun can you report if this workaround will also work for you or not? |
With regards to my particular issue that I thought was related, you can dismiss... turns out the Nexus Player is actually an x86 device. I assumed it was like all others and was arm... |
@ronyrun can you report if this workaround will also work for you or not? YES IT WORKS 👍 |
|
I think there are 2 separate issues being discussed on this thread. PROBLEM 1 (as reported by @trevorpowell)
However, when I use the following combination, it works fine:
Notice, that the only difference is the version of sqlite plugin. In other words, there's a problem introduced with the 0.7.10 version of SQLite plugin on x86 platform that needs to be fixed. (On ARM7, either configuration works just fine.) PROBLEM 2 (as described by @brodybits) Ideally, both problems should be fixed soon, since neither workarounds are good long terms solutions. |
I am following the steps to create the Crosswalk Cordova HelloWorld project and adding the sqlite plugin with plugman as documented here:
https://crosswalk-project.org/documentation/cordova/develop_an_application.html
Using the latest versions for everything and all the prerequisites.
The HelloWorld project runs okay in the emulator, but as soon as I install the sqlite plugin with plugman and try running the app again, I get an error "Unfortunately, HelloWorld has stopped." Just installed the plugin. Didn't try to open a database or anything. My emulator is running Android 5.0.1 (API 21) on x86_64. It has 3GB RAM, 512MB for VM Heap, and is using Intel HAXM. Do I need to use ARM instead of x86_64 for the plugin? Any idea what the issue might be?
The log from "adb logcat" when opening the app is below:
The text was updated successfully, but these errors were encountered: