Open emersonlaurentino opened 1 month ago
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?
@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 https://github.com/slackapi/node-slack-sdk/issues/1603#issuecomment-1606541205 for more details.
I'm using hono, bun and cloudflare wrangler, I'm getting this error when I use
web-api
.Packages:
Select all that apply:
@slack/web-api
@slack/rtm-api
@slack/webhooks
@slack/oauth
@slack/socket-mode
@slack/types
Reproducible in:
The Slack SDK version
Node.js runtime version
OS info
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:
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. :bow:
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.