Open arnaubt opened 7 months ago
I cannot reproduce by running the reproduction steps on their own. This may be related to the specific context of this workflow, what it included before, and the new connector being added later.
One baseline question: as you are running the external auth commands yourself, I assume you want the spreadsheet connector to use your credentials, and not the end-user's credentials, is that right? just want to double check this.
Other than that, can you create a repro app that shows this failure? Something that can help me reproduce on my end? Without being able to reproduce on my end, it will be very difficult to debug and assist you.
Correct, I'm using my credentials and not the end-user's.
I've created a reproducing repo and PR: https://github.com/arnaubt/slack-external-auth-repro/pull/1
Thanks!
Thank you! However, that repo is a 404 for me, perhaps private? You can add me as collaborator on it if you do not wish to publicize.
Sorry! Forgot to make it public, you should be able to access it now. Thanks again!
Any news? I have the same case, the same error :/ @filmaj
I am stuck at the same error as well. I was just following the documentation for external auth the first time.
I tried to dig deeper into this by calling the API directly using my token. So when I call the following curl command:
curl -X POST "https://slack.com/api/apps.auth.external.list" \
-H "Authorization: Bearer <redacted>" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{"app_id": "<redacted>"}'
I am actually getting the correct output.
However the slack cli tool adds include_workflows
param to the call. When this param is present I am getting the internal error response:
curl -X POST "https://slack.com/api/apps.auth.external.list" \
-H "Authorization: Bearer <redacted>" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{"app_id":"<redacted>","include_workflows":true}'
returns
{"ok":false,"error":"internal_error"}
This seems to be server side issue when the parameter include_workflows
is used.
The
deno-slack
versionsDeno runtime version
OS info
Describe the bug
slack external-auth select-auth
fails withinternal_error
when trying to add OAuth to an existing workflow. The workflow in question has a new step using a Google Sheets connector function. Running the command initially seems to work, although it doesn't detect the new workflow. But after trying a couple of times, it fails with the internal error. I have already reached out to Slack support and they redirected me here.Full debug logs:
``` DEBUG 2024/01/29 11:19:10.241354 Resolving logstash host, https://slack.com, 2.17.0 DEBUG 2024/01/29 11:19:10.243533 system_id: 64e70a4b-883a-4856-b058-9ffbe4db0176 DEBUG 2024/01/29 11:19:10.244084 project_id: 8375b985-6909-466d-bb77-6e6cf8ce3d33 DEBUG 2024/01/29 11:19:10.244556 reading credentials file DEBUG 2024/01/29 11:19:10.244883 found authorizations at .../.slack/credentials.json reading DEBUG 2024/01/29 11:19:10.369445 initialized SDK CLI config: {Runtime:deno Hooks:{BuildProject:{Command:deno run -q --config=deno.jsonc --allow-read --allow-write --allow-net --allow-run --allow-env https://deno.land/x/deno_slack_hooks@1.2.3/build.ts Name:BuildProject} CheckUpdate:{Command:deno run -q --config=deno.jsonc --allow-read --allow-net https://deno.land/x/deno_slack_hooks@1.2.3/check_update.ts Name:CheckUpdate} GetHooks:{Command:deno run -q --allow-read --allow-net https://deno.land/x/deno_slack_hooks@1.2.3/mod.ts Name:GetHooks} GetManifest:{Command:deno run -q --config=deno.jsonc --allow-read --allow-net --allow-env https://deno.land/x/deno_slack_hooks@1.2.3/get_manifest.ts Name:GetManifest} GetTrigger:{Command:deno run -q --config=deno.jsonc --allow-read --allow-net --allow-env https://deno.land/x/deno_slack_hooks@1.2.3/get_trigger.ts Name:GetTrigger} InstallUpdate:{Command:deno run -q --config=deno.jsonc --allow-run --allow-read --allow-write --allow-net https://deno.land/x/deno_slack_hooks@1.2.3/install_update.ts Name:InstallUpdate} Start:{Command:deno run -q --config=deno.jsonc --allow-read --allow-net --allow-run --allow-env https://deno.land/x/deno_slack_runtime@1.1.1/local-run.ts Name:Start}} Config:{Watch:{FilterRegex:\.(ts|js)$ Paths:[.]} SDKManagedConnection:false TriggerPaths:[] SupportedProtocols:[message-boundaries]} WorkingDirectory:} DEBUG 2024/01/29 11:19:10.369819 initialize runtime from slack.json: Deno (deno) INFO 2024/01/29 11:19:10.382438 ------------------------------------ INFO 2024/01/29 11:19:10.382687 Operating System (OS): [darwin] INFO 2024/01/29 11:19:10.382697 Command: [slack external-auth select-auth] INFO 2024/01/29 11:19:10.382704 SessionID: [69f9aa8c-fa4b-4196-bdc0-313407d1010e] INFO 2024/01/29 11:19:10.382709 Slack-CLI-TraceID: [57b4cdd007342708] INFO 2024/01/29 11:19:10.382713 Slack-CLI Version: [2.17.0] INFO 2024/01/29 11:19:10.382716 System ID: [64e70a4b-883a-4856-b058-9ffbe4db0176] INFO 2024/01/29 11:19:10.382719 Project ID: [8375b985-6909-466d-bb77-6e6cf8ce3d33] DEBUG 2024/01/29 11:19:10.384853 reading credentials file DEBUG 2024/01/29 11:19:10.385204 found authorizations at .../.slack/credentials.json reading DEBUG 2024/01/29 11:19:10.387489 HTTP Request: POST https://slack.com/api/apps.status HTTP/1.1 HTTP Request Body: {"app_ids":["Steps to reproduce
slack external-auth add-secret
slack external-auth add
slack external-auth select-auth
(works correctly but doesn't detect the new workflow)slack external-auth select-auth
(fails with the internal error)Expected result
The workflow is detected and external auth is added for it.
Actual result
The workflow never gets detected and the CLI ends up failing with an internal error.
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.