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

no-cors mode errors despite 200 response #67

Open
markchoward7 opened this issue Dec 19, 2023 · 2 comments
Open

no-cors mode errors despite 200 response #67

markchoward7 opened this issue Dec 19, 2023 · 2 comments

Comments

@markchoward7
Copy link

When setting no-cors like so:

const data = await domToPng(element.current, {
  fetch: {
    requestInit: { mode: "no-cors" },
  },
});

Any image requests fail with Failed fetch, not 2xx response. However, looking at the network tab shows 200 responses for all image requests.

Sandbox: https://codesandbox.io/p/sandbox/modern-screenshot-forked-rhgctx?file=%2Findex.html%3A26%2C52

image

@lxzemor
Copy link

lxzemor commented Mar 1, 2024

I also have the same problem,How to solve it?

@mlsalcedo
Copy link

mlsalcedo commented May 23, 2024

facing same issue, How to solve it?

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

3 participants