azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Update-AzureRmProfile - Error: UseBasicParsing

Open peppekerstens opened this issue 8 years ago • 3 comments

Description

While trying steps following: https://docs.microsoft.com/en-us/azure/azure-stack/user/azure-stack-version-profiles-powershell.

Having multiple issues:

  1. (get-azurermprofile).module claims that not all modules are installed
  2. Install-AzureAzureRmProfile does not seem to work/respond at all/do what it is supposed to do
  3. Update-AzureRmProfile throws errors on needing Internet Explorer.

Check Reproduction

Script/Steps for Reproduction

PS C:\WINDOWS\system32> install-module azurerm.bootstrapper

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
PS C:\WINDOWS\system32> Install-AzureRMProfile -Profile 2017-03-09-profile

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
PS C:\WINDOWS\system32> get-azurermprofile


ProfileName : 2017-03-09-profile
Modules     : {AzureRM : 1.2.11
              , AzureRM.Compute : 1.2.3.4
              , AzureRM.Storage : 1.0.5.4
              }

WARNING: Some modules from profile(s) latest were not installed. Use Install-AzureRmProfile to install missing modules.


PS C:\WINDOWS\system32> (get-azurermprofile).modules
WARNING: Some modules from profile(s) latest were not installed. Use Install-AzureRmProfile to install missing modules.
PS C:\WINDOWS\system32> get-package azurerm.storage

Name                           Version          Source                           ProviderName
----                           -------          ------                           ------------
AzureRM.Storage                1.0.5.4          https://www.powershellgallery... PowerShellGet


PS C:\WINDOWS\system32> get-package azurerm

Name                           Version          Source                           ProviderName
----                           -------          ------                           ------------
AzureRM                        1.2.11           https://www.powershellgallery... PowerShellGet


PS C:\WINDOWS\system32> Install-AzureRMProfile -Profile 2017-03-09-profile
PS C:\WINDOWS\system32> (get-azurermprofile).modules
WARNING: Some modules from profile(s) latest were not installed. Use Install-AzureRmProfile to install missing modules.
PS C:\WINDOWS\system32> Install-AzureRMProfile -Profile 2017-03-09-profile
PS C:\WINDOWS\system32> Update-AzureRmProfile -Profile 2017-03-09-profile
Invoke-CommandWithRetry : The response content cannot be parsed because the Internet Explorer engine is not available,
or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try
again.
At C:\Program Files\WindowsPowerShell\Modules\AzureRM.BootStrapper\0.3.0\AzureRM.BootStrapper.psm1:104 char:18
+   $WebResponse = Invoke-CommandWithRetry -ScriptBlock $ScriptBlock
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [Invoke-CommandWithRetry], NotSupportedException
    + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Invoke-CommandWithRetry

Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\AzureRM.BootStrapper\0.3.0\AzureRM.BootStrapper.psm1:118 char:3
+   $OnlineProfileMapETag = $WebResponse.Headers["ETag"]
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At C:\Program Files\WindowsPowerShell\Modules\AzureRM.BootStrapper\0.3.0\AzureRM.BootStrapper.psm1:172 char:38
+   $OnlineProfileMap = $WebResponse | ConvertFrom-Json
+                                      ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFrom
   JsonCommand

Loading Profile 2017-03-09-profile

Module Version

Get-Module -Name AzureRM -ListAvailable
    Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.2.11     AzureRM

Environment Data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17134.48
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.48
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1


Debug Output

PS C:\WINDOWS\system32> $DebugPreference = "Continue"
PS C:\WINDOWS\system32> Update-AzureRmProfile -Profile 2017-03-09-profile
Invoke-CommandWithRetry : The response content cannot be parsed because the Internet Explorer engine is not available,
or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try
again.
At C:\Program Files\WindowsPowerShell\Modules\AzureRM.BootStrapper\0.3.0\AzureRM.BootStrapper.psm1:104 char:18
+   $WebResponse = Invoke-CommandWithRetry -ScriptBlock $ScriptBlock
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [Invoke-CommandWithRetry], NotSupportedException
    + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Invoke-CommandWithRetry

Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\AzureRM.BootStrapper\0.3.0\AzureRM.BootStrapper.psm1:118 char:3
+   $OnlineProfileMapETag = $WebResponse.Headers["ETag"]
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At C:\Program Files\WindowsPowerShell\Modules\AzureRM.BootStrapper\0.3.0\AzureRM.BootStrapper.psm1:172 char:38
+   $OnlineProfileMap = $WebResponse | ConvertFrom-Json
+                                      ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFrom
   JsonCommand

Loading Profile 2017-03-09-profile

peppekerstens avatar Jun 01 '18 05:06 peppekerstens

@bganapa Can you take a look at this issue?

maddieclayton avatar Jun 01 '18 06:06 maddieclayton

@peppekerstens Thanks for bringing this up. Looking in to this. @viananth FYI

bganapa avatar Jun 01 '18 16:06 bganapa

This issue is now fixed and an updated Bootstrapper module (v0.5.0) is available for download.

knithinc avatar Jun 03 '19 22:06 knithinc