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

CORS prevents embedding stencils #49

Open
LukeCarrier opened this issue Sep 23, 2022 · 0 comments
Open

CORS prevents embedding stencils #49

LukeCarrier opened this issue Sep 23, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@LukeCarrier
Copy link
Owner

LukeCarrier commented Sep 23, 2022

For example, exporting this diagram yields this error:

Exporting /assets/diagrams/p.r.comp.lang.php.ext.tideways.drawio#0 to /assets/diagrams/p.r.comp.lang.php.ext.tideways.drawio-0.svg
Launching browser via Puppeteer
Preparing a new page
Navigating to the exporter
Setting up browser timeout in 30000 microseconds
Rendering diagram
Browser: Rendering page 0 as svg
Browser: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check [https://xhr.spec.whatwg.org/.](https://xhr.spec.whatwg.org/)
Browser: Access to XMLHttpRequest at 'file:///home/runner/work/brain/brain/node_modules/drawio-export-puppeteer/stencils/aws3.xml' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-untrusted, https.
Browser: Failed to load resource: net::ERR_FAILED
Browser: error in loadStencilSet: stencils/aws3.xml JSHandle@error
Browser: Access to XMLHttpRequest at 'file:///home/runner/work/brain/brain/node_modules/drawio-export-puppeteer/stencils/aws3.xml' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-untrusted, https.
Browser: Failed to load resource: net::ERR_FAILED
Browser: error in loadStencilSet: stencils/aws3.xml JSHandle@error
Browser: Access to XMLHttpRequest at 'file:///home/runner/work/brain/brain/node_modules/drawio-export-puppeteer/stencils/aws3.xml' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-untrusted, https.
Browser: Failed to load resource: net::ERR_FAILED
Browser: error in loadStencilSet: stencils/aws3.xml JSHandle@error
Awaiting render result information
Result info yields bounds { x: 181, y: 20, width: 371, height: 370 } and scale 1
Closing the browser

The resulting SVG is missing the stencil's images:

image

@LukeCarrier LukeCarrier added the bug Something isn't working label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant