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

The 'credentials' field on 'RequestInitializerDict' is not implemented. #1868

Closed
1 of 7 tasks
emersonlaurentino opened this issue Aug 8, 2024 · 4 comments
Closed
1 of 7 tasks
Assignees
Labels
auto-triage-stale question M-T: User needs support to use the project

Comments

@emersonlaurentino
Copy link

I'm using hono, bun and cloudflare wrangler, I'm getting this error when I use web-api.

AxiosError: The 'credentials' field on 'RequestInitializerDict' is not implemented.

Packages:

Select all that apply:

  • @slack/web-api
  • @slack/rtm-api
  • @slack/webhooks
  • @slack/oauth
  • @slack/socket-mode
  • @slack/types
  • I don't know

Reproducible in:

The Slack SDK version

    "@slack/web-api": "^7.3.1",

Node.js runtime version

node: v20.12.0
bun: 1.1.22

OS info

roductName:            macOS
ProductVersion:         14.6
BuildVersion:           23G80
Darwin Kernel Version 23.6.0: Fri Jul  5 17:56:41 PDT 2024; root:xnu-10063.141.1~2/RELEASE_ARM64_T6000

Steps to reproduce:

Any request is giving this error, examples of requests I'm using:

  • web.oauth.v2.access
  • web.team.info
  • web.conversations.list

Expected result:

Just work!

Actual result:

Screenshot 2024-08-08 at 12 37 39

Requirements

For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

@hello-ashleyintech hello-ashleyintech self-assigned this Aug 8, 2024
@hello-ashleyintech hello-ashleyintech added question M-T: User needs support to use the project and removed untriaged labels Aug 8, 2024
@hello-ashleyintech
Copy link
Contributor

Hi, @emersonlaurentino! Thanks for your question! 🙌

Based on the error, this seems like an issue with the Cloudflare Workers SDK. I found this related issue here. The good news is, since it looks like you're using Axios, someone release a PR for a fix for this issue for Axios ~1 hour ago!

In the meantime, while that's getting reviewed, merged, and released, someone suggested this approach:

on the server-side i just check if credentials are supported and set them to undefined if not

const isCredentialsSupported = "credentials" in Request.prototype; 
fetch("...", { credentials: isCredentialsSupported ? "include" : undefined })

maybe try the above and see if it works with your use case?

@seratch
Copy link
Member

seratch commented Aug 19, 2024

@emersonlaurentino
Even after resolving this specific error, you'll encounter more errors with Bun and Cloudflare Workers because this project focuses on Node.js runtime use cases. I understand you prefer first-party tools, but I created third-party libraries to build your Slack apps on edge function platforms. Please consider using the alternative solution this time. See #1603 (comment) for more details.

Copy link

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

Copy link

github-actions bot commented Oct 7, 2024

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-stale question M-T: User needs support to use the project
Projects
None yet
Development

No branches or pull requests

3 participants