Ever since I’ve deployed Universal to Azure as standard WebApp, I’ve been receiving this error when running Connect-PSUServer, either manually or when connecting automatically from VSCode extension.
Connect-PSUServer : Response could not be deserialized to JSON: GET https://universal.companyname.com/api/v1/accessible
At line:1 char:1
+ Connect-PSUServer -ComputerName 'https://universal.companyname.com' -App ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-PSUServer], FlurlParsingException
+ FullyQualifiedErrorId : Flurl.Http.FlurlParsingException,UniversalAutomation.ConnectServerCommand
This error has been a thing since 3.9.4 and also happens when trying the new v4 release.
I’ve yet to figure out what the cause is.
@ruben The only time I’ve seen this is when there’s an error with API token. I had this happen after I turned on app token security, then tried to use a token that was generated via the -GrantAppToken parameter of a dashboard. However, this error was fixed in version 3.9.6. With the containers/Azure web app, is there a way to check the PowerShell Universal Logs to see if it has logged an error at the same time as the connection?
At this moment, app token security (Enhanced App Token Security) is disabled and the tokens I’ve tried (with the same result) are the standard one that is created on installation and one that is bound to my identity, created from within the Admin UI.
I’ll try and enable the Enhanced App Token Security and generate a new App Token to see if it changes anything.
The Universal Logs unfortunately do not show anything related to this behavior on any of the settings (informational, debug, warning etc).
Interesting find;
It does not do that in a regular PowerShell console, outside of VSCode.
Should’ve checked that earlier…
Scrap that. Same behaviour, regardless of where I run the Connect-PSUServer command…
In terminal, standalone CLI or through VSCode… As admin, as non-admin…
I’ve been hesitant with updating our environment since V4 has been introduced so currently I’m on 3.9.15 still.
The issue is not present for me on 3.9.15