adobe / aio-cli-plugin-app

Create, Build and Deploy Cloud Native Applications
Apache License 2.0
19 stars 35 forks source link

macOS: Safari: aio app run --local testing in the browser issue #335

Open shazron opened 3 years ago

shazron commented 3 years ago

See related: #311

Environment

Safari 14 macOS aio-cli 5.0.1

Description

The url to go in the browser is:

To view your local application:
  -> https://localhost:9080
To view your deployed application in the Experience Cloud shell:
  -> https://experience.adobe.com/?devMode=true#/custom-apps/?localDevUrl=https://localhost:9080

However, by going to https://localhost:9080 and trying to run an action in the browser, you will get a Not allowed to request resource error in the developer console, which prevents the browser from connecting to the Openwhisk server at http://localhost:3233 (note the http).

JavaScript Console Errors:

[Error] Fetch API cannot load http://localhost:3233/api/v1/web/guest/realisticazureboar-0.0.1/foo due to access control checks.
[Error] Error: – TypeError: Not allowed to request resource

Investigation

Mixed content has been disabled since Safari 9, and there is no way to disable it in developer tools or website settings.

Fix/Workaround

Future fix: you can track Webkit bug 171934 to see if the proposed patch lands in a future version of Webkit/Safari.

The only workaround is to use any other browser besides Safari.

meryllblanchet commented 3 years ago

@duynguyen another candidate for the Troubleshooting guide :) wdyt?