powershell terminal keeps crashing

Aberta
#6,680 3 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
18/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
cpp, csharp, powershell
Domínio
cli

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
C++
Estrelas
26.6k
Forks
1.8k
Merge médio
3d 10h
PRs com merge (30d)
41

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoft/winget-cli

Todas as issues de microsoft/winget-cli

Issues semelhantes

Mais issues de C++

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.