microsoft / vscode-azureAutomation

MIT License
17 stars 4 forks source link

Unable to publish Runbook from Azure Automation Extension. #23

Closed bzabber closed 1 year ago

bzabber commented 1 year ago

Does this occur consistently? Repro steps:

1. 2.

Action: automation.publishRunbook Error type: Error Error Message: Request failed with status code 401

Version: 1.1.0 OS: win32 OS Release: 10.0.22621 Product: Visual Studio Code Product Version: 1.76.2 Language: en

Call Stack ``` e.exports extension.js:2:1340252 e.exports extension.js:2:1342668 IncomingMessage. extension.js:2:1333305 ```
c-s-cott commented 1 year ago

I got the same error trying to "Save as Draft"

Action: automation.saveAsDraft Error type: Error Error Message: Request failed with status code 401

Version: 1.1.0 OS: win32 OS Release: 10.0.19044 Product: Visual Studio Code Product Version: 1.76.2 Language: en

Call Stack ``` e.exports extension.js:2:1340252 e.exports extension.js:2:1342668 IncomingMessage. extension.js:2:1333305 ```
Kapilhk commented 1 year ago

Hi @bzabber , @c-s-cott, Thanks for bringing this up. This is mainly due to the fact that Authorization token expires due to longer time frame between the login/extension launch and the attempt to publish Draft version.

While we attempt to fix it, Please use the following simple workaround:

Try clicking on another Automation Account in left tree view and the return back to current account and attempt the save/publish.

This will refresh the access

Shruti-MS commented 1 year ago

@bzabber , @c-s-cott This issue has been resolved in beta version: can be installed as pre-release from marketplace. Do share feedback on marketplace or reopen issue if problem persists. The beta version be pushed as default by next week.

kapil-azure-automation commented 1 year ago

This is fixed in newer versions. Thanks