Skip to content

Fix uncaught exception caused by tsh daemon stop when TELEPORT_TOOLS_VERSION is set#58125

Merged
gzdunek merged 2 commits intomasterfrom
gzdunek/windows-uncaught-exception
Aug 20, 2025
Merged

Fix uncaught exception caused by tsh daemon stop when TELEPORT_TOOLS_VERSION is set#58125
gzdunek merged 2 commits intomasterfrom
gzdunek/windows-uncaught-exception

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Aug 20, 2025

When closing Connect on Windows, I saw the following message:
image
This happened because a class method was passed without binding, causing this to be lost.
(Before #56683 this could only log an error, but now it shows this alert.)

After I fixed that, I saw this in logs:
[20-08-25 16:08:33] [Daemon stop] error: 2025/08/20 16:08:33 ERROR Failed to update tools version error="archive file is not found: 404" version=19.0.0-dev.gzdunek.13
Turns out that we forgot to disable tsh autoupdates for tsh daemon stop. I had TELEPORT_TOOLS_VERSION set globally and it was read by tsh.

changelog: Fixed an uncaught exception in Teleport Connect on Windows when closing the app while the TELEPORT_TOOLS_VERSION environment variable is set

@github-actions github-actions bot requested a review from bl-nero August 20, 2025 14:34
@github-actions github-actions bot added the ui label Aug 20, 2025
@github-actions github-actions bot requested a review from ravicious August 20, 2025 14:34
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from bl-nero August 20, 2025 14:43
@gzdunek gzdunek enabled auto-merge August 20, 2025 14:47
@gzdunek gzdunek added this pull request to the merge queue Aug 20, 2025
@gzdunek gzdunek changed the title Fixed uncaught exception caused by tsh daemon stop when TELEPORT_TOOLS_VERSION is set Fix uncaught exception caused by tsh daemon stop when TELEPORT_TOOLS_VERSION is set Aug 20, 2025
Merged via the queue into master with commit 43ee294 Aug 20, 2025
46 checks passed
@gzdunek gzdunek deleted the gzdunek/windows-uncaught-exception branch August 20, 2025 15:04
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@gzdunek See the table below for backport results.

Branch Result
branch/v16 Create PR
branch/v17 Create PR
branch/v18 Create PR

rhammonds-teleport pushed a commit that referenced this pull request Aug 20, 2025
…OOLS_VERSION` is set (#58125)

* Avoid losing `this` when calling `logger.error`

* Disable tsh autoupdates in `tsh daemon stop`
ryanclark pushed a commit that referenced this pull request Aug 20, 2025
…OOLS_VERSION` is set (#58125)

* Avoid losing `this` when calling `logger.error`

* Disable tsh autoupdates in `tsh daemon stop`
mmcallister pushed a commit that referenced this pull request Sep 22, 2025
…OOLS_VERSION` is set (#58125)

* Avoid losing `this` when calling `logger.error`

* Disable tsh autoupdates in `tsh daemon stop`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants