Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YouTube Video Embed Causing Error: DOMEXception: A network error occured. #560

Open
oosharma opened this issue Jul 12, 2022 · 1 comment

Comments

@oosharma
Copy link

Bug Report

Current Behavior
When an iframe for Youtube is embeded, I get this error when I try to run 'yarn build' - DOMEXception: A network error occured.

Reproducible demo
https://codesandbox.io/s/jolly-tess-2d2koq?file=/src/App.js:78-79

Expected behavior/code
The build command should run without throwing this error

@xgschwi
Copy link

xgschwi commented Aug 1, 2022

@oosharma I got the same error with my project that has a youtube link embedded in an iframe. I dug around the react-snap library and I traced the issue down to the inlineCss option.

const minimalcssResult = await minimalcss.minimize({
    urls: [pageUrl],
    skippable: request =>
      options.skipThirdPartyRequests && !request.url().startsWith(basePath),
    browser: browser,
    userAgent: options.userAgent
  });

While I had inlineCss set to true, I put a try catch around the minimalcss.minimize function and that caused the error to throw. As of now, I could not find any way around it besides setting my inlineCss option to false in my package.json:

"reactSnap": {
    "inlineCss": false,
    "source": "./dist",
    "puppeteerArgs": [
      "--no-sandbox",
      "--disable-setuid-sandbox"
    ],
    "puppeteerExecutablePath": "/opt/google/chrome/google-chrome"
  },

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants