aws-samples / non-profit-blockchain

Builds a blockchain network and application to track donations to non-profit organizations, using Amazon Managed Blockchain
Apache License 2.0
373 stars 288 forks source link

UI does not run in Chrome #121

Open radiantone opened 3 years ago

radiantone commented 3 years ago

Hi, Since Cloud9 IDE is loaded over https, when trying to preview the NGO UI and following the instructions to remove/replace https, this generates an error in chrome, which disallows loading assets over http from a parent page loaded over https.

Subsequently attempting to open the preview URL in a new chrome tab using http only results in an error. "VFS connection does not exist". Therefore, the current NGO UI is broken and does not work. Same result in Firefox.

socket.service.ts:37 Mixed Content: The page at 'https://us-east-1.console.aws.amazon.com/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://xxxxxxxxx.us-east-1.elb.amazonaws.com/'. This request has been blocked; this endpoint must be available over WSS.
push../src/app/services/shared/socket.service.ts.SocketService.create @ socket.service.ts:37
push../src/app/services/shared/socket.service.ts.SocketService.connect @ socket.service.ts:31
push../src/app/ui/shared/blockchain/blockchain.component.ts.BlockchainComponent.ngOnInit @ blockchain.component.ts:58
checkAndUpdateDirectiveInline @ core.js:18537
checkAndUpdateNodeInline @ core.js:19801
checkAndUpdateNode @ core.js:19763
debugCheckAndUpdateNode @ core.js:20397
debugCheckDirectivesFn @ core.js:20357
eval @ HeaderComponent.html:47
debugUpdateDirectives @ core.js:20349
checkAndUpdateView @ core.js:19745
callViewAction @ core.js:19986
execComponentViewsAction @ core.js:19928
checkAndUpdateView @ core.js:19751
callViewAction @ core.js:19986
execComponentViewsAction @ core.js:19928
checkAndUpdateView @ core.js:19751
callWithDebugContext @ core.js:20639
debugCheckAndUpdateView @ core.js:20317
push../node_modules/@angular/core/fesm5/core.js.ViewRef_.detectChanges @ core.js:18126
(anonymous) @ core.js:14788
push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.tick @ core.js:14788
push../node_modules/@angular/core/fesm5/core.js.ApplicationRef._loadComponent @ core.js:14822
push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.bootstrap @ core.js:14764
(anonymous) @ core.js:14565
push../node_modules/@angular/core/fesm5/core.js.PlatformRef._moduleDoBootstrap @ core.js:14565
(anonymous) @ core.js:14533
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
onInvoke @ core.js:14060
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:390
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
(anonymous) @ zone.js:889
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423
onInvokeTask @ core.js:14051
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:422
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:195
drainMicroTaskQueue @ zone.js:601
Show 7 more frames
HeaderComponent.html:26 ERROR DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
    at SocketService.push../src/app/services/shared/socket.service.ts.SocketService.create (https://xxxxxxxxx.cloud9.us-east-1.amazonaws.com/main.js:1557:19)
mylaraswamy-fluence commented 3 years ago

I'm facing the same issue too. How to overcome this?

Screenshot from 2021-01-27 18-14-30

rachidrebik commented 3 years ago

Hi, Any solution for this probleme: " vfs connection does not exist "

varsha1288 commented 3 years ago

I am facing the same issue. Anyone got this issue resolved ?

peterjdavis commented 3 years ago

I was having the same issue in Chrome but it worked okay for me in FF

varsha1288 commented 3 years ago

It works for me the first time. When you rerun it I am not able to login nor sign up. It’s gives a message saying use http instead of https. but I have been using http.

radiantone commented 3 years ago

The issue is chrome doesnt allow http loaded over https. You can disable this in chrome settings and it should work.

r4F705 commented 3 years ago

The issue is chrome doesnt allow http loaded over https. You can disable this in chrome settings and it should work.

And how do you disable that, I could not find a relevant setting?

r4F705 commented 3 years ago

So found a solution, Firefox indeed works better because by default it does not enforce https. Just make sure that the Clound9 or EC2 instance that runs the UI application is on the same browser you try to open the application.

sudhirjaiswal03 commented 1 year ago

This issue is still there. UI is not working in Chrome and FF both. Please do update and fix it.

sudhirjaiswal03 commented 1 year ago

The issue is chrome doesnt allow http loaded over https. You can disable this in chrome settings and it should work.

Please provide the steps to use HTTP from cloud9 and chrome. I am not able to open HTTP in chrome or FF either.