Unknown script extension .ps1. (continuation) - OKTA 2020.4.10 (Solved)

Refering to: Unknown script-extension: ps1 - OKTA 2020.4.10 - #5 by Alex_00

We finally managed to solve this issue by looking at the “servertasks.txt” log file that is written on the Octopus server.

Luckily we were running other powershell scripts (without error) in the deploy so it was possible to compare one that worked vs. one that failed.

Here are two log lines that I compared against each other from the server log file.

[“ServerTasks-”,“VBS”,“2021-01-19T13:34:06.5367435+00:00”,“Executing \u0027E:\Octopus\Work\20210119133404-76545-52\Scripts/Deploy/DBscripts/SetProdDatabaseInReadOnlyQA.ps1 \u0027”,"",0]

[“ServerTasks-”,“VBS”,“2021-01-19T13:34:02.6959670+00:00”,“Executing \u0027E:\Octopus\Work\20210119133401-76545-381\Scripts/Deploy/RecycleAppPoolSetPortVarsforSite.ps1\u0027”,"",0]

Compare against the error message you see in Octopus:

As you can see from the servertask log file, one script is referenced as “.ps1 \u0027” and the other as “.ps1\u0027” - this is very hard to spot in the error message printed out in Octopus GUI.

I edited the deploy process to removed the extra blankspaces and now the deploy works.

Should add that before we updated to 2020.04 of Octopus these scripts ran without issue.

So there seems to have been introduced a bug (possibly related to UTF8?) where referenced powershell scripts will fail with a message that ".ps1 "(note the extra space, that we didn’t notice to begin with) is an unknown extension if the step template has an extra blank space after the referenced script.

Hey Alex,

Thanks so much for all the information. Good eye on spotting that space.

I’ll pass this along to our engineers to take a look at.

Please let me know if you have any other questions or concerns.

I hope you have a great rest of your week.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.