diff options
| author | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2026-04-02 15:14:44 +0200 |
|---|---|---|
| committer | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2026-04-02 15:14:44 +0200 |
| commit | 6ec4735a5e293c4e61369e955793bf2f4bd4f1a5 (patch) | |
| tree | 04cad1749853451f3fd6b3b80e8c5c29065e5c89 | |
| parent | 06b31e808052a44b0fef44dec2f039b1507d86d0 (diff) | |
| parent | 233b1a9a0697833ce82c37c2cf21bc3aefe9cf2b (diff) | |
| download | mullvadvpn-6ec4735a5e293c4e61369e955793bf2f4bd4f1a5.tar.xz mullvadvpn-6ec4735a5e293c4e61369e955793bf2f4bd4f1a5.zip | |
Merge branch 'send-functionality-disabled-after-viewing-app-logs-des-2886'
| -rw-r--r-- | desktop/packages/mullvad-vpn/src/main/problem-report.ts | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/desktop/packages/mullvad-vpn/src/main/problem-report.ts b/desktop/packages/mullvad-vpn/src/main/problem-report.ts index be84814d72..b7adf43b53 100644 --- a/desktop/packages/mullvad-vpn/src/main/problem-report.ts +++ b/desktop/packages/mullvad-vpn/src/main/problem-report.ts @@ -14,9 +14,28 @@ export function registerIpcListeners() { return send(email, message, savedReportId); }); - IpcMainEventChannel.problemReport.handleViewLog((savedReportId) => - shell.openPath(getProblemReportPath(savedReportId)), - ); + IpcMainEventChannel.problemReport.handleViewLog((savedReportId) => { + const problemReportPath = getProblemReportPath(savedReportId); + if (process.platform === 'linux') { + // As of this upstream PR[1] the underlying C implementation for + // shell.openPath no longer waits for the process to exit, which + // means that the callback in the C code will never be called. + // + // That callback is what eventually causes the promise returned + // by shell.openPath to resolve, and as it is never being called, + // the promise will never be resolved. + // + // Because of that, we just invoke shell.openPath and return a + // promise resolved with an empty string, the same signature as + // returned from shell.openPath. + // + // [1] https://github.com/electron/electron/pull/48079 + void shell.openPath(problemReportPath); + return Promise.resolve(''); + } + + return shell.openPath(problemReportPath); + }); } function collectLogs(toRedact?: string): Promise<string> { |
