Capacitor: bug:

Created on 30 Jan 2020  ·  6Comments  ·  Source: ionic-team/capacitor

Bug Report

Capacitor Version

npx cap doctor output:
Latest Dependencies:

@capacitor/cli: 1.4.0

@capacitor/core: 1.4.0

@capacitor/android: 1.4.0

@capacitor/ios: 1.4.0

Installed Dependencies:

@capacitor/core 1.4.0

@capacitor/cli 1.4.0

@capacitor/android 1.4.0

@capacitor/ios 1.4.0

Affected Platform(s)

  • [x] Android
  • [ ] iOS
  • [ ] Electron
  • [ ] Web

Current Behavior

I require a secure server connection to use a library which requires web crypto (auth0). To do so, I am running live-reload on android using ionic capacitor run android -l --external --ssl. This starts a secure server at https://my.ip.address:8100

My app launches, the splash screen loads, and then the splash screen times-out to a blank white page with no content:

<html>
    <head></head>
    <body></body>
</html>

I receive no error logs in Android Studio or in chrome developer tools.

The application loads fine in browser when I navigate to the url.

Expected Behavior

I expect the app to load normally.

Reproduction Steps

  • Create Android capacitor project
  • Run ionic capacitor run android -l --external --ssl
  • Try to run the project on the Android emulator
  • Blank screen

Other Technical Details

npm --version output: 6.13.4

node --version output: v13.5.0

Most helpful comment

live reolad with ssl flag is an ionic feature, not a capacitor feature, so again, this is not a capacitor bug

All 6 comments

that's because the webview won't allow navigation if using self signed certificates, and that's something we won't allow.
But we are working in making the WebViewClient configurable or let plugins implement some of it's methods so you users can use it for allowing self signed certificates (under their own risk) , see https://github.com/ionic-team/capacitor/issues/2230

I also found some info about manually signing a certificate using your own certificate authority, and then adding that certificate authority to Android via the security settings. However, this was complicated, and I got stuck.

I ended up solving this in a way that allowed me to not use https when debugging locally. But I'm looking forward to the feature you mentioned.

@jcesarmobile sorry ahead of time if this sounds rude. This is a bug with a potential feature solution that has not yet been solved. It should not be closed until the feature is implemented, and a solution is tested.

Because this bug is referenced in your feature, it can be automatically closed on a merged PR. Closing this issue only artificially deflates your # of open issues, and makes it more difficult for developers with the same issue to search.

no, not allowing self signed certificates is not a bug, sorry.

There is an issue to allow users to change the WebViewClient and it's open, so track that one.

@jcesarmobile the issue (or bug) is: live reload with the external and ssl flags does not work on Android because self-signed certificates are not allowed.

There is absolutely a bug. And your proposed feature very well could fix it.

If your team decided not to prioritize the feature that you suggested, this bug could be closed with no solution and a "self-signed certificates are not on the road map"

live reolad with ssl flag is an ionic feature, not a capacitor feature, so again, this is not a capacitor bug

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natevw picture natevw  ·  3Comments

Hansel03 picture Hansel03  ·  3Comments

mlynch picture mlynch  ·  3Comments

daniel-lucas-silva picture daniel-lucas-silva  ·  3Comments

json-derulo picture json-derulo  ·  3Comments