Cordova Slack Digest

Sat, 28 Aug 2021 08:20:50 GMT

User count: 4598

Join the conversation at slack.cordova.io

Channel #random (1 messages)


Fri, 27 Aug 2021 19:41:50 GMT

@erikyuzwa says

@erikyuzwa has left the channel

Channel #general (12 messages)


Fri, 27 Aug 2021 08:41:44 GMT

@sinan.demir says

Hello there,

I upgraded to cordova-ios version 6.2.0. I'm having a problem.

I was downloading application files to “dataDirectory” directory and redirecting here.

WKWebView blocks this. I am getting the following error: “Not allowed to load local resource: file://Users/.....”.

Is there any way I can get around this problem?

Thank you so much.

Fri, 27 Aug 2021 13:07:43 GMT

@sinan.demir says

I'm writing my files into the “cordova.file.dataDirectory” directory. There is no problem with that.

ie “file://Users/......../Library/NoCloud/www/index.html” to this directory.

But when I redirect to this directory with the “window.location.replace(url)” function, I get an error:

“Not allowed to load local resource: file://Users/......../Library/NoCloud/www/index.html

Fri, 27 Aug 2021 13:10:24 GMT

@norman137 says

WKWebview will only allow reading from iOS bundle container.

Fri, 27 Aug 2021 13:15:28 GMT

@sinan.demir says

UIWebView was allowing this.

We distribute our applications in-house.

This affected us very badly. Disabled our auto-update build.

I couldn't find an alternative solution.

Fri, 27 Aug 2021 13:19:56 GMT

@norman137 says

UIWebView did allow it by default, WKWebView disallows it by default. Cordova simply uses the default behaviour.

I think the behaviour on WKWebView can be overridded via https://developer.apple.com/documentation/webkit/wkwebview/1414973-loadfileurl?language=objc but Cordova doesn't offer any preference to set this, so cordova-ios will have to be forked.

Fri, 27 Aug 2021 15:20:07 GMT

@jcesarmobile says

If you use the scheme instead of file, you can create a plugin that returns your files

Fri, 27 Aug 2021 15:21:08 GMT

@jcesarmobile says

https://github.com/apache/cordova-ios/commit/1e331b70afc66f1679d27535d8534edfd03a510f|https://github.com/apache/cordova-ios/commit/1e331b70afc66f1679d27535d8534edfd03a510f

Fri, 27 Aug 2021 15:34:22 GMT

@norman137 says

^ might be a better solution than forking and maintaining your own forked version of cordova-ios

Fri, 27 Aug 2021 15:45:43 GMT

@erisu says

^

Fri, 27 Aug 2021 15:54:33 GMT

@jcesarmobile says

Or even having your own webview plugin, cordova-plugin-ionic-webview is also able to load downloaded files with its own scheme handler

Fri, 27 Aug 2021 21:57:06 GMT

@intjose_123 says

I have a question, I have been stuck for a couple of days, someone has worked with the device flash.

I tried https://www.npmjs.com/package/cordova-plugin-flashlight|https://www.npmjs.com/package/cordova-plugin-flashlight and it works fine, but it does not work well on Android cell phones, especially when they are old, I activate it but the lamp does not light.

I hope you can help me,

Thanks.

Fri, 27 Aug 2021 22:26:40 GMT

@norman137 says

First thing is to determine if there is an error being printed in the JS console. Not all phones support the flash lamp.

I think the app also requires to have the camera permission since the lamp is part of the camera API.

Channel #testing (12 messages)


Fri, 27 Aug 2021 09:38:04 GMT

@erisu says

The paramedic appium tests are failing but we could disable them for now IMO. All of our plugins and the plugin repo you showed do not have nor run Appium tests. Turning it off might be the quickest solution to pass the last issue and we can return to it later. But with it off, paramedic now finished successfully.

Fri, 27 Aug 2021 19:49:40 GMT

@zach657 says

Hey @erisu Thanks for your notes I didn’t have notifications turned on.

Here is the PR I just opened. https://github.com/apache/cordova-plugin-test-framework/pull/56

Fri, 27 Aug 2021 19:53:01 GMT

@zach657 says

Also regarding the CI and other work you mentioned. I don’t see the branches or forks. I’m open to collaborating on that if I can.

As I mentioned before I’ve done something, regarding the GitHub Actions. However I noticed the the TravisCI is currently doing much more than what I’ve been doing. https://github.com/SwitchCaseGroup/cordova-plugin-statusbar/actions/runs/1175422802

Fri, 27 Aug 2021 19:53:58 GMT

@zach657 says

Oh.. I think I found your branch: https://github.com/erisu/cordova-paramedic/tree/feat/gh-actions

Fri, 27 Aug 2021 19:59:13 GMT

@zach657 says

yes.. and the changes here look to be much clearer. I’m going to close my PR against cordova-plugin-testing-framework https://github.com/erisu/cordova-paramedic/compare/feat/gh-actions

Sat, 28 Aug 2021 03:35:01 GMT

@erisu says

Cool 👍 I think we will be able to merge this in.

In the past, I had added the scheme and hostname preference options to the cordova-plugin-test-framework, to resolve the iOS issues.

But while looking into Android, with a fresh view, I started to think the paramedic-plugin was the better choice. This plugin appears to be added for all platforms and is responsible for the test results reporting. I think it might be the plugin that should manage the scheme & clearText settings. And the bonuse is that this plugin is in the same repo. Keeps all these changes together.

After this merge, I believe I can also revert my iOS scheme changes from cordova-plugin-test-framework as well.

Sat, 28 Aug 2021 03:37:59 GMT

@erisu says

I would like to get the Appium tests to work again, but I can look into this issue on a seperate PR.

Cordova's core plugins do not have any Appium tests for Android, and this is why I turned it off for now.

Only paramedic had some tests to confirm it working. Just for a reference, if you wanted to see the failing Appium tests, you can remove this flag "skipAppiumTests": true from this file conf/pr/local/android-11.config.json

https://github.com/apache/cordova-paramedic/compare/feat/gh-actions...erisu:feat/gh-actions#diff-07a8f1fa30370a392b34893f29773dec8de2c68d2e6406964d59ede3328f365dR6|https://github.com/apache/cordova-paramedic/compare/feat/gh-actions...erisu:feat/gh-actions#diff-07a8f1fa30370a392b348[…]d2e6406964d59ede3328f365dR6

Sat, 28 Aug 2021 04:17:38 GMT

@zach657 says

Looking forward to the merge.

I'd like to add GitHub actions running paramedic on the apache public plugins too. So hopefully that is well received.

Sat, 28 Aug 2021 04:19:05 GMT

@zach657 says

Also, really excited about Codespaces, so I'll try to open PRs for those too so that development is easy and at least paramedic can be run for browser and android

Sat, 28 Aug 2021 04:46:19 GMT

@erisu says

Yeah, it will be on the plugins for sure. 🙂

There is just one more thing needed before it can happen. The last thing we need to do for the paramedic repo is adding the test matrix. Once it is added to the paramedic CI configs, then we should just cut and paste them to the plugins. The paramedic CI configs should be for the most part the template of the plugins CI.

This is what Apache Cordova needs to cover in the test matrix:

Android: 5.1, 6, 7, 7.1, 8, 8.1, 9, 10, 11, (12) iOS: 12.5.4, 13.7, 14.7.1

All in all, I am excited to finally see us completing the migration to GH Actions. We have been working on this task for quite some time and I believe these were the remaining repos. It was also the most challenging.

The plugins should be getting the changes real soon.

Sat, 28 Aug 2021 05:59:11 GMT

@erisu says

In your plugin’s action run, I see you also copied our action workflow.

Just a heads up, for the Android workflow, I updated the the macos setting back to masos-latest. I also removed the emulator-build pinning. I set these before and thought the issues were related to the GH link I posted in the workflow config file. But your older configs used the latest and worked. I think it was the clearText that resolved the original issue I saw.

Sat, 28 Aug 2021 06:32:22 GMT

@erisu says

Also, I might remove the caching step.

I like the idea of caching to speed up the CI, but for Apache Cordova this might not be possible. For your own plugin, if you are only testing against one API level, then it should be OK to keep. You might want to improve the caching key though.

Why I think we cant support caching on Apache is because we need to support a large test matrix. This will surpass the allowed caching limit.

> A repository can have up to 5GB of caches. Once the 5GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last week will also be evicted. Here is an example avd file size I have locally. All newly created and never launched.:

2.5G    Pixel_2_API_23.avd
1.0G    Pixel_3_API_26.avd
523M    Pixel_4_API_29.avd
524M    Pixel_4_API_30.avd
525M    Pixel_4_API_31.avd```
This alone totals up to around 7.5GB, this also covers 5 of the 10 versions I listed earlier.

Most likely on each run it wont find the cache because it was evicted. Also we only talking about Android here.

Channel #production-questions (2 messages)


Fri, 27 Aug 2021 16:46:12 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:46:16 GMT

@erisu says

@erisu has left the channel

Channel #help (1 messages)


Fri, 27 Aug 2021 16:01:12 GMT

@erisu says

@erisu has renamed the channel from “helpplease” to “help”

Channel #cordova_hosted_apps (2 messages)


Fri, 27 Aug 2021 16:47:41 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:47:45 GMT

@erisu says

@erisu has left the channel

Channel #css (2 messages)


Fri, 27 Aug 2021 16:47:21 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:47:26 GMT

@erisu says

@erisu has left the channel

Channel #cordova-firebase (2 messages)


Fri, 27 Aug 2021 16:47:58 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:48:02 GMT

@erisu says

@erisu has left the channel

Channel #tech_probs (2 messages)


Fri, 27 Aug 2021 16:44:55 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:45:01 GMT

@erisu says

@erisu has left the channel

Channel #ios-platform-help (3 messages)


Fri, 27 Aug 2021 16:45:46 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:45:52 GMT

@erisu says

@erisu has left the channel

Fri, 27 Aug 2021 19:41:39 GMT

@erikyuzwa says

@erikyuzwa has left the channel

Channel #browser-platform-help (2 messages)


Fri, 27 Aug 2021 16:51:12 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:51:16 GMT

@erisu says

@erisu has left the channel

Channel #windows-platform-help (2 messages)


Fri, 27 Aug 2021 16:50:01 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:51:03 GMT

@erisu says

@erisu has left the channel

Channel #help- (2 messages)


Fri, 27 Aug 2021 16:43:07 GMT

@erisu says

Due to the low activity in this channel, we will be archiving this channel within a week. For help, I would suggest trying the <#C0GJFTJP6|help> channel.

Fri, 27 Aug 2021 16:43:56 GMT

@erisu says

@erisu has left the channel