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

Workerd incompatibility (Cloudflare Workers) #142

Open
zsilbi opened this issue Feb 21, 2024 · 3 comments
Open

Workerd incompatibility (Cloudflare Workers) #142

zsilbi opened this issue Feb 21, 2024 · 3 comments

Comments

@zsilbi
Copy link

zsilbi commented Feb 21, 2024

Hello!

I've been after these errors for months now.

The script will never generate a response

✘ [ERROR] Uncaught (in response) Error: Promise will never complete.

✘ [ERROR] Uncaught (in promise) Error: Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request's handler. This is a limitation of Cloudflare Workers which allows us to improve overall performance.

These pop up in our production log many times daily, we had more than 1800 errors in the last 7 days like this:

image

Finally I was able to reproduce it consistently locally by instantly spamming the freshly started worker with the same SSR page request. (20 request for the same page), but unfortunately the error log contains nothing more than those messages.

After I wrapped all the <Icon> in a custom MyIcon.client.vue component the issue was gone.

I think the problem will be upstream in Iconify but I haven't started to investigate more deeply yet.

More info:

@zsilbi
Copy link
Author

zsilbi commented Feb 21, 2024

I tested the original <Icon> component, and replacing await loadIcon(resolvedIcon.value).catch(() => undefined) with undefined stops the errors.

@zsilbi
Copy link
Author

zsilbi commented Feb 21, 2024

Reproduction: https://github.com/zsilbi/nuxt-icon-workerd

@Bobakanoosh
Copy link

Also happens to me. I've similarly narrowed it down to await calls, in my case it's top-level await useAsyncData calls for fetching data for a page.

Found these:
https://news.ycombinator.com/item?id=34989560
https://zuplo.com/blog/2022/03/04/the-script-will-never-generate-a-response

But not sure how to fix/prevent this from a Nuxt perspective

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