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
🐛 BUG: The 'credentials' field on 'RequestInitializerDict' is not implemented. #2514
Comments
FYI, this is a bug in local development - Cloudflare Workers do not support the |
As I stated, this is a bug in deployment. Here is a log from a deployed code, workers > logs
And the opposite, it is an error only in deployment as I stated, local mode is working fine, only when local-mode is off and/or after deployment to Cloudflare. EDIT: Last but not least, I can't do anything with the situation. Then it means I cannot use Cloudflare Workers. |
As I said, this is a bug in local development. It is not supported in Workers - the bug is that local development does support it when it shouldn't. You would need to stop the package from using fields that aren't implemented in Cloudflare Workers. |
Oh, so the bug is that the local does support it when it shouldn't. Got you, so my only options are to give up on Workers or Ably. |
is it possible to not make this a hard crash? Given workers are not in a browser, the credentials policy shouldn't affect them... so is there some harm to making this not hardcrash any third-party library that also wants to support a browser? |
@KianNH I've just run into this problem in a SvelteKit app using the @sveltejs/adapter-cloudflare. I'm just wondering why the |
Well, credentials doesn't do anything here- it only exists to turn off browser settings, it is ignored in server-side applications (as i understand). The issue (i think) is that cloudflare throws rather then silently ignoring them, see cloudflare/workerd#902 for a related issue i created |
Credentials are definitely not useless in a server environment - for example, it's a core part of SvelteKit's fetch. I've also migrated my app from Cloudflare Workers to Deno Deploy and it works as expected. I understand the focus of this issue has shifted towards throwing a warning in development, I'm just curious about why it hasn't been added. For example, I checked the WinterCG and couldn't find anything on fetch, so maybe there isn't a common standard yet. |
Aren't credentials only used to bypass the fact that the browser prevents you from sending custom cookies? Nothing prevents you from doing this, and I don't see what deno actually does with the information you give it. |
True, I think SvelteKit processes the cookies for you, based on the credentials field. So I guess I just need a runtime that silently ignores the credentials option and fetches regardless! |
This makes it impossible to use the @directus/sdk |
Running into this issue trying to use the |
Am I correctly understanding, the |
fucked my prod with this bug, all test passed in local ^^ |
Similar issue here cloudflare/workerd#698 |
Same issue:
This makes it IMPOSSIBLE to run agents that use the Webbrowser tool from Langchain (langchain/tools/webbrowser)... |
Same issue:
Is there any workaround? |
Which Cloudflare product(s) does this pertain to?
Workers/Other
What version of
Wrangler
are you using?2.6.2
What operating system are you using?
Windows
Describe the Bug
I am testing locally
EDIT: To emphasize, when I press
L
to test locally, it is working fine but when I deploy to Cloudflare or turn local mode off, it is showing the error.Whenever I include
credentials
in the header of afetch
request, I am receiving this error.This has became an issue since I ably-js has stopped working entirely throwing this error.
I use hono.js to simplify the usage of workers so basically a reproduction would be
The text was updated successfully, but these errors were encountered: