wavetermdev / waveterm

An open-source, cross-platform terminal for seamless workflows
https://www.waveterm.dev
Apache License 2.0
4.34k stars 111 forks source link

[Bug] electron-updater tries to install RPM over Pacman #1079

Open C0sm0cats opened 1 week ago

C0sm0cats commented 1 week ago

Current Behavior

Description:

When I close the application while an update is available, I receive a popup asking me to authenticate in order to install the latest version of waveterm RPM. This issue occurred with waveterm-linux-x64-0.8.12-beta.2.pacman and seems inappropriate for users on Manjaro, as it suggests an unnecessary installation process.

Additionally, it would be beneficial to have a toggle option to control whether we want to receive updates or not. This would give users more control over their application experience.

Expected Behavior

Thank you for your attention to this matter!

Steps To Reproduce

  1. Open the application.
  2. Wait for an update to become available.
  3. Close the application.
  4. Observe the popup requesting authentication for RPM installation.

Wave Version

waveterm-linux-x64-0.8.12-beta.2.pacman

OS

manjaro

Architecture

None

Anything else?

No response

Questionnaire

esimkowitz commented 1 week ago

There is an option to disable automatic updates, you can run wsh setconfig autoupdate:enabled=false and restart the app. To disable install on quit but leave the update checker running, run wsh setconfig autoupdate:installonquit=false and restart the app.

As for the authentication prompt when installing an update, that's out of our control. electron-updater manages this for us and if your system asks for authentication to update the app, we prompt the user for it.

C0sm0cats commented 1 week ago

Thanks @esimkowitz for the clarification! I didn’t catch that command in the documentation. It really helps me understand how to manage the updates better. That answers my needs perfectly, as I was looking for a visual way to do it. Thanks again!

C0sm0cats commented 1 week ago

@esimkowitz However, there’s a problem: on Manjaro OS, if we keep autoupdate installonquit set to true, it prompts to install the RPM version instead of the PACMAN version, and RPM isn’t compatible with Arch Linux. Could you please check on that? It seems like it might not be selecting the correct package based on the OS

{ "autoupdate:channel": "beta", "autoupdate:installonquit": true }

C0sm0cats commented 1 week ago

Since the beta, it visually prompts to install waveterm-linux-x86_64-0.8.12.rpm instead of waveterm-linux-aarch64-0.8.12.pacman which can be quite confusing when on Arch. Arch does not rely on the rpm format, which is primarily developed for and used by Red Hat derivatives. So when I see an RPM file, I become hesitant to install it. you can technically install an RPM package on Manjaro using tools like rpm or alien, but it's not recommended since RPM is not the native package format for Arch-based systems. It might lead to compatibility issues or conflicts. It’s better to use the PACMAN. Can we address this issue?

it's also suggesting an inappropriate command like /bin/bash -c -y it indicates that it’s not using the correct installation method for Arch. it should propose using pacman for installation on Arch image

On Arch, it should ideally prompt for waveterm-linux-aarch64-0.8.12.pacman and suggest using pacman -U waveterm-linux-aarch64-0.8.12.pacman for installation. This would ensure users follow the correct package management practices and avoid confusion.

esimkowitz commented 1 week ago

Hmm I see, that is weird I'll take a look further. Maybe I removed something

esimkowitz commented 1 week ago

This might be a bug in electron-updater. The Pacman auto update support is new. Will investigate further this week

C0sm0cats commented 1 week ago

Yeah. it seems there is no current implementation in electron-updater for detecting the appropriate package manager for updates. This lack of detection creates confusion in selecting the correct files for auto-updates and determining which package manager to use for the update process.

esimkowitz commented 1 week ago

it's supposed to ignore artifacts that don't match the package type, not sure why it isn't

esimkowitz commented 1 week ago

@C0sm0cats can you share your ~/.waveterm/waveapp.log to support@waveterm.dev? I want to see what the auto updater logs look like

C0sm0cats commented 1 week ago

@esimkowitz, it's done! You have the waveapp.log in your box.