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
Client script that connects to the remote instance of BrowserServer:
const{chromium}=require('playwright');(async()=>{// IP address is valid, however, token c0a52db5d206c93707156e5b85b4c02 is not.varwsEndpoint="ws://127.0.0.1:9090/c0a52db5d206c93707156e5b85b4c02"try{constbrowser=awaitchromium.connect({wsEndpoint: wsEndpoint});constpage=awaitbrowser.newPage();//....}catch(error){// Invalid token exception is never thrownconsole.log(error.message)}})();
Describe the bug
Issue: When trying to connect to a remote instance of BrowserServer with an invalid Token Id, my node.js application exits with no error code/message.
Expected Behavior: If an invalid Token Id is provided to the wsEndpoint parameter of chromium.connect(), it should throw a catchable exception, so we can properly handle application workflow.
Use Case: Since I have a virtual machine on Azure running the remote browser server instance, my IP and Token will vary whenever a new internet connection is renewed. Once my node.js app is up, it sends the current IP and Token to the database so all clients can connect to with valid token access.
BTW: I love the extra layer of security by adding tokenization to the connection. Last time I checked Puppeteer, it was not able to perform it. Keep doing the great job, Playwright team!
The text was updated successfully, but these errors were encountered:
fabiomoggi
changed the title
[BUG]
[BUG] No exception is thrown if invalid token is provided when connecting to a remote instance of BrowserServer
Jan 11, 2021
Context:
Code Snippet
Script to fire up server:
Client script that connects to the remote instance of BrowserServer:
Describe the bug
BTW: I love the extra layer of security by adding tokenization to the connection. Last time I checked Puppeteer, it was not able to perform it. Keep doing the great job, Playwright team!
The text was updated successfully, but these errors were encountered: