Unable process with Archy - the YAML file contained invalid characters. Please ensure the contents are valid YAML and are formatted correctly

We are finding we are unable to process YAML files with the most recent versions of Archy. The issue occurs with existing YAML files, and when creating a new one from a new essentially blank flow.

2.14.0 is the latest version that processes YAML successfully. All subsequent versions produce the following error.

Command: 'createImportFile'
the YAML file contained invalid characters. Please ensure the contents are valid YAML and are formatted correctly.
error(s) encountered.

Log file:

Downloading https://sdk-cdn.mypurecloud.com/archy/latest/archy-linux.zip...
Archy version 2.15.2
Installing module "powershell-yaml"...
[1 - Phone Bridge and Welcome] (1/1) :running_man: Processing file "/builds/esolutions/service-desk/genesys-configuration/flows/inboundcall/1 - Phone Bridge and Welcome.yaml"...
[1 - Phone Bridge and Welcome] name: "1 - Phone Bridge and Welcome", type: "inboundCall", Git commit hash: 14efcc43599fed347413b7099936121f2323673d 2022-11-28 15:20:42 +1100
[1 - Phone Bridge and Welcome] checking for errors in the flow...
Architect Scripting running under Node version '14.18.3'
ArchSessionId:SkCdxpWvo
options yaml file path '/builds/esolutions/service-desk/genesys-configuration/.archy/config' resolved to '/builds/esolutions/service-desk/genesys-configuration/.archy/config'.
loading yaml from file path '/builds/esolutions/service-desk/genesys-configuration/.archy/config'.
setting the Archy exit code to 100
An error occurred.

 Archy - Architect Yaml Flow Processor ver. 2.15.2 - Failure                         

DateTime: Mon Nov 28 2022 05:00:37 GMT+0000 (Coordinated Universal Time)
Summary
Command: 'createImportFile'
the YAML file contained invalid characters. Please ensure the contents are valid YAML and are formatted correctly.
error(s) encountered.
using '/builds/esolutions/service-desk/genesys-configuration' as the home directory since none was defined.
Log: /builds/esolutions/service-desk/genesys-configuration/debug/archy-debug-2022-11-28T05.00.37.404Z.txt
execution complete.
exit code: 100
WARNING: [1 - Phone Bridge and Welcome] (1/1) :x: inboundCall "1 - Phone Bridge and Welcome" failed to run createImportFile. at /builds/esolutions/service-desk/genesys-configuration/build/run-archy.ps1:111
run-archy.ps1: line 101
run-archy.ps1: line 635
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

My original post was closed, possibly because I did not reply in time.
The error only occurs for the creatImportFile command
Please find attached a newly created test file that failed - Test Archy.yaml
TestArchy.yaml (2.6 KB)

Hi @David_Allchin,

Thanks for reporting this issue, I'll look into this today.

Thanks,
Jon

Hi @David_Allchin,
I wasn't seeing the same issue you were with the attached file. I just had a couple of follow up questions.

I see in the output above you are installing a moudle called powershell-yaml, is this doing anything with the yaml file that could be modifying its contents at all?

Additionally, I am also curious if you run Archy locally on your machine against the YAML file you attached without any external script calling Archy, do you see the same issue?

Thanks,
Jon

Hi @jon.vansteen ,

I'm working with @David_Allchin on this and have completed some testing.

Can confirm the powershell-yaml module is only used to get the flowname from the YAML, regardless have run it directly as below, and you can see the issue still exists unfortunately.

genesys-configuration> .\archy.bat createImportFile --optionsFile ..archy\config --file 'G:\My Drive\Documents\repos\service_desk\genesys-configuration\flows\inboundcall\TestArchy.yaml' --outputDir C:\Users\matt\Downloads --force
Architect Scripting running under Node version '14.18.3'
ArchSessionId:HyAkblBoi
options yaml file path '..archy\config' resolved to 'G:\My Drive\Documents\repos\service_desk\genesys-configuration.archy\config'.
loading yaml from file path 'G:\My Drive\Documents\repos\service_desk\genesys-configuration.archy\config'.
setting the Archy exit code to 100
An error occurred.


 Archy - Architect Yaml Flow Processor ver. 2.16.0 - Failure

DateTime: Wed Jan 18 2023 15:09:10 GMT+1100 (Australian Eastern Daylight Time)

Summary

Command: 'createImportFile'
the YAML file contained invalid characters. Please ensure the contents are valid YAML and are formatted correctly.

error(s) encountered.

using 'G:\My Drive\Documents\repos\service_desk\genesys-configuration' as the home directory since none was defined.
Log: G:\My Drive\Documents\repos\service_desk\genesys-configuration\debug\archy-debug-2023-01-18T04.09.09.803Z.txt
execution complete.

exit code: 100

Hi @Matt_Johansson_CSG and @David_Allchin,

Looking into this more, could you verify that the YAML that you are using for the options file is valid? Looking at this output

options yaml file path '..archy\config' resolved to 'G:\My Drive\Documents\repos\service_desk\genesys-configuration.archy\config'.
loading yaml from file path 'G:\My Drive\Documents\repos\service_desk\genesys-configuration.archy\config'.
setting the Archy exit code to 100

It appears to be processing your options file and then exiting out and reporting the error about invalid characters. Are you pointing towards the correct file for the options file path?

I'll also look at adding some additional information in the logging message in a future version of Archy to the location of the YAML file that is currently being processed and the error is associated with.

If you are still seeing issues after verifying this, could you open a ticket with our care team for this issue? They should be able to help further troubleshoot this issue.

Thanks,
Jon

I've requested @David_Allchin to raise a ticket with care, however I thought I'd give you an update of my troubleshooting today.

When attempting to pass in the optiohs file we receive the error as above, however, if we just declare location and NOT the options file, Archy access the options file based on home directory and can utilise the variables defined in the file.

Hi @Matt_Johansson_CSG,

Thanks for the update.
I'm just curious, what does your options file look like? If possible, would you be able to send it to me? If so, make sure to remove any sensitive information such as any client id / client secret etc.

Thanks,
Jon

Hi @jon.vansteen

Unfortunately as a new user, I can't upload attachments.

However the contents are available here: https://jpst.it/355Eh

Hi @Matt_Johansson_CSG,

Thanks for linking to the file contents you are using. It looks like this is a copied .archy_config file and you had added a couple new properties in it, and such the contents also appear to be JSON. The contents for options files should be in the YAML format.

So for example, you can create a new yaml file called soemthing like optionsFile.yaml (or a different appropriate name) and have the contents be as follows:

clientId: xxx
clientSecret: yyy
location: mypurecloud.com.au
resultsFile: results.json
overwriteResultsFile: true

and then via the command option --optionsFile /path/to/my/optionsFile.yaml.

Here is a couple resources that also talk about using options files on the Archy developer center documentation as well: https://developer.genesys.cloud/devapps/archy/automatedEnvironments, https://developer.genesys.cloud/devapps/archy/commandOverview#parameter-values-and-the-options-file

Let me know if this works for you.

Thanks,
Jon

Thanks @jon.vansteen

I will take a look at this - has the configuration changed for the optionsFile? As we have this in place and working for many months already.

Hi @Matt_Johansson_CSG,

Sorry for the delayed response. So this was a change that went in to validate that the content of the files being processed were valid yaml for Archy to consume during processing. I went back through the changelog and it appears that there is an entry missing for the 2.15.0 release that should have expressed this. I'll make sure to remedy this in the next version of Archy and also on the changelog page itself within the developer center.

Thanks,
Jon

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