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

Winget option not working properly. #458

Closed
Dajova opened this issue Jan 25, 2024 · 7 comments
Closed

Winget option not working properly. #458

Dajova opened this issue Jan 25, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@Dajova
Copy link

Dajova commented Jan 25, 2024

Description

Trying to update the extension by doing the winget steps. Terminal says it's installed and cannot find a newer update, but PWA says it's outdated.
This happens everytime the native version gets updated and the only way to fix it is to install it manually, which i'm tired of doing because winget doesnt work.

Steps to Reproduce

Same steps as the winget steps. PWA just not recognising the native version.

image

Additional Information

I'm not sure if it's relevant, but PWA is not installed in the default location, but on a separate drive.

Environment

  • Operating system: Windows 11 23H2
  • System architecture: -
  • Installation method: WinGet
  • PWAsForFirefox extension version: 2.10.1
  • PWAsForFirefox native version: 2.9.1
  • PWAsForFirefox runtime version: 122.0
  • Firefox version: 121.0.1
@Dajova Dajova added the bug Something isn't working label Jan 25, 2024
@filips123
Copy link
Owner

Because winget packages need to go through PR to get added to their repository, there is some delay between when a new version is released and when it's available in winget.

However, 2.10.1 specifically should already be available in the winget repo. You can try updating the source before installing the new package version:

winget source update

Maybe you can also use:

winget upgrade firefoxpwa

Which I think automatically updates the source and then upgrades the package.

@Dajova
Copy link
Author

Dajova commented Jan 25, 2024

Did all those. Still says it's outdated, while no new updates could be found. it's only when i install it manually that the extension removes the "outdated" message.
PWA itself is already updated to latest version, its just the extension that cant find it. Even if the extension itself is fully updated to the latest version as well.

@filips123
Copy link
Owner

Did all those. Still says it's outdated, while no new updates could be found. i

I don't know why this happens. The PR to update the winget package (microsoft/winget-pkgs#135747) has been merged two days ago. I also tried to run winget install firefoxpwa --version 2.10.1 and it works for me. Maybe something is configured differently in your winget settings?

PWA itself is already updated to latest version, its just the extension that cant find it.

There are two separate programs. One is the extension (which is updated automatically by Firefox), and one is for the native connector (which you need to update yourself, either by running the installer, using winget or other package managers). It seems that your extension is already updated to the latest version (2.10.1), while the native connector is still outdated (2.9.1).

You can also check which native version do you have with:

firefoxpwa --version

That version should match the native version specified on the "about the project" screen in the extension settings. You should also check the installed programs in the Windows Settings or Control Panel if there are multiple PWAsForFirefox entries listed. If the versions don't match or you have multiple entries, maybe you have multiple versions installed at the same time, which may cause problems.

But I think that your problem is that winget repository isn't updated for you for some reason.

Also, the message in the extension is actually wrong, it should say something like "The native connector is outdated". I will fix this in the future, and it's not the cause of your problem.

@Dajova
Copy link
Author

Dajova commented Jan 25, 2024

Yeah, as stated in the "Environment" section of the report, the actual version is on 2.10.1, but the "native" version is stuck on 2.9.1, for some reason. The command you stated returns 2.10.1 as well. So winget does get the correct version and it is installed, but the extension doesn't find it and hence return that it's outdated.
My guess is that because it's not installed in the default location, but on a different drive, the extension doesn't find it and hence only a manual installation fixes it, because that's how it was originally installed as.

@filips123
Copy link
Owner

Yeah, then you may have multiple versions installed. One in your custom location, which is the one that the extension detects and is outdated. And another (probably in the default location), which is installed by winget, is up-to-date and in PATH. You can run where firefoxpwa to see where it's actually installed.

Apparently, winget has support to change the installation directory: microsoft/winget-cli#489 (comment)

You can try to uninstall the program both from winget and manually from the control panel, so all versions get removed. You can also manually remove some registry keys and directories, but before removing them, please post here which ones exist and where they point to, so I can know a bit better what exactly might have happened. So, this should clean all registrations for native messaging and any remaining directories (except PWAs and data).

After this, you can try to install the package with winget and specify the installation directory:

winget install firefoxpwa --location "C:\Folder\Software.Name"

Hopefully, winget will remember that location and correctly install future upgrades.

If that doesn't work, I don't know how to fix this properly. I know that the installer has some problems (see #268), and maybe this is also one of them. But I think that winget also has problems with some installers on their side.

@Dajova
Copy link
Author

Dajova commented Jan 25, 2024

Alright, that did the trick. Cleared the registry keys and removed both installations (kept just the config file, which held the profiles). The registry keys for both HKCU paths had entries to them, directing them to the custom location, but not any of the HKLM ones. Cleared everything and now it's updated and working correctly.

@filips123
Copy link
Owner

I hope it will remain working with future updates. I will now close this issue. If something breaks again, please let me know (although I am not sure what to do in that case).

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

2 participants