You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Set up WebSocket interception before clicking Update Deviceawaitpage.routeWebSocket(/.+\/v2/,asyncroute=>{console.log('routeWebSocket entered');constserver=route.connectToServer();// Connect to the actual serverconsole.log('Server message: routeWebSocket');// Messages from page to server are forwarded automatically// We only need to handle server-to-page messages that need modificationserver.onMessage(message=>{constmsgObj=JSON.parse(message);console.log('Server message:',message);// Check if this is a device status message that needs modificationif(msgObj?.payload?.data?.DeviceChanged?.DevStatus==='Disconnected'){msgObj.payload.data.DeviceChanged.DevStatus='Connected';console.log('Modified to:',JSON.stringify(msgObj));message=JSON.stringify(msgObj);}route.send(message);// Send either modified or original message});});
Expected behavior
It should work regardless of the closed Browser window.
Actual behavior
routeWebSocket fails to intercept the ws. Please check the screencast attached.
The text was updated successfully, but these errors were encountered:
terradek
changed the title
[Bug]: routeWebSocket is not working if the browser window is not closed
[Bug]: The routeWebSocket does not work on subsequent attempts unless the browser window is closed.
Dec 17, 2024
Version
1.49.1
Steps to reproduce
Code_3OaThBCe03.mp4
Expected behavior
It should work regardless of the closed Browser window.
Actual behavior
routeWebSocket fails to intercept the ws. Please check the screencast attached.
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: