Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Restart option in tray menu only quit and doesn't reopen. #949

Open
3 tasks done
tobycm opened this issue Nov 9, 2024 · 9 comments
Open
3 tasks done

[Bug] Restart option in tray menu only quit and doesn't reopen. #949

tobycm opened this issue Nov 9, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@tobycm
Copy link

tobycm commented Nov 9, 2024

Discord Account

tobycm

Operating System

Ubuntu 24.04

Linux Only ~ Desktop Environment

Gnome on Wayland

Package Type

deb

What happens when the bug or crash occurs?

The option Restart in the Vesktop tray menu only stop Vesktop, but doesn't restart itself.

What is the expected behaviour?

It should start itself after closing.

How do you recreate this bug or crash?

Click the Restart option in the tray menu.

Debug Logs

❯ vesktop
Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
Checking for update
[arRPC > ipc] listening at /run/user/1000/discord-ipc-0
[arRPC > websocket] listening on 6463
[arRPC > process] started
[22977:1108/203622.892309:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
Update for version 1.5.3 is not available (latest version: 1.5.3, downgrade is disallowed).
checkForUpdatesAndNotify called, downloadPromise is null

Request Agreement

  • I have searched the existing issues and found no similar issue
  • I am using the latest Vesktop and Vencord versions
  • This issue occurs on an official release (not just the AUR or Nix packages)
@tobycm tobycm added the bug Something isn't working label Nov 9, 2024
@tobycm
Copy link
Author

tobycm commented Nov 9, 2024

The Relaunch option does work if I clone the repo and run it with pnpm run start however.

@tobycm
Copy link
Author

tobycm commented Nov 9, 2024

Weirdly enough, running vesktop in the Gnome terminal or launching Vesktop from the Applications view, the Relaunch option will malfunctioned, but it will work if I run vesktop in the vscode terminal or if I run pnpm run start in the Vesktop repo folder.

@Vendicated
Copy link
Member

works for me using RPM on fedora. likely something wrong with your system

can anyone else using the deb package reproduce this?

@NerjalNosk
Copy link

Running deb release, used to work on Ubuntu 22.0.4, now any restart doesn't work anymore on Ubuntu 24.0.4

Running from a terminal (no special command option provided) gives the following output:
vesktop.log

@Vendicated
Copy link
Member

if simply updating your system broke it, it's not something we can fix

all vesktop does is use electron's apis to initiate a relaunch & exit
https://www.electronjs.org/docs/latest/api/app#apprelaunchoptions

its either an issue with ubuntu or with electron

it would be very useful if one of you made a minimal electron reproduction example that demonstrates this bug and reports it to the electron repo. use this tool https://www.electronjs.org/fiddle and use the code sample from the above doc and see if it happens there too

@NerjalNosk
Copy link

Would appear to be related to electron updater.

They do already have a few issues about that, Vesktop might just need to update the dependency

@Vendicated
Copy link
Member

the electron-updater log is unrelated, feel free to ignore it

@NerjalNosk
Copy link

NerjalNosk commented Nov 20, 2024

Tried running the following with a bare Electron 33.2.0 project:

const electron = require("electron")

function createWindow() {
    const mainWindow = new electron.BrowserWindow({
        width: 800,
        height: 600
    });
}

electron.app.whenReady().then(() => {
    createWindow()

    electron.app.on('activate', () => {
        if (electron.BrowserWindow.getAllWindows().length === 0) {
            createWindow()
        }
    })
})

electron.app.on('quit', () => {
    electron.app.relaunch()
})

relaunch worked just fine, no issue with bare Electron restart on Ubuntu 24.

Additionally, I may mention that this Ubuntu is a fresh install, and not transitioned from any earlier version of Ubuntu, thus possibly containing broken packages/apps.

As such, either it is an active issue for Electron 33.0.2, but that has since been fixed, and thus would require Vesktop to upgrade Electron, or a pure Vesktop issue.

@Vendicated
Copy link
Member

Vendicated commented Nov 20, 2024

like i said, it's not possible for it to be a vesktop issue. the relaunch code has always been the same and simply follows what any other electron app also does.

it might be that this issue only happens once bundled to .deb ~ we use electron-builder to create the deb package

if you use this template https://github.com/electron-userland/electron-webpack-quick-start?tab=readme-ov-file#getting-started and run yarn dist, it should build a deb package. your electron code would go in src/main/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants