Companion error when using https protocol in builder

Hello Everyone,
Actually I applied this push in my builder https://github.com/mit-cml/appinventor-sources/pull/2065, everything working fine, but when I use Companion App to live test app, it gives me this error “Enable to load project ode/project…” this error shows when I am using assets in app.
So anyone can tell how to solve these issues.

Regards,
Kunal Mishra

Yeah facing same issues IMG_20200526_173832
How we can solve this issues @ewpatton ?

If you’ve enabled HTTPS, you likely need to make sure you’ve got a certificate that is trusted by a root certificate in the trust store on the Android device you’re using to test. You can try using an HTTP URL to confirm that this is the problem. Further, if you’re referencing localhost, localhost will resolve to the phone when the assets are loaded, so you need to use a cert that has a valid domain name that resolves to the server running the App Engine server.

2 Likes

already it is.
and it also works for HTTP protocol but for that, I have to enable Legacy Connection on a Companion app.
But in HTTP protocol without Legacy Connection, it gives the same error as this

So how we can solve these issues same for HTTPS protocols and HTTP, coz in app inventor I have tested with companion without legacy connection it works .
Regards,
Kunal Mishra

The problem is the same in both situations. In WebRTC mode, we send the hostname of the server as seen in your browser. Your phone will need to be able to resolve and route traffic to this server. This is why you can’t use localhost, for example, because localhost always resolves to 127.0.0.1 which will be the loopback on the phone. If you use a private IP address such as 192.168.1.x, and you try to connect to your phone running on the cellular network, this will also fail. Try accessing the same name in the browser on your phone and see if the page will load. Fix that first if it fails.