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

Package installed from private repository is being listed as being installed from public repository #227

Open
Smith8154 opened this issue Jan 12, 2024 · 6 comments

Comments

@Smith8154
Copy link

Brief description of your issue

When installing an application from our internal WinGet repository, WinGet is listing the package as being installed from the public WinGet repository.

Steps to reproduce

Upload a package to an internal WinGet repository, where the same package exists in the public WinGet repository.
Install the package from the private repository.
Export the list of installed packages. It will show the package as being installed from the public repository, not the private one.

Expected behavior

I would expect WinGet to show the package as being installed from the correct repository.

Actual behavior

WinGet shows the package as being installed from the wrong repository.

Environment

Windows Package Manager v1.6.3482
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.3803
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3482.0
@Smith8154
Copy link
Author

This doesn't seem to be an issue on every machine. I just pushed the package to 35 machine and it is reporting incorrectly on about half of them.

@denelon
Copy link
Contributor

denelon commented Jan 12, 2024

Was this application installed on any of the devices before the push?

It's possible an entry from the installed database showed winget as the source before the private source was added.

Possible work around:
If you can test, try uninstalling the app and then reinstalling from the private source.

We don't have a notion of an order of preference for a source when the package is available in more than one source yet.

@Smith8154
Copy link
Author

Yes, the application was already installed. I tried to upgrade it to a newer version.

Unfortunately, uninstalling it and reinstalling did not work. I even updated the package to have the same ID as the public repository to see if that would help, but it did not. Oddly enough, this was not an issue with the previous version.

In doing this testing, I may have found why I am having issues. I am having trouble with the internal repository after I uploaded a new version of an (unrelated) application. It looks like that may be keeping WinGet from exporting packages from the private repository. This is the error I am seeing on the other repository:

2024-01-12 01:06:16.583 [REPO] Finding available package from installed package using system reference search: Query:[none] Include:ProductCode='sapgui'[Exact] Include:NormalizedNameAndPublisher='sapguiforwindows'+'sapse'[Exact] Include:NormalizedNameAndPublisher='sapguiforwindows(x86)'+'sapse'[Exact]
2024-01-12 01:06:16.586 [REPO] Sending http GET request to: https://internal-repo-url.net/api/packageManifests/Company.SAPGUI
2024-01-12 01:06:16.690 [REPO] Response status: 200
2024-01-12 01:06:16.691 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerSharedLib\Versions.cpp(573)\WindowsPackageManager.dll!00007FF888AF6324: (caller: 00007FF888AF8E05) Exception(1) tid(727c) 80070057 The parameter is incorrect.

@denelon
Copy link
Contributor

denelon commented Jan 12, 2024

@Smith8154 I'm going to transfer this issue to the winget-cli-restsource repository so we can look into troubleshooting what went wrong since it seems like it may be an issue with the REST implementation then.

@denelon denelon transferred this issue from microsoft/winget-cli Jan 12, 2024
@Smith8154
Copy link
Author

@denelon Is there anyone who can help me look into this?

@Smith8154
Copy link
Author

Below is the YAML for the manifest. I only started having this issue after I uploaded version 8.05 to the repository.

{
    "Data": {
        "PackageIdentifier": "Company.SAPGUI",
        "Versions": [
            {
                "PackageVersion": "8.03",
                "DefaultLocale": {
                    "PackageLocale": "en-US",
                    "Publisher": "SAP SE",
                    "PackageName": "SAP GUI",
                    "License": "Proprietary",
                    "ShortDescription": "SAP GUI"
                },
                "Installers": [
                    {
                        "InstallerIdentifier": "aa2ce3e7-aedc-426d-b208-48c382a25720",
                        "InstallerSha256": "9c56f0badee3c921721fdca9a5dda780646c9190defb34956184c237384fd96e",
                        "InstallerUrl": "https://internalwingetrepo.net/abunchofstuff",
                        "Architecture": "x86",
                        "InstallerLocale": "en-US",
                        "InstallerType": "exe",
                        "Scope": "machine",
                        "InstallModes": [
                            "silent"
                        ],
                        "InstallerSwitches": {
                            "Silent": "/silent",
                            "Custom": "/package=\"CompanySAPGUI8.032bit\""
                        },
                        "InstallerSuccessCodes": [
                            129
                        ],
                        "InstallerAbortsTerminal": false,
                        "ReleaseDate": "0001-01-01T00:00:00",
                        "InstallLocationRequired": false,
                        "RequireExplicitUpgrade": false,
                        "AppsAndFeaturesEntries": [
                            {
                                "DisplayName": "SAP GUI for Windows 8.00 32bit  Patch 3",
                                "Publisher": "SAP SE",
                                "DisplayVersion": "8.00 Compilation 1",
                                "ProductCode": "SAPGUI"
                            }
                        ],
                        "DisplayInstallWarnings": false
                    }
                ]
            },
            {
                "PackageVersion": "8.05",
                "DefaultLocale": {
                    "PackageLocale": "en-US",
                    "Publisher": "SAP SE",
                    "PackageName": "SAP GUI",
                    "License": "Proprietary",
                    "ShortDescription": "SAP GUI"
                },
                "Installers": [
                    {
                        "InstallerIdentifier": "a062c1f0-6520-4d10-9c1d-5ec2f580e392",
                        "InstallerSha256": "8b9c6aeb2e33ba7424e788d10ea41c2261f9eca91b108a6d2c944be75ca86643",
                        "InstallerUrl": "https://internalwingetrepo.net/abunchofstuff",
                        "Architecture": "x86",
                        "InstallerLocale": "en-US",
                        "InstallerType": "exe",
                        "Scope": "machine",
                        "InstallModes": [
                            "silent"
                        ],
                        "InstallerSwitches": {
                            "Silent": "/silent",
                            "Custom": "/package=\"CompanySAPGUI8.00_32bit\""
                        },
                        "InstallerSuccessCodes": [
                            129
                        ],
                        "InstallerAbortsTerminal": false,
                        "ReleaseDate": "0001-01-01T00:00:00",
                        "InstallLocationRequired": false,
                        "RequireExplicitUpgrade": false,
                        "AppsAndFeaturesEntries": [
                            {
                                "DisplayName": "SAP GUI for Windows 8.00 32bit  Patch 5",
                                "Publisher": "SAP SE",
                                "DisplayVersion": "8.00 Compilation 1",
                                "ProductCode": "SAPGUI"
                            }
                        ],
                        "DisplayInstallWarnings": false
                    }
                ]
            }
        ]
    },
    "UnsupportedQueryParameters": [],
    "RequiredQueryParameters": []
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants