Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-WebRequest error while exporting the apps #213

Open
venku2208 opened this issue Oct 20, 2023 · 2 comments
Open

Invoke-WebRequest error while exporting the apps #213

venku2208 opened this issue Oct 20, 2023 · 2 comments

Comments

@venku2208
Copy link

Hi @ahaydon,

i am trying to export the apps using following code

Get-PfxCertificate -FilePath C:\Certificates\CLI\client.pfx |
Connect-Qlik -ComputerName siiplqlikdev -Username siiplqlikdev\qlikservice -TrustAllCerts
$myserver = "siiplqlikdev"
$folder = "c:\Qlik Backup"
Connect-Qlik $myserver ## check https://github.com/ahaydon/Qlik-Cli for details
foreach($qvf in $(get-qlikapp)) {
if ($qvf.published -and $qvf.stream.name) { # Is it published?
$streamfolder = $qvf.stream.name
If(!(test-path "$folder$streamfolder")) # Create a folder if it does not exists
{
New-Item -ItemType Directory -Force -Path "$folder$streamfolder"
}
} else {
$streamfolder = ""
}
Export-QlikApp -id $qvf.id -filename "$($folder)$($streamfolder)$($qvf.name).qvf" #dumps the qvf
}

but i am getting following error at the export

Invoke-WebRequest : Content-Length or Chunked Encoding cannot be set for an operation that does not write data.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:60 char:23
$result = Invoke-WebRequest @paramInvokeRestMethod @params -UseBasic ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], ProtocolViolationException
FullyQualifiedErrorId : System.Net.ProtocolViolationException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Thanks in advance

@janci007
Copy link

It seems it is caused by this commit:
4e91750#diff-02c3a6f2e0c2360ed3df742a4b8788ce2410235316b35081299fe4128f6ae3bfR56

@ahaydon
Copy link
Owner

ahaydon commented Nov 1, 2023

It seems it is caused by this commit: 4e91750#diff-02c3a6f2e0c2360ed3df742a4b8788ce2410235316b35081299fe4128f6ae3bfR56

This looks like the culprit, though that commit is only in the beta release so it should be working in the v1.22.0 release.
The next release is long overdue anyway so I'll push a fix and a new release.

ahaydon added a commit that referenced this issue Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants