Snapshot error occurred: Error: Path must be a string. Received undefined

I could deploy previously. Now, this error occurs. What can be the problem ?

Snapshot error occurred: Error: Path must be a string. Received undefined
Validation errors: {
  "stack": [
    "Error: Snapshot error occurred: Error: Path must be a string. Received undefined",
    "    at /var/task/index.js:66012:27"
  ]
}

Error: Error thrown in the snapshot context.
App code snapshot error: Snapshot error occurred: Error: Path must be a string. Received undefined
Learn more about the snapshot context at https://go.atlassian.com/forge-snapshot-context.

Error: Error thrown in the snapshot context.
App code snapshot error: Snapshot error occurred: Error: Path must be a string. Received undefined
Learn more about the snapshot context at https://go.atlassian.com/forge-snapshot-context.
    at ArtifactDeployer.handleErrorEvent (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/out/deploy/deployer/deployer.js:127:23)
    at ArtifactDeployer.pollAndCheckEvents (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/out/deploy/deployer/deployer.js:61:18)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ArtifactDeployer.monitorDeployment (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/out/deploy/deployer/deployer.js:72:28)
    at async ArtifactDeployer.deploy (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/out/deploy/deployer/deployer.js:36:9)
    at async PackageUploadDeployCommand.execute (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/out/deploy/package-upload-deploy.js:14:9)
    at async CommandLineUI.displayProgress (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/node_modules/@forge/cli-shared/out/ui/command-line-ui.js:44:28)
    at async DeployView.reportDeploymentProgress (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/out/command-line/view/deploy-view.js:50:24)
    at async DeployController.run (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/out/command-line/controller/deploy-controller.js:122:27)
    at async Command.actionProcessor (/home/gokcecicek/.nvm/versions/node/v12.17.0/lib/node_modules/@forge/cli/out/command-line/command.js:76:32)
1 Like

Hi @GkeKaraduman,

It looks like an issue in your app code.
Do you remember what did you change between deploying now and previously?

I was able to resolve this issue by downgrading forge-cli from 2.0.7 to 2.0.6.

2 Likes

Hi @GkeKaraduman,

Can you please share some code samples?
I’d be keen to try to reproduce it and understand what the issue is.