Illegal characters in path

I’m trying deploy a package that I just created in teamcity with octo pack, and getting this error:
I’m using octopus 3.3.12

[21:15:14]E: [Octopus Deploy] Failed: Step 1: Deploy to Azure web app
[21:15:14] : [Failed: Step 1: Deploy to Azure web app] Deploying package: C:\Octopus\OctopusServer\PackageCache\feeds-teamcity\MotionCatalyst.Online.1.2.3.99_A01BF7022F422D43A73608420C21EC88.nupkg
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] System.ArgumentException: Illegal characters in path.
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String[] fullPathList, Boolean checkForDuplicates, Boolean needFullPath)
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost)
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.<>c__DisplayClass11_0.b__1(String pattern) in Y:\work\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 184
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Linq.Enumerable.d__162.MoveNext() [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Deployment.Conventions.JsonConfigurationVariablesConvention.Install(RunningDeployment deployment) in Y:\work\14ffc968155e4956\source\Calamari\Deployment\Conventions\JsonConfigurationVariablesConvention.cs:line 32 [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60 [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Deployment.ConventionProcessor.RunConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 28 [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] Running rollback conventions... [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] System.ArgumentException: Illegal characters in path. [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath) [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String[] fullPathList, Boolean checkForDuplicates, Boolean needFullPath) [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.IO.FileSystemEnumerableIterator1…ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption) [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.<>c__DisplayClass11_0.<EnumerateFiles>b__1(String pattern) in Y:\work\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 184 [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Linq.Enumerable.<SelectManyIterator>d__162.MoveNext()
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Collections.Generic.List1…ctor(IEnumerable1 collection) [21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Deployment.Conventions.JsonConfigurationVariablesConvention.Install(RunningDeployment deployment) in Y:\work\14ffc968155e4956\source\Calamari\Deployment\Conventions\JsonConfigurationVariablesConvention.cs:line 32
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Deployment.ConventionProcessor.RunConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 50
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Azure.Commands.DeployAzureWebCommand.Execute(String[] commandLineArguments) in Y:\work\14ffc968155e4956\source\Calamari.Azure\Commands\DeployAzureWebCommand.cs:line 85
[21:15:14]E: [Failed: Step 1: Deploy to Azure web app] at Calamari.Program.Execute(String[] args) in Y:\work\14ffc968155e4956\source\Calamari\Program.cs:line 38
[21:15:14]F: [Failed: Step 1: Deploy to Azure web app] The step failed: The remote script failed with exit code 100
[21:15:14] : [Octopus Deploy] Deploy Online release 1.2.3.99 to Dev: Failed, The deployment failed because one or more steps failed. Please see the deployment log for details.
[21:15:14] : [Octopus Deploy] One or more deployment tasks failed.
[21:15:14] : [Octopus Deploy] Exit code: -1
[21:15:14] : [Octopus Deploy] Octo.exe exit code: -1

more info

Hi Marcus,

Are you using * wildcard characters in the filenames for the JSON configuration variable feature?

Could you send through a screenshot of how you have configured your deployment step that is failing?

Thank you and best regards,
Henrik

Hi Henrik,
I was using, but even removing, still get the same error. See the configuration.

Hi Henrik,
I’ve created a new release without using wildcard, and works.
but if I use src*.json for instance in target files, I get the error.
So, now is working for me (without wildcards), but I don’t know if that is an issue.

Thank you very much for the help.

Hi Marcus,

Yes, this was a bug that was fixed in 3.11.8.

Thank you and best regards,
Henrik