Cordova Slack Digest

Thu, 18 Nov 2021 08:21:15 GMT

User count: 4677

Join the conversation at slack.cordova.io

Channel #general (4 messages)


Wed, 17 Nov 2021 13:15:39 GMT

@norman137 says

Something I personally would like to do, since I think we can be pretty confident that all webviews we support will support Promises.

Wed, 17 Nov 2021 13:17:29 GMT

@norman137 says

But there are kinda more pressing issues at hand... like stabilizing tests. Any plugin that uses <edit-config> tends to cause conflicts on Android because the test framework needs to use <edit-config> as well.

Wed, 17 Nov 2021 13:19:25 GMT

@norman137 says

I‘ve explored some solutions seeing if we can just replace our entire implementation with something more tested but haven’t really found anything that looks promising.

Wed, 17 Nov 2021 17:24:06 GMT

@harel.mazor says

I think it's very straight forward and relatively easy. You can see the following commit: https://github.com/HaylLtd/cordova-background-geolocation-plugin/commit/9baa8236ff143bb0989f3ec4d3f4a0f565240581#diff-3354a87f132f1ef64e275a3b168c584fb51f997f7530dcce938d7c2c1aabd991|https://github.com/HaylLtd/cordova-background-geolocation-plugin/commit/9baa8236ff143bb0989f3ec4d3f4a0f565240581#diff-3354a87f132f1ef64e275a3b168c584fb51f997f7530dcce938d7c2c1aabd991

Channel #cordova-android (2 messages)


Wed, 17 Nov 2021 16:52:05 GMT

@tvanzanten says

Has anyone successfully migrated local storage when upgrading from cordova-android 9.x to 10.x? If so, what plugin did you use? The few I've tried so far do not run on cordova-android 10.1.1

Here‘s the ones I’ve tried: https://github.com/CronApp/cordova-plugin-cronapp-migrate-storage https://github.com/openhealthhub/cordova-plugin-ionic-migrate-storage

Wed, 17 Nov 2021 17:12:18 GMT

@norman137 says

if you just need local storage we used a modified version of https://github.com/totalpave/cordova-plugin-crosswalk-data-migration/tree/totalpave/master

This plugin is more specific for migrating crosswalk webview to cordova-android filesystem webview but the same concept applies. We modified it so that it moves to the https://localhost scheme. The modifications is in totalpave/master branch. The concept is basically finding the old storage directory & files and moving them to the new path. The paths are based on origin scheme. If I recall correctly, the naming scheme for hte databases is &lt;scheme&gt;_&lt;origin&gt;_0.localstorage. So for a filesystem hosted app with null origin as the case with cordova-android@9, then the file name would be file__0.localstorage.

As this plugin was written to migrate from crosswalk, it definitely won't work as is (xwalk had it‘s own directories for this stuff that is different from the system provided webview). Also since you’re migrating from the system webview to system webview with origin scheme....there is another challenge that kinda deserves it's own blog post...

Pre webview 78 chrome uses SQLite databases. >= 78 chrome switched from sqlite to leveldb. Chrome 78 has a pretty severe bug where it didn't migrate sqlite to leveldb leaving old data behind but allowing clients to potentially create new data in leveldb. But chrome >= 79 if you have a sqlite database, you can move it to the appropriate location and chrome will still auto migrate to leveldb afaik. They did hint at me that migration code will be removed sometime in the future but idk if that ever happened.

So basically you need to look for both a leveldb database, or fallback to an sqlite database. But if you find an sqlite database, you should be able to copy/rename it to the appropriate filename and the webview should handle migration to leveldb for you.

Channel #plugins (3 messages)


Wed, 17 Nov 2021 10:04:25 GMT

@zahid2cyborg says

Is there any website that lists all the Cordova plugins?

Wed, 17 Nov 2021 10:04:56 GMT

@zahid2cyborg says

Like how nodejs has a website that lists all their packages

Wed, 17 Nov 2021 11:04:48 GMT

@timbru says

Our current plugin search is, sadly, broken, but you could use the npm search: https://www.npmjs.com/search?q=ecosystem%3Acordova

Channel #cordova-firebase (1 messages)


Wed, 17 Nov 2021 10:03:48 GMT

@zahid2cyborg says

Cordova and Firebase is a good combination