patrickedqvist/wait-for-vercel-preview

Step is failing within GitHub action

Closed this issue · 3 comments

Currently this nice GitHub Action is failing for us with the following error on your master branch as well as for the release v1.0.6:

Run patrickedqvist/wait-for-vercel-preview@master
  with:
    token: ***
    max_timeout: 300
/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:8680
/******/ 			__webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__);
         			                              ^

TypeError: Cannot read property 'call' of undefined
    at __nccwpck_require__ (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:8680:43)
    at Object.2087 (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:8607:18)
    at __nccwpck_require__ (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:8680:43)
    at Object.7351 (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:156:25)
    at __nccwpck_require__ (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:8680:43)
    at Object.2186 (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:251:19)
    at __nccwpck_require__ (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:8680:43)
    at Object.2932 (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:15:14)
    at __nccwpck_require__ (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:8680:43)
    at /home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/master/dist/index.js:8697:18

The later version v1.0.5 also throws an error as following:

Run patrickedqvist/wait-for-vercel-preview@v1.0.5
internal/modules/cjs/loader.js:800
    throw err;
    ^

Error: Cannot find module '@actions/core'
Require stack:
- /home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/v1.0.5/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/v1.0.5/index.js:1:14)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/v1.0.5/index.js'
  ]
}

And so does the v1.0.4 looping with a 400 error until reaching the timeout (300 seconds in our case):

Run patrickedqvist/wait-for-vercel-preview@v1.0.4
Deployment unavailable or not successful, retrying...
RequestError [HttpError]: Empty value for parameter 'deployment_id': undefined
    at /home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/v1.0.4/node_modules/@octokit/rest/plugins/validate/validate.js:74:15
    at Array.forEach (<anonymous>)
    at /home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/v1.0.4/node_modules/@octokit/rest/plugins/validate/validate.js:42:12
    at Array.forEach (<anonymous>)
    at validate (/home/runner/work/_actions/patrickedqvist/wait-for-vercel-preview/v1.0.4/node_modules/@octokit/rest/plugins/validate/validate.js:15:23)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  name: 'HttpError',
  status: 400,
  headers: {},
  request: {
    method: 'GET',
    baseUrl: 'https://api.github.com',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit.js/16.43.1 Node.js/12.13.1 (Linux 5.4; x64)'
    },
    mediaType: { format: '', previews: [] },
    request: { hook: [Function: bound bound register], validate: [Object] },
    url: '/repos/:owner/:repo/deployments/:deployment_id/statuses',
    owner: 'Plant-for-the-Planet-org',
    repo: 'planet-webapp',
    deployment_id: undefined
  }
}
Error: Timeout reached: Unable to wait for an deployment to be successful
Error: Cannot read property 'target_url' of undefined

Is there any version which might be working?

1.0.4 is working as expected, basically 400 cause no deployment is ready. Maybe the error message isn’t really friendly tho

@norbertschuler You can try now and see if it works.

@NeverBehave The error messages are pretty I agree, at the moment they reveal quite a lot of information to help any debugging. Any enhancements are however greatly appreciated 😃

1.0.4 is working as expected, basically 400 cause no deployment is ready. Maybe the error message isn’t really friendly tho

We are able to use version 1.0.4 just increasing our timeout limit. Thank you.