System.Text.Json assembly conflict with Az.Accounts
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
Start by investigating how PSResourceGet loads or references System.Text.Json and compare that with the version loaded by Az.Accounts; the issue provides version and module-path details but names no source files or tests. Reproduce in Windows PowerShell 5.1 by loading PSResourceGet before running Connect-AzAccount -Identity; done means that sequence no longer causes the reported authentication failure.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
If PSResourceGet is loaded in the session, and then try to execute Connect-AzAccount -Identity it produces an error.
If PSResourceGet is not loaded before executing Connect-AzAccount -Identity it works.
Expected behavior
That PSResourceGet being loaded should not cause issues with the execution of other PowerShell modules.
Actual behavior
When PSResourceGet is in the session, it can cause modules like Az.Account to have issues.
Error details
Connect-AzAccount : ManagedIdentityCredential authentication failed: The type initializer for
'Microsoft.Identity.Client.Platforms.net.MsalJsonSerializerContext' threw an exception.
See the troubleshooting guide for more information.
https://aka.ms/azsdk/net/identity/managedidentitycredential/troubleshoot
At line:1 char:1
+ Connect-AzAccount -Identity -ErrorAction Stop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
This appears to be due to the major version differences between the two modules System.Text.Json versions which are conflicting.
Name Version Location
---- ------- --------
System.Text.Json 10.0.0.0 C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.5.3\lib\netstandard2.0\S...
System.Text.Json 8.0.0.6 C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.2...
Environment data
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 1.2.0 Microsoft.PowerShell.PSResourceGet {Compress-PSResource, Find-PSResource, Get-InstalledPSResour...
Key : PSVersion
Value : 5.1.20348.4294
Name : PSVersion
Key : PSEdition
Value : Desktop
Name : PSEdition
Key : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name : PSCompatibleVersions
Key : BuildVersion
Value : 10.0.20348.4294
Name : BuildVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
Visuals
No response
- Linguagem predominante
- C#
- Estrelas
- 578
- Forks
- 114
- Merge médio
- 1d 3h
- PRs com merge (30d)
- 5
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/PSResourceGet
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectoryAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
PowerShell/PSResourceGet#2056 ·
-
feature_request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
PowerShell/PSResourceGet#2013 · 3 comentários ·
-
feature_request Needs-Triage
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
PowerShell/PSResourceGet#2068 ·
-
Needs-Triage
Dificuldade 3/5 Meio dia Facilidade para iniciantes 52/100
PowerShell/PSResourceGet#2066 · 1 comentário ·
-
PSResourceGet 1.3.0-preview2 error when installing AZ ModuleTalvez já em andamento @alerickson assumiu há 6 dias. AbertaNeeds-Triage
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
PowerShell/PSResourceGet#2061 · 1 comentário · 1 responsável ·
Todas as issues de PowerShell/PSResourceGet
Issues semelhantes
-
Format request: .wbpzAbertaenhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
KnifeLemon/Filee#294 ·
Mantenedores costumam responder em até 1 dia
-
応募に出す、展示スペースの図面を作るAbertamtg-decide submission
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Fialuxe/MouthOfGod_System#288 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
gavin-wolfe/wolfden#104 ·
Mantenedores costumam responder em até 1 dia
-
[BUG] BD000104 misses curl/wget pipelines written across lines (implicit string concatenation)Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
[BUG] Still libmicrohttpd dependency is not removed properly from External-Dependency-Info.txt fileTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertatype/bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia