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
Operating System: both on Mac running locally, and when ran via a Google CloudFunction on a linux based docker
Node.js version: 13.14.0 locally, 12.20.0 on Google CloudFunction
Browser: chromium
Extra: We couldn't get the CloudFunction to run with just Playwright, but installing Chromium via Puppeteer and using that executable worked 😆 . Locally I am using just Playwright.
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
const{chromium, webkit, firefox}=require('playwright');(async()=>{constbrowser=awaitchromium.launch();constpage=awaitbrowser.newPage({ignoreHTTPSErrors: true});awaitpage.goto('https://www.youtube Panel Title.com/');// Notice the spaces in the URL})();
Describe the bug
When passing a malformed URL to the page.goto method, an UnhandledPromiseRejection is thrown, even if I wrap my code in a try-catch block. I got around this issue by trying to create a URL object from the string I get before trying to open it:
The same error occurs occasionally, when the page I load has a well formed URL, but one of the assets it tries to load doesn't. This crashes the running function, even though all of my code is wrapped in a try-catch block, or uses await-to-js to catch rejected promises.
Add any other details about the problem here.
This is the error log I get when trying to open a malformed URL.
(node:23419) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL: https://www.youtube%20panel%20title.com/
at onParseError (internal/url.js:257:9)
at new URL (internal/url.js:333:5)
at stripFragmentFromUrl (/services/browser/node_modules/playwright-chromium/lib/server/network.js:63:20)
at new Request (/services/browser/node_modules/playwright-chromium/lib/server/network.js:83:21)
at new InterceptableRequest (/services/browser/node_modules/playwright-chromium/lib/server/chromium/crNetworkManager.js:364:24)
at CRNetworkManager._onRequest (/services/browser/node_modules/playwright-chromium/lib/server/chromium/crNetworkManager.js:235:25)
at CRNetworkManager._onRequestWillBeSent (/services/browser/node_modules/playwright-chromium/lib/server/chromium/crNetworkManager.js:114:18)
at CRSession.emit (events.js:315:20)
at CRSession.EventEmitter.emit (domain.js:485:12)
at /services/browser/node_modules/playwright-chromium/lib/server/chromium/crConnection.js:155:22
The text was updated successfully, but these errors were encountered:
Context:
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
Describe the bug
When passing a malformed URL to the page.goto method, an UnhandledPromiseRejection is thrown, even if I wrap my code in a try-catch block. I got around this issue by trying to create a URL object from the string I get before trying to open it:
The same error occurs occasionally, when the page I load has a well formed URL, but one of the assets it tries to load doesn't. This crashes the running function, even though all of my code is wrapped in a try-catch block, or uses await-to-js to catch rejected promises.
Add any other details about the problem here.
This is the error log I get when trying to open a malformed URL.
The text was updated successfully, but these errors were encountered: