Skip to content Skip to sidebar Skip to footer

Debug Service Worker With Chrome On Android Mobile

I'm developing a progressive webapp and, in order to make sure it's working on mobile device (and particularly on Chrome for Android as it's 90% of users), I'm trying to test servi

Solution 1:

From the other StackOverflow post you're referring to, I can see the solution is in the question.

You need to add a Certificate Authority crt to your Android trust list.


Why specifically a Certificate Authority .crt ?

Simply because Android only accepts CA certificates.


How do I get a CA certificate?

Normally, a Certificate Authority (CA) acts as a trusted third party. For debug purpose, you can act as a CA to issue self-signed certificate yourself.

  1. Create a root key: openssl genrsa -des3 -out rootCA.key 4096 (warning : anyone holding this can sign certificates on your behalf !)

  2. Create and self sign the Root Certificate: openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.crt

Remember that your webapp's SSL certificate needs to be generated with that same self-created CA.


Install certificate on Android device

Once you got your .crt file, copy it inside your device. Then go to Settings > Security > Install from storage. It should detect the certificate and let you add it.

To make sure it's installed correctly, go to Trusted Credentials > User.

Solution 2:

I solved this problem by portforwarding. You can find further info in my original answer here: https://stackoverflow.com/a/56146180/5048121

Post a Comment for "Debug Service Worker With Chrome On Android Mobile"