Archy VS Code error exit code:99

I am getting the following error when doing a run task in terminal

archy publish ( --recreate )

archy publish --recreate --file <path to the inboundCallHelloWorldFlow.yaml file> 

2021-07-31T02:23:23.009Z: *****************************************************************************************
2021-07-31T02:23:23.009Z: Archy - Architect Yaml Flow Processor ver. 1.5.1 - Failure
2021-07-31T02:23:23.009Z: *****************************************************************************************
2021-07-31T02:23:23.009Z: DateTime: Sat Jul 31 2021 12:23:23 GMT+1000 (Australian Eastern Standard Time)
2021-07-31T02:23:23.009Z:
2021-07-31T02:23:23.009Z: Summary
2021-07-31T02:23:23.009Z:
2021-07-31T02:23:23.009Z: Command: 'publish'
2021-07-31T02:23:23.009Z:
2021-07-31T02:23:23.009Z: Input YAML File: /Users/stavrosvossos/archy/archyHome/dev/inboundCallHelloWorldFlow.yaml
2021-07-31T02:23:23.009Z:
2021-07-31T02:23:23.009Z: Flow Name: 'Archy Hello World'
2021-07-31T02:23:23.009Z:
2021-07-31T02:23:23.009Z: SUCCESS! - the flow has no validation errors or warnings.
2021-07-31T02:23:23.009Z: Architect Scripting session ended in error ( code: 99 )
2021-07-31T02:23:23.009Z:
2021-07-31T02:23:23.009Z: error(s) encountered.
2021-07-31T02:23:23.009Z: - Architect Scripting errors will be listed above.
2021-07-31T02:23:23.009Z:
2021-07-31T02:23:23.009Z: Log: /Users/stavrosvossos/archy/archyHome/debug/archy-debug-2021-07-31T02.23.14.331Z.txt
2021-07-31T02:23:23.099Z: execution complete.
2021-07-31T02:23:23.099Z:
2021-07-31T02:23:23.099Z: exit code: 99
2021-07-31T02:23:23.099Z:
2021-07-31T02:23:23.099Z: ensureDirectoryExists - the directory '/Users/stavrosvossos/archy/archyHome/debug' exists.
2021-07-31T02:23:23.099Z: Writing log contents to '/Users/stavrosvossos/archy/archyHome/debug/archy-debug-2021-07-31T02.23.14.331Z.txt'.

Hi Stav,

Thanks for reaching out! In this output there is these lines:

2021-07-31T02:23:23.009Z: error(s) encountered.
2021-07-31T02:23:23.009Z: - Architect Scripting errors will be listed above.

There should be some additional logging above the output that you sent here that should indicate what went wrong with the flow creation/publishing. Could you see if you can find anything more in your error output/debug log file to help us figure out what went wrong?

Thanks,
Jon

Hi Jon,

Thanks, looking at the debug output a little more closely.

Looks like its unable to delete the 'Archy Hello World' flow.

2021-07-31T02:23:22.893Z: - ERROR! could not delete the existing flow named 'Archy Hello World' (id: '57662b10-6a14-4aee-b503-3b632eea9b15')

  • Error Code: ARCHITECT_FLOW_CANNOT_DELETE_USED_IN_IVR_CONFIGS^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m
    2021-07-31T02:23:22.893Z: - ERROR! promise unhandled exception caught. Error: - ERROR! could not delete the existing flow named 'Archy Hello World' (id: '57662b10-6a14-4aee-b503-3b632eea9b15')
  • Error Code: ARCHITECT_FLOW_CANNOT_DELETE_USED_IN_IVR_CONFIGS^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m^[[36m -- [ArchAsyncTracker]^[[39m
    2021-07-31T02:23:22.894Z: - a promise was added, resetting count to 1.^[[36m -- [ArchAsyncTracker]^[[39m
    2021-07-31T02:23:22.894Z: - createAsync - getting division information for the new flow^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m
    2021-07-31T02:23:22.894Z: - createAsync - new flow's division will be [Id:'02d89520-8dbe-4434-9eb0-f68c1c67f767', Name:'Home', IsHomeDivision:true, Type:'ArchDivision']^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m
    2021-07-31T02:23:22.894Z: - createAsync - delete processing done, now attempting to create flow with the name 'Archy Hello World'^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m
    2021-07-31T02:23:22.894Z: - calling url^[[36m -- [POST::https://api.mypurecloud.com.au/api/v2/flows]^[[39m
    2021-07-31T02:23:23.005Z: - ^[[35mresponse received - statusCode:409, statusMessage:Conflict, correlationId:93978a0c-a815-41e8-ab27-fbb0c85e7c9a^[[39m^[[36m -- [POST::https://api.mypurecloud.com.au/api/v2/flows]^[[39m
    2021-07-31T02:23:23.006Z: - ERROR! createAsync - failed to create.^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m
    2021-07-31T02:23:23.006Z: - ERROR! saveAsync - creation failed.^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m
    2021-07-31T02:23:23.006Z: - ERROR! publishAsync - could not save the flow named 'Archy Hello World' (id: '__script_flow__135')
  • ERROR! saveAsync - creation failed.^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m
    2021-07-31T02:23:23.006Z: - ERROR! session startup initialization for startWithClientIdAndSecret complete. Caught unhandled exception waiting for callback function returned promise to resolve.^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.007Z: - ERROR! ArchSession.startWithClientIdAndSecret - Caught unhandled exception during callback function execution. Ending session. Exception info: - ERROR! publishAsync - could not save the flow named 'Archy Hello World' (id: '__script_flow__135')
  • ERROR! saveAsync - creation failed.^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m^[[36m -- [Name:'Archy Hello World', Type:'ArchFlowInboundCall']^[[39m^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.007Z: - ERROR! ending the Session. Setting the exit code to 99.^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.007Z: - waiting for any pending work to complete before ending the session^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.007Z: - waiting for any pending work to complete before ending the session^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.007Z: - setting session status to 'ended'.^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.007Z: - waiting for any pending work to complete before ending the session^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.008Z: - setting session status to 'ended'.^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.008Z: - waiting for any pending work to complete before ending the session^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.008Z: - ending with exit code: 99^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.008Z: - the session is ending but is not configured to terminate the process in which it is running.^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.008Z: - ending with exit code: 99^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.008Z: - the session is ending but is not configured to terminate the process in which it is running.^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.008Z: - resolving session start promise.^[[36m -- [ArchSession, Environment:'prod', Host:'apps.mypurecloud.com.au', Region:'ap-southeast-2', ArchSessionId:'Bk5zNEfkF', OrgName:'TelstraAUEngineering', OrgId:'1515da9f-7dc4-42f8-b813-05d7c24a1b20']^[[39m
    2021-07-31T02:23:23.008Z: setting the Archy exit code to 99
    2021-07-31T02:23:23.008Z: An error occurred.

Hi Stav,

It looks like the flow named Archy Hello World is currenty being used in a Call Routing IVR config. If you remove the flow from the IVR that is consuming this flow, you will then be able to delete it. Alternatively, if you do not actually wish to delete this flow and instead publish a new version, you can just remove the --recreate command line parameter.

Thanks,
Jon

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