extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[Clockify] "Timer could not be started"

Open daviccarneiro opened this issue 5 months ago • 5 comments

Extension

https://www.raycast.com/isma/clockify

Raycast Version

0.64.3.0

OS Version

macOS Tahoe 26.5.1 arm64

Description

Unable to use the "Time tracking" command

https://cln.sh/pkFhstJ5

Steps To Reproduce

  1. Start "Time Tracking" command
  2. Select "Start new timer"
  3. Add description (mandatory for my workspace, all other fields are left blank, but adding them does not change anything)
  4. Click "Start"
  5. See error

Current Behaviour

Error: "TImer could not be started" Unfortunately does not allow me to generate a log

Expected Behaviour

Tracking starts

daviccarneiro avatar Jun 11 '26 23:06 daviccarneiro

Thank you for opening this issue!

🔔 @ismamz @sxn @kuddl @azlekov @sebboer @shkm @constantins2001 @xmok @pcamminadi @riccardogiorato you might want to have a look.

💡 Author and Contributors commands

The author and contributors of isma/clockify can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot close as not planned Closes the issue as not planned.
  • @raycastbot close as duplicate Closes the issue as duplicate.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopens the issue.
  • @raycastbot assign me Assigns yourself to the issue.
  • @raycastbot good first issue Adds the "Good first issue" label to the issue.
  • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.

raycastbot avatar Jun 11 '26 23:06 raycastbot

Hitting the same issue :(

SrAnthony avatar Jun 24 '26 01:06 SrAnthony

Hitting same problem, did anyone manage to resolve it?

LeszekBlazewski avatar Jul 30 '26 19:07 LeszekBlazewski

This may be the same root cause as #29613 — PR https://github.com/raycast/extensions/pull/30877 could fix it.

Both project dropdowns in src/index.tsx declared onChange after spreading itemProps, which replaced the onChange that useForm supplies. values.projectId therefore never got set, so onSubmit ran with no project, POST /time-entries was rejected, and addNewTimeEntry showed "Timer could not be started". The visible symptom is the project dropdown snapping back to the first entry every time you pick one.

If your dropdown was doing that too, this is very likely the same bug. If your project selection appeared to stick and it still failed, then it's something else and worth keeping open.

tonygauderman avatar Sep 07 '26 22:09 tonygauderman

Follow-up: there is a second, separate bug that can produce this toast, and PR https://github.com/raycast/extensions/pull/30894 fixes it. I can't confirm from the reports here whether it's what you hit, so I'm not claiming it as a fix — but the symptom matches.

useConfig writes userId, workspaceId and name into LocalStorage without awaiting the writes, and every helper in utils.ts reads those ids back out of LocalStorage independently. A resolved setItem doesn't guarantee the key is readable, and useConfig can bootstrap from more than one mounted component at once — under that concurrency a write gets dropped:

wrote workspaceId="63c59a0a…c9"
getTimeEntries read workspaceId=undefined userId="63c59a0a…c8"
  | allItems keys=["name","userId"] allItems.workspaceId=undefined
POST /workspaces/undefined/time-entries -> 403
  {"message":"WorkspaceId is missing in feature check","code":501}

name and userId landed, workspaceId didn't, so the request goes to /workspaces/undefined/... and addNewTimeEntry reports "Timer could not be started". It's intermittent, and because useConfig's guard requires all three keys, it can stay stuck rather than recovering.

A quick way to tell whether this is your bug: if the project dropdown holds its selection correctly and the timer still won't start, it's this one rather than the dropdown issue in #30877. The PR also makes that toast report the reason Clockify returned, so the failure is no longer silent.

tonygauderman avatar Sep 08 '26 12:09 tonygauderman