powershell terminal keeps crashing

Offen
#6,680 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
18/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
cpp, csharp, powershell
Bereich
cli

Rechercherichtung

The stack trace names WinGetCommandNotFoundFeedbackPredictor.WarmUp, which calls FinderCommand.FindPackages and then ManagementDeploymentFactory.Create, where the COM call fails with HRESULT -2147023174. Start with the predictor's warm-up path and the factory's COM creation, then reproduce on Windows with a PowerShell 7 profile. Done means the predictor fails gracefully and the terminal stays open.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Issue-Bug PowerShell
Relevant area(s)

WinGet CLI, PowerShell Module

Relevant command(s)

No response

Brief description of your issue

Unhandled exception. System.Management.Automation.CmdletInvocationException: Failed to create instance: -2147023174 ---> System.Runtime.InteropServices.COMException (0x800706BA): Failed to create instance: -2147023174 at Microsoft.WinGet.Client.Engine.Helpers.ManagementDeploymentFactory.Create[T](Type type, Guid& iid) at Microsoft.WinGet.Client.Engine.Helpers.ManagementDeploymentFactory.CreateCreateCompositePackageCatalogOptions() at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.GetPackageCatalogReference(CompositeSearchBehavior behavior) at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.GetPackageCatalog(CompositeSearchBehavior behavior) at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.FindPackages(CompositeSearchBehavior behavior, UInt32 limit, PackageFieldMatchOption match) at Microsoft.WinGet.Client.Engine.Commands.Common.FinderExtendedCommand.FindPackages(CompositeSearchBehavior behavior, PackageFieldMatchOption match) at Microsoft.WinGet.Client.Engine.Commands.FinderPackageCommand.<>c__DisplayClass1_0.<Find>b__0() at Microsoft.WinGet.Client.Engine.Commands.Common.ManagementDeploymentCommand.Execute[TResult](Func1 func)
at Microsoft.WinGet.Client.Engine.Commands.FinderPackageCommand.Find(String psPackageFieldMatchOption)
at Microsoft.WinGet.Client.Commands.FindPackageCmdlet.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at Microsoft.WinGet.CommandNotFound.WinGetCommandNotFoundFeedbackPredictor.WarmUp()
at System.Threading.Tasks.Task.<>c.b__135_1(Object state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerDoWork(PortableThreadPool threadPoolInstance)
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback(Thread* pThread)

[process exited with code 3762504530 (0xe0434352)]
You can now close this terminal with Ctrl+D, or press Enter to restart.`

Steps to reproduce

open the terminal, open a ps1 file, after few seconds it will give this error

Expected behavior

no error on terminal

Actual behavior

crash terminal

Environment
Windows Terminal Preview
Version: 1.26.3133.0
PowerShell 7.7.0
x64
win11 insiders 26h2: 26360.9882
winget version: v1.30.300
Vorherrschende Sprache
C++
Sterne
26.6k
Forks
1.8k
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
41

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/winget-cli

Alle Issues in microsoft/winget-cli

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.