Error on deploy after upgrade from 3.13.10 to 3.17.6

Hi.

We’ve just tried to upgrade our Octopus Server from version 3.13.10 to 3.17.6.
After the upgrade we get error on powershell scripts interpretation on Octopus Script Modules.
It looks like it can’t decode special chars (such as - ) correctly.

ERROR LOG EXAMPLE:
Executing script on 'PRV-WEVM-SLI06’
March 2nd 2018 11:11:08Warning
Failed to import Script Module 'HAProxy Off/On Rotation V2’
March 2nd 2018 11:11:08Error
At C:\Octopus\Work\20180302111105-3676\Library_HAProxyOffOnRotationV2_636555858
March 2nd 2018 11:11:08Error
670274862.psm1:13 char:11
March 2nd 2018 11:11:08Error
foreach â?"parallel ($ha in $haproxyIP){
March 2nd 2018 11:11:08Error
~
March 2nd 2018 11:11:08Error
Missing opening ‘(’ after keyword ‘foreach’.
March 2nd 2018 11:11:08Error
At C:\Octopus\Work\20180302111105-3676\Library_HAProxyOffOnRotationV2_636555858
March 2nd 2018 11:11:08Error
670274862.psm1:59 char:125
March 2nd 2018 11:11:08Error
… mputername “CAT-WE-VM-WEB01-88” -state “maint” -haproxyIP "10.1.0.59"
March 2nd 2018 11:11:08Error
~
March 2nd 2018 11:11:08Error
The string is missing the terminator: ".
March 2nd 2018 11:11:08Error
At C:\Octopus\Work\20180302111105-3676\Library_HAProxyOffOnRotationV2_636555858
March 2nd 2018 11:11:08Error
670274862.psm1:1 char:33
March 2nd 2018 11:11:08Error
workflow Invoke_HAProxyRotation {
March 2nd 2018 11:11:08Error
~
March 2nd 2018 11:11:08Error
Missing closing ‘}’ in statement block or type definition.
March 2nd 2018 11:11:08Error
CategoryInfo : ParserError: (:slight_smile: [], ParentContainsErrorRecordEx
March 2nd 2018 11:11:08Error
ception
March 2nd 2018 11:11:08Error
Preformatted text FullyQualifiedErrorId : MissingOpenParenthesisAfterKeyword
March 2nd 2018 11:11:08Error
March 2nd 2018 11:11:08Error
The remote script failed with exit code 1
END OF LOG ERROR

Do you have any ideia how we can get this to work?

Thank you.
Joel Ferreira

It looks like wrong encoding of source file, may be octopus now converts it.

Hi.
Where can I find the source file?

Thanks.
JF

Failed to import Script Module 'HAProxy Off/On Rotation V2’
Do You use script from nuget package or content of script pasted in deployment step or may be some library step?

It’s an Library script module. Script text is pasted on Octopus web interface.

Check the code in UI, may be You have copy/past wrong symbol like this

The symbol it’s an "-"
This happened after the upgrade, so no wrong copy paste.
Still, we replaced the script (copied from notepad) and got the same result.

Could You replace the symbol near ‘parallel’ on Alt+46 (https://en.wikipedia.org/wiki/Alt_code) and past in again?

Hi Andrei.

Thanks for your help.
I’ve replaced with ALT+45. It works.
I’m testing the upgrade again.
I’ll get back to you with more news,

Thanks for your help!
JF

Im very glad to see this!

Hi,

Thanks for coming to the rescue @Andrei_Rochev! It looks like everything is in order here. :slight_smile:

Feel free to let me know if there are any further problems here @joel_ferreira.

Best regards,

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