Openbravo Issue Tracking System - POS2
View Issue Details
0056850POS2Corepublic2024-10-21 14:342024-10-21 14:35
shuehner 
Triage Platform Base 
normalmajorhave not tried
newopen 
5
 
 
No
0056850: WebSocket infrastructure does not work when application is loaded via https
The code to initialize the WebSocket connections is building the URL for the websocket always using ws:// instead of:
- using ws:// (when application is loaded via plain http)
- and wss:// (when application is loaded via https)

That causes the login i.e. pos2 login to fail with
Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

when the application is loaded via https
In an instance used via https://
With pos2 of 24Q4 (or later)
With pos2-example-websocket.diff testing code

Try to login to pos2
Observe above error message during the login
Observe the whole login fails
Adjust WebSocket URL construction to properly use ws:// or wss:// based on how the application is loaded.
No tags attached.
related to feature request 0056183 closed gonzalo_fernandez Websocket Implementation - Core2 infrastructure implementation and example module 
Issue History
2024-10-21 14:34shuehnerNew Issue
2024-10-21 14:34shuehnerAssigned To => Triage Platform Base
2024-10-21 14:34shuehnerTriggers an Emergency Pack => No
2024-10-21 14:35shuehnerRelationship addedrelated to 0056183

There are no notes attached to this issue.