liprec / vsts-release-aas

Repository for my Analysis Service Azure pipelines tasks related to Azure Analysis Service or Power BI Premium
Other
27 stars 28 forks source link

Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The TypeConverter was ignored because it already occurs. #32

Closed nbistrekov closed 3 years ago

nbistrekov commented 4 years ago

When we run the CD, we are getting the following error message: 2019-11-13T14:32:10.1696600Z ============================================================================== 2019-11-13T14:32:10.1696834Z Task : Azure Analysis Service Deployment 2019-11-13T14:32:10.1696961Z Description : Deploy Azure Analysis Service databases 2019-11-13T14:32:10.1697055Z Version : 1.2.5 2019-11-13T14:32:10.1697153Z Author : Jan Pieter Posthuma 2019-11-13T14:32:10.1697253Z Help : More Information 2019-11-13T14:32:10.1697401Z ============================================================================== 2019-11-13T14:32:11.2556546Z Added TLS 1.2 in session. 2019-11-13T14:32:12.2685530Z ##[command]Import-Module -Name C:\Program Files\WindowsPowerShell\Modules\AzureRM\6.13.1\AzureRM.psd1 -Global 2019-11-13T14:32:12.4760410Z ##[error]The following error occurred while loading the extended type data file: Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The TypeConverter was ignored because it already occurs. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The member SerializationDepth is already present. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache": The member PropertySerializationSet is already present. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache": The member SerializationMethod is already present. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache": The member PropertySerializationSet is already present. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache": The member SerializationMethod is already present. Error in TypeData "Microsoft.Azure.Commands.Profile.Models.PSAzureContext": The member SerializationDepth is already present. Error in TypeData "Microsoft.Azure.Commands.Profile.Models.PSAzureProfile": The member SerializationDepth is already present.

I saw that somebody already had the same issue, but I was not sure what the resolution is. We are using the On-Premise build and the version of AzureRM.profile we have is: 5.8.3.

Do we need to downgrade to a lower version? If so, which version we should use?

loopfish commented 4 years ago

I am also bumping into this issue trying to execute TMSL script on our custom agents. Also have AzureRM.profile installed, versions: 1.0.9, 2.1.0, 5.8.2, 5.8.3.

The task does work successfully on Azure hosted agent, Win Server 2019, however.

loopfish commented 4 years ago

@nbistrekov I got it to work - make sure you have AzureRM v2.1.0 modules installed, then on your task, go to Advanced settings and ensure you select 'choose Powershell version' and set it to 2.1.0

liprec commented 4 years ago

@loopfish good to hear that you found a solution for this issue. Problem with these kind of tasks is that a) it works OOB on the hosted agents and b) it is not easy/possible to include all the needed modules with the tasks.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.