Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
We send out NPrinting report every day. Currently Customer has Qlik Sense SaaS and we have deployed QSEoW and NPrinting on seperate servers. We have created a cli script which does the following operations:
This script was working fine till last week and all the apps were getting properly migrated from SaaS to On prem and our NPrinting reports were also getting generated properly.
Unfortunately, since yesterday evening we are facing a new issue which seems to be cli/api related issue.
While the exporting and importing of apps are working fine while replacing old app with new app
Error message:
Invoke-RestMethod : Content-Length or Chunked Encoding cannot be set for an operation that does not write data.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\1.22.0\functions\core.ps1:66 char:23
+ ... $result = Invoke-RestMethod @paramInvokeRestMethod @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-RestMethod], ProtocolViolationException
+ FullyQualifiedErrorId : System.Net.ProtocolViolationException,Microsoft.PowerShell.Commands.InvokeRestMethodCo
mmand
Would really appreciate some inputs by fellow Qlik experts.
@Sonja_Bauernfeind ...would love to get some help from you guys.
If the script was working then suddenly stopped working, that suggests something has changed.
If the script has not been changed then something on the Operating system must have been changed.
Based on the Error Message you are currently using Qlik-CLI-Windows version 1.22.0 the update to that version
V1.22.0 Update Commit included a Change in the "Core.ps1" that added $params.Header.Add("Transfer-Encoding", "chunked") which seems to match the error you are seeing.
It may be worth rolling back to a previous version of Qlik-CLI-Windows and giving that a try.
Never works on our system even with old release of Qlik-cli.
Any idea?
FMa
if not working with older release of Qlik-CLI can you confirm that the error message is different? if you have multiple versions installed, PowerShell will default to the newest version.
If is using a different version then the path shown in the error message should also be different.
As an alternative option, you could also try QlikSenseCLI (Installation)
most of the commands are fairly similar to the module you are using, so converting the script should be pretty straight forward.
Connect-Qlik => Connect-QlikSense
Invoke-QlikPut => Invoke-QSPut
Invoke-QlikGet => Invoke-QSGet
Get-QlikApp => Get-QSApp
for uploading the App Binary
$New = Add-QSApp -AppPath "\\path\to\file.qvd" -Name "Name Of Uploaded App" -Upload
and replacing the current app
Update-QSApp -Id $($new.id) -Replace -App $($old.id)
of you can use the experimental UploadReplace API
Add-QSApp -AppPath \\path\to\file.qvd -Targetappid $old.id -UploadReplace
By any chance could it be clarified if the issue occurs when using qlik-cli for SAAS or if it fails when things are getting pushed to QS on prem ?
Kind Regards.