Software Archive
Read-only legacy content
17060 Discussions

Issue with Web SQL on Device (Android)

Kyle_C_
Beginner
1,481 Views

I'm currently having a major issue using Web SQL. 

When using the emulator, or app preview on device, load times are great. However when I compile the app to apk and run it on my phone, Web SQL usage hangs for several minutes. 

I'm not too sure why this is, and I'm wondering if anyone has had similar issues.

0 Kudos
8 Replies
Hamilton_Tenório_da_
Valued Contributor I
1,481 Views

I use websql in some apps and I do not have an issue as you tell. For me, the response is very quickly.

What plugin you use? I am using com.brodysoft.sqliteplugin.

 

 

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
1,481 Views

Bad news: this plugin seems to be with problem. I can´t to build anymore my apps to Android since today morning. I am trying to find a solution.

0 Kudos
PaulF_IntelCorp
Employee
1,481 Views

Hamilton, can you provide a ZIPped sample project that reproduces the build problem? I'm guessing that you are referencing the plugin without any version information, and the plugin has changed since you last did a successful build. If you can reproduce this using the blank project, that would be great, otherwise, some variant of your own project that can be shared.
 

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
1,481 Views

I think I made a confusion during my tests. The plugin with problem is https://github.com/cmackay/google-analytics-plugin, not com.brodysoft.sqliteplugin... Sorry about it.

I made all the tests again. I got my backup (complete) and I removed one by one plugin. The problem is with this one (analytics).

Visiting the site of the plugin, I saw an update (release 0.1.16 updates android dependency)

iOS is not affected.

I tested others apps with the same plugin and all of them show the same error in Android.

What means this version (0.1.16) of com.cmackay.plugins.googleanalytics???

I sent to you a link (private) with the complete project.

0 Kudos
PaulF_IntelCorp
Employee
1,481 Views

Hamilton, my guess is this change is what is causing the problem: https://github.com/cmackay/google-analytics-plugin/commit/eddf19abb89bcf3565a03b38da3acbf1fb90f6c6

I changed the reference to the analytics plugin to point to an earlier commit in the repo and was able to successfully build the app. Unfortunately, the repo does not contain any commit tags, so it's a bit of a guessing game. But I think my guess was a safe one. I specified this commit as part of the plugin reference:

https://github.com/cmackay/google-analytics-plugin.git#fedc6a6dfe1bcbe5e2874b5ec7c742fe7a6ab438

(here's the entire commit number: fedc6a6dfe1bcbe5e2874b5ec7c742fe7a6ab438)

Which corresponds to the July 28th commit on this page: https://github.com/cmackay/google-analytics-plugin/commits/master

Although, the one corresponding to the May 25th commit is probably closer to what you were actually using, but the one I chose was safe since it wasn't modifying the actual code in the plugin.

I think the changes he made recently are intended for use with a CLI 5 build system, which we will support in our next release; but I did not check against that.

We are making changes in our plugin management that will minimize these sorts of problems. When you specify a plugin without any version or git commit tags you are getting "the latest" -- which isn't always the right thing to use. This is especially problematic with GitHub repos, since they are subject to frequent changes, sometimes breaking working code. So the new plugin management system will clone a copy of any plugin you specify and use that copy for all builds. This would have resolved your issue, since you would have continued to use the "original" copy of the plugin from the repo, despite the fact that it kept changing.

Regardless, even with that change, you should try to specify a version for each plugin, to be sure you know what you're working with.

Note the key comment regarding the reason for the recent change:

Remove dependency and use cordova framework tag

petarov authored

As described at https://github.com/MobileChromeApps/google-play-services, the google play services plugin is deprecated. Plugins should now use the framework tags instead.

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
1,481 Views

@John> thank you for the big analisys. One more question: can I indicate the plugin version (external, git)?

0 Kudos
PaulF_IntelCorp
Employee
1,481 Views

Yes, using the technique I described. Rather than specifying the plugin as "https://github.com/cmackay/google-analytics-plugin.git" when you add it as a third party plugin that is located in a repo, you specify the location as: "https://github.com/cmackay/google-analytics-plugin.git#fedc6a6dfe1bcbe5e2874b5ec7c742fe7a6ab438"

Note, the forum keeps changing my reference into a truncated link, so remove the spaces from this to get what you want:

https://github.com/cmackay/google-analytics-plugin.git # fedc6a6dfe1bcbe5e2874b5ec7c742fe7a6ab438

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
1,481 Views

I understand now. I didn´t know about this possibilitie. Thanks again. I will try just now.

0 Kudos
Reply