[Color Picker] "Something went wrong" When Using "Pick Color" Command

Open Beginner friendly
#26,150 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
tooling

Research direction

Start with pick-color.ts and reproduce the issue by disabling the "Menu Bar Color Picker" command before running "Pick Color." Check the existing error handling around launchCommand and showFailureToast; done means the color is still copied without an extra error toast when the command is disabled.

Written by the indexing model from the issue text.

Description

bug extension extension: color-picker platform: macOS
Extension

https://www.raycast.com/thomas/color-picker

Raycast Version

1.104.8

OS Version

26.3.1

Description

I noticed the same error message as the now closed issue #16826 when using the "Pick Color" command. It occurs when the separate "Menu Bar Color Picker" command is disabled. "Something went wrong" seems to be a general error message that Raycast is throwing in response to an error in pick-color.ts.

In pick-color.ts:

try {
  await launchCommand({ name: "menu-bar", type: LaunchType.Background });
} catch (e) {
  if (!(e instanceof Error && e.message.includes("must be activated"))) {
    await showFailureToast(e);
  }
}

When the "Menu Bar Color Picker" command is disabled, this throws an error with a message that doesn't include "must be activated", so it reaches showFailureToast. If this refresh is not critical, the catch should silently ignore all errors.

https://github.com/user-attachments/assets/3fbbda47-7e35-44f9-b4d0-44cec96807c3

Steps To Reproduce
  1. Open Raycast Settings > Extensions
  2. Under the "Color Picker" extension, disable the "Menu Bar Color Picker" command
  3. Use the "Pick Color" command. You will see the toasts "Copied color #c0ffee to clipboard" and "Something went wrong"
Current Behaviour

Extra error message

Expected Behaviour

No error message

Dominant language
TypeScript
Stars
7.8k
Forks
6.9k
Avg merge
1d 23h
Merged PRs (30d)
450

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raycast/extensions

All issues in raycast/extensions

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.