winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

DSC error that tells you to check log should suggest where LOG is

Open KevinLaMS opened this issue 10 months ago • 2 comments

Brief description of your issue

I created .winget file pointing to private store app. This will fail the Store access from winget, because i need to log in to the store.

Error: Apply :: WinGetPackage The configuration unit failed while attempting to test the current system state. An error occurred while searching for packages: CatalogError <See the log file for additional details>

My issues:

  1. CatalogError: This is pretty cryptic. Why not just say we cannot access the Source if that is the issue.
  2. "<See the log file for additional details>" Why make me do extra work when winget can tell me: OPTIONS A) See C:\Users\WDAGUtilityAccount\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-2024-04-11-09-03-54.698.log for additional details.

B) suggest, Re-Run the command with the --Logs and --verbose-logs for additional details.

C) Simply tell the user what is wrong so they do not need to look at the log.

image

Steps to reproduce

In SandBox, run the following .winget once you have updated the id to be canary build of a store app that requires permission

properties: configurationVersion: 0.2.0 resources:

  • directives: allowPrerelease: true description: private app resource: Microsoft.WinGet.DSC/WinGetPackage settings: id: source: msstore

Expected behavior

Better error handling. see suggestions

Actual behavior

image

Environment

C:\Users\WDAGUtilityAccount>winget --info
Windows Package Manager v1.7.10861
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.1000
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0

KevinLaMS avatar Apr 11 '24 16:04 KevinLaMS

[Policy] Area-Output [Policy] Command-Configure

mdanish-kh avatar Aug 25 '24 08:08 mdanish-kh

I am upvoting this as it annoyed me again: Apply :: VSComponents The configuration unit failed while attempting to test the current system state. Provided Installation Configuration file does not exist at C:\Users\kevinla\source\repos\winget-cli-restsource.configurations...vsconfig <See the log file for additional details> Some of the configuration was not applied successfully.

KevinLaMS avatar Sep 16 '24 21:09 KevinLaMS