tom-james-watson / breaktimer-app

Manage periodic breaks. Avoid eye-strain and RSI.
https://breaktimer.app
GNU General Public License v3.0
1.05k stars 77 forks source link

Stuck on "Next break in less than a minute" #206

Open olshevski opened 1 year ago

olshevski commented 1 year ago

Since updating from Monterey to Ventura 13.1 BreakTimer doesn't show breaks after the system sleep. In the menu it just shows "Next break in less than a minute", but the break never starts not after a minute, nor in a longer time. Even if I press "Start break now" nothing happens.

If I relaunch the app, it starts showing breaks, but after the first sleep (the longer one, e.g. overnight), it seems to never be working.

letharion commented 1 year ago

This happens to me as well. The app appears to get stuck when attempting to initiate the pause. Indeed, restarting the app does solve the problem.

Also, nothing gets written to the logs at this points, so there's little debugging information available.

Edit: One day later, the machine has been sleeping all night and today the problem didn't manifest. I'll keep looking for how to repro the issue.

letharion commented 1 year ago

Today I noticed again the app doesn't start any breaks, and it's stuck in "Next break in less than a minute"-state.

The last few logs sadly don't help much:

[2023-02-06 13:20:02.596] [info] GONG_START_PLAY [2023-02-06 13:20:02.596] [info] Send event GONG_START_PLAY [] [2023-02-06 13:20:02.598] [info] BREAK_LENGTH_GET [2023-02-06 13:41:09.697] [info] GONG_START_PLAY [2023-02-06 13:41:09.698] [info] Send event GONG_START_PLAY []

adrianh commented 1 year ago

+1 to this happens to me too.

tom-james-watson commented 1 year ago

If the app ever gets into that state, quitting and reopening will fix it.

kristiannotari commented 1 year ago

+1 to this happening to me too on Ventura 13.3.1.

It seems to be inconsistent, like sometimes it gets stuck, sometimes it doesn't. I have my MacBook Pro with its shell closed all the time and plugged to a docking station delivering power, and it usually keeps working normally. Went for launch for circa 1 hour locking the screen and then the problem happened again. Over night it happens often too. Otherwise working like a charm. If I lock the screen for shorter periods it keeps working correctly

torpesco commented 1 year ago

Another "me too". I've randomly had this issue, though not as much recently. I've seen no pattern to it.

kristiannotari commented 1 year ago

In a similar discussion I had to check the "prevent Mac from sleep when display is off" option under screens -> advanced. You can read more about that here: https://github.com/tom-james-watson/breaktimer-app/discussions/222#discussioncomment-5670616

Hopefully this helps to solve this issue too when dealing with docked Macs for long times, not sure about overnight though.

letharion commented 1 year ago

For what it's worth I also use the composer primarily docked and with the lid closed at all times, which might mean the sleeping happens a lot.

torpesco commented 1 year ago

The app did this to me today. It was working on Friday. I don't think I've had a break reminder today. Is there some kind of diagnostics I could gather when this happens? Process samples using Activity Monitor, or anything else?

cletter7 commented 1 year ago

I have the same issue, it works for some time and then gets stuck in "Next break in less than a minute" state.

ershov commented 1 year ago

This is regularly happening to me too.

wuwendell commented 1 year ago

+1 on this issue. If I inspect the last few lines of the log,

[2023-06-21 11:53:50.748] [info]  BREAK_POSTPONE
[2023-06-21 12:18:58.057] [info]  ALLOW_POSTPONE_GET
[2023-06-21 12:18:58.080] [info]  SETTINGS_GET
[2023-06-21 12:18:58.085] [info]  ALLOW_POSTPONE_GET
[2023-06-21 12:18:58.107] [info]  GONG_START_PLAY
[2023-06-21 12:18:58.109] [info]  Send event GONG_START_PLAY []
[2023-06-21 12:18:58.111] [info]  BREAK_LENGTH_GET
[2023-06-21 12:38:59.337] [info]  GONG_START_PLAY
[2023-06-21 12:38:59.340] [info]  Send event GONG_START_PLAY []
[2023-06-21 17:31:24.974] [info]  SETTINGS_GET

Notice the large period of inactivty between 12:38 and 17:31. I had left my Mac to get lunch, so the display presumably turned off and it automatically went to sleep. I returned and continued working only a few minutes after the display (and probably Mac itself) went to sleep, but it got stuck in the "Next break in less than a minute" state, and the next break never initiated, and I did not notice until 5pm in the day. I clicked various buttons, including Disable, Enable, Restart break period, and Start break now, all before clicking Settings. As seen in the logs, only the settings button triggered any log actions. When I clicked Disable in this bugged state, the screen would still display the "time until next break" as "less than a minute" rather than completely removing all the aforementioned buttons and the time until next break.

ershov commented 1 year ago

Hi, A little update on the issue here.

I've installed the Break Timer on another Mac (Pro, M1) with the latest OS and it works like a charm. That's while it's consistently getting stuck on my Air M2.

Any ideas where to look at to compare what's different on these two machines?

wuwendell commented 1 year ago

Can confirm I also have the M2 chip Mac.

bovae commented 1 year ago

Facing the same issue :(

MacBook Pro 16" with M1 Pro chip MacOS Ventura 13.4.1

eyalyoli commented 10 months ago

same here mac pro 13" i7 OS Sonoma v14

this might be related https://github.com/electron/electron/issues/4465

also turns out you need to reset the timer using these hooks

I see it's used in the code but looks like to monitor that you are "away" not to reset the timer

eyalyoli commented 10 months ago

I would suggest adding under app ready event this part:

...
import { BreakTime, tickInterval } from "../../types/breaks";
...

app.on('ready', () => {
   ...
  electron.powerMonitor.on('suspend', () => {
    clearInterval(tickInterval);
  });
  electron.powerMonitor.on('resume', () => {
    initBreaks();
  });
  ...
})
Fl0rent commented 10 months ago

same here

MacBook Pro 14" with M2 Pro chip MacOS Sonoma 14.1.2

NourMaka commented 8 months ago

MacBook Pro 14" with M1 Pro chip MacOS Sonoma 14.1.2

Also with the same issue; restarting the app does the trick but it'll get stuck the next day or so

happydutch commented 8 months ago

Same here. BreakTimer works once, but subsequent times it is stuck on the "less than a minute" indicator. Cannot force a break.

Zorin OS 17 Core (Ubuntu-based)

Update: it is stuck now at

image

lhalbers commented 6 months ago

This issue occurs for me on a Lenovo T14s running Windows 11. The break timer is stuck in "Next break in less than one minute" indefinitely.

dougmcmillan commented 1 month ago

I'm also seeing this

MacBook Pro M3 Pro Sonoma 14.3 (23D56)