stretchly
stretchly copied to clipboard
[Bug]: Stretchly won't quit properly, have to force quit instead
Version
- [X] I'm using version 1.14.0
Known issues
- [X] I've checked Known issues
Existing issues
- [X] I've checked Existing issues
Advanced Preferences
- [X] I've checked Advanced Preferences
What operating system are you using?
macOS
Operating System Version
macOS Ventura 13.1
Reproduction steps
I have been able to trigger this two ways, though it feels like they are likely the same issue.
How I came across the issue
- Have stretchly open automatically when I log in.
- Have a short break occur.
- To be honest, I haven't tested quitting the app after I log in and before a break occurs. I mainly put this step because of the other reproduction steps I have listed below.
- Attempt to shut down my computer.
- It fails to shut down because stretchly won't quit. I need to force quit in order to be able to then shut down.
Alternative to reproduce the issue without logging out/in
- Open stretchly.
- Skip to next mini break.
- If I only open stretchly, don't have a break, and try to close it, it closes just fine.
- Postpone mini break.
- Attempt to quit stretchly using "Quit Stretchly" button.

- Nothing seems to happen, nor are there any logs related to quitting, but interestingly, if another break happens and I let it run through to the end, it just hangs and won't go back:
- This does produce a log error (
TypeError: Object has been destroyed, details included in the log output section below), and I suspect it's because something did happen when I tried to quit (based on theObject has been destroyederror), but the quitting process didn't finish fully and so the app is still running but missing some of the things it needs. This is speculation on my part though 🤷🏼
- This does produce a log error (
... Reproduces how often: 100% so far.
Expected Behavior
I would expect the app to quit cleanly without the need to force quit it.
Actual Behavior
I have to force quit the app if I want to quit it. This is really mainly an issue for me when I'm trying to shut down my computer, because otherwise I usually leave stretchly running all day.
Relevant log output
[2023-05-02 16:32:05.720] [info] Stretchly: initializing...
[2023-05-02 16:32:05.729] [info] Stretchly: loading preferences
[2023-05-02 16:32:05.740] [info] Stretchly: starting Idle time monitoring
[2023-05-02 16:32:05.756] [info] Stretchly: starting Do Not Disturb monitoring
[2023-05-02 16:32:05.849] [info] Stretchly: loading default break ideas
[2023-05-02 16:32:05.902] [info] Stretchly: loading default break ideas
[2023-05-02 16:32:09.647] [info] Stretchly: skipping to Mini Break
[2023-05-02 16:32:10.053] [info] Stretchly: showing window 1 of 2
[2023-05-02 16:32:10.074] [info] Stretchly: starting Mini Break
[2023-05-02 16:32:10.165] [info] Stretchly: showing window 2 of 2
[2023-05-02 16:32:11.387] [info] Stretchly: postponing Mini Break
[2023-05-02 16:32:27.562] [info] Stretchly: skipping to Mini Break
[2023-05-02 16:32:28.006] [info] Stretchly: showing window 1 of 2
[2023-05-02 16:32:28.010] [info] Stretchly: starting Mini Break
[2023-05-02 16:32:28.108] [info] Stretchly: showing window 2 of 2
[2023-05-02 16:32:48.012] [error] TypeError: Object has been destroyed
at breakComplete (/Applications/Stretchly.app/Contents/Resources/app.asar/main.js:945:16)
at finishMicrobreak (/Applications/Stretchly.app/Contents/Resources/app.asar/main.js:955:20)
at BreaksPlanner.<anonymous> (/Applications/Stretchly.app/Contents/Resources/app.asar/main.js:209:80)
at BreaksPlanner.emit (node:events:513:28)
at Timeout._onTimeout (/Applications/Stretchly.app/Contents/Resources/app.asar/breaksPlanner.js:22:49)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
Preferences
No response
Additional information
To be honest, I don't remember if it started when I upgraded to the latest version of the app, because I usually install updates to things at the start of my day and didn't notice this issue until I tried shutting down for the day, by which point I'd forgotten what updates I installed that morning.
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Hi, sorry for late reply but super busy currently. I have some older mac so will try to reproduce there. Never had this issue on Linux so probably macOS related.
I am on macOS 11.7.6, as I have older machine but can't reproduce.
Error message suggests this line, but I don't see any reason why this window would not exist.
processWin.webContents.send('playSound', settings.get(audio), settings.get('volume'))
The only rationale I see is when you first try quiting, some Stretchly processes are quit but not all of them. Can you check number of Stretchly processes before and after you try quit?
No worries about the delay, I appreciate you making this app available at all.
It looks like there is a difference in the processes before and after quitting.
Before:
After:
So, one of the instances of the "Strecthly Helper (Renderer)" processes gets closed, but every other process stays open.
My screenshots from last time were after freshly opening Stretchly, but I was looking just now after having it running most of the day and there are a lot of processes running before I try to close it:
After attempting to close it:
Only a few processes were ended. I wonder if this is why it won't close properly? Maybe there are more processes than expected and it's not finding them all.
That's definetly bad behavior, the number of processes should stay the same (as when you start the app), with the difference in processes when break is on, or when preferences are opened. After they are closed, the number should go down again. Can you check when it seems to keep the processes for you?
this is for me when I open the app
And after break
What's weird the next break seems to work fine for me and I never go up more then 5 preferences.
Closing Preferences seems to work fine.
This is what I have right after opening it:
If I open preferences:
And closing preferences (seems to end the process that had been added, so that seems to be working):
This is after a break (extra helper and "Renderer" processes):
Another "Renderer" process is kept after each break it seems. Here are the processes after a second break:
I started a break and skipped it and it also leaves behind a "Renderer" process:
note: Ignore the PID values. I fully quit and re-opened the app at one point because I had a few breaks go through and I wasn't sure if that affected things (kind of seems like it does), so I started over and worked to the same spot, just didn't take screenshots of the first steps again 😅
I updated to 1.14.1 and now I don't have to force quit stretchly at the end of my day 🎉
I do still have a bunch of extra processes (screenshot after having it open for 2-3 hours):
But at least now they all close when I shutdown my computer. I'm not sure if you want to keep this open for the extra processes, or if that should be a separate issue.
I still have this issue on 1.14.1
I still have this issue on latest