Fix auth import-desktop when multiple Slack installations exist#59
Merged
AmethystLiang merged 1 commit intostablyai:mainfrom Mar 8, 2026
Merged
Conversation
Previously, getSlackPaths() returned only the first Slack data directory found. On macOS, if both the Electron (~/Library/Application Support/Slack) and App Store (~/Library/Containers/com.tinyspeck.slackmacgap/...) directories existed, the Electron path was always picked — even if its cookie could not be decrypted (e.g. stale data from a previous installation). Now getAllSlackPaths() returns all valid candidate paths, and extractFromSlackDesktop() tries each one until both LevelDB team extraction and cookie decryption succeed. The error message now reports all attempted paths with their individual failures.
Contributor
AI Review (Claude Opus 4.6)Verdict: Approve ✅ Clean, well-scoped fix. The approach of trying all candidate paths and collecting errors is correct. What looks good
Commit pushed
LGTM — merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
auth import-desktopfailed with "Could not locate xoxd-*" when both Electron and Mac App Store Slack data directories existed, because it only tried the first one found (Electron) even if its cookie couldn't be decryptedgetSlackPaths()→getAllSlackPaths()to return all valid candidate paths, andextractFromSlackDesktop()now tries each until one fully succeeds (both LevelDB teams and cookie decryption)Verified on my machine where the command previously failed.