Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment succeeds but action log says it failed #27

Closed
forde opened this issue Aug 7, 2020 · 23 comments · Fixed by #29
Closed

Deployment succeeds but action log says it failed #27

forde opened this issue Aug 7, 2020 · 23 comments · Fixed by #29
Labels
Milestone

Comments

@forde
Copy link

forde commented Aug 7, 2020

HI.

The setup in my .yml file is:

name: Deployment

on:
  push:
    branches:
  - master

jobs:
 deploy:
 runs-on: ubuntu-latest
 steps:
  - uses: actions/checkout@v2
  - name: 'Set build id'
    id: build_id
    run: echo "::set-output name=id::$(date +%s)"

  - name: Deploy master branch
    if: github.ref == 'refs/heads/master'
    uses: amondnet/[email protected]+2
    with:
      vercel-token: ${{ secrets.ZEIT_TOKEN }}
      vercel-args: '--prod -b BUILD=${{ steps.build_id.outputs.id }} -b BUILD_BRANCH=master -b ENVIRONMENT=production'
      vercel-org-id: ${{ secrets.ZEIT_ORG_ID }}
      vercel-project-id: ${{ secrets.ZEIT_PRODUCTION_PROJECT_ID }}

On push to master the action gets triggered but when it finishes action log says it failed (even tho code gets deployed and logs on vercel.com confirm succesful deployment)

Action logs:

https://*****************.vercel.app- Queued

- Queued

- Building

- Building

Production: https://***************** [3m]
Due to "builds" existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings

set preview-url output
/usr/local/bin/npx vercel inspect https://*****************.vercel.app -t ***
Vercel CLI 19.2.0

Vercel CLI 19.2.0
- Fetching deployment "https://*****************.vercel.app" in *****

- Fetching deployment "https://*****************.vercel.app" in *****

Error! Failed to find deployment "https://*****************.vercel.app" in *****

Error! Failed to find deployment "https://*****************.vercel.app" in *****
##[error]The process '/usr/local/bin/npx' failed with exit code 1

Any ideas?

@AlexRekish
Copy link

same issue with such logs:
Снимок экрана 2020-08-07 в 14 38 24

@maerteijn
Copy link

I encountered the same:

Error! An unexpected error occurred in inspect: TypeError: Cannot read property 'split' of undefined
    at /usr/local/lib/node_modules/vercel/dist/index.js:2:650065
    at Array.reduce (<anonymous>)
    at A (/usr/local/lib/node_modules/vercel/dist/index.js:2:650029)
    at inspect_main (/usr/local/lib/node_modules/vercel/dist/index.js:2:655310)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at he (/usr/local/lib/node_modules/vercel/dist/index.js:2:375059)

However, the deployment was succesfully done. Retrying the same action results in the same error, so it's reproducable.

@dnnsk
Copy link

dnnsk commented Aug 7, 2020

The same:

Error! An unexpected error occurred in inspect: TypeError: Cannot read property 'split' of undefined
91
    at S (/usr/local/lib/node_modules/vercel/dist/index.js:2:649236)
92
    at C (/usr/local/lib/node_modules/vercel/dist/index.js:2:649365)
93
    at Array.sort (<anonymous>)
94
    at A (/usr/local/lib/node_modules/vercel/dist/index.js:2:649999)
95
    at inspect_main (/usr/local/lib/node_modules/vercel/dist/index.js:2:655310)
96
    at runMicrotasks (<anonymous>)
97
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
98
    at he (/usr/local/lib/node_modules/vercel/dist/index.js:2:375059)
99
##[error]The process '/usr/local/bin/npx' failed with exit code 1

@johnmurphy01
Copy link

Same:

Error! An unexpected error occurred in inspect: TypeError: Cannot read property 'split' of undefined
    at /usr/local/lib/node_modules/vercel/dist/index.js:2:650065
    at Array.reduce (<anonymous>)
    at A (/usr/local/lib/node_modules/vercel/dist/index.js:2:650029)
    at inspect_main (/usr/local/lib/node_modules/vercel/dist/index.js:2:655310)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at he (/usr/local/lib/node_modules/vercel/dist/index.js:2:375059)

Error! An unexpected error occurred in inspect: TypeError: Cannot read property 'split' of undefined
    at /usr/local/lib/node_modules/vercel/dist/index.js:2:650065
    at Array.reduce (<anonymous>)
    at A (/usr/local/lib/node_modules/vercel/dist/index.js:2:650029)
    at inspect_main (/usr/local/lib/node_modules/vercel/dist/index.js:2:655310)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at he (/usr/local/lib/node_modules/vercel/dist/index.js:2:375059)
##[error]The process '/usr/local/bin/npx' failed with exit code 1

@joonashak
Copy link

joonashak commented Aug 7, 2020

I'm getting a similar error with some differences:

Error! An unexpected error occurred in inspect: Error: val is not a non-empty string or a valid number. val=null
    at Object.e.exports [as default] (/usr/local/lib/node_modules/vercel/dist/index.js:2:1212562)
    at elapsed (/usr/local/lib/node_modules/vercel/dist/index.js:2:25757)
    at inspect_main (/usr/local/lib/node_modules/vercel/dist/index.js:2:655267)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at he (/usr/local/lib/node_modules/vercel/dist/index.js:2:375059)

Error! An unexpected error occurred in inspect: Error: val is not a non-empty string or a valid number. val=null
    at Object.e.exports [as default] (/usr/local/lib/node_modules/vercel/dist/index.js:2:1212562)
    at elapsed (/usr/local/lib/node_modules/vercel/dist/index.js:2:25757)
    at inspect_main (/usr/local/lib/node_modules/vercel/dist/index.js:2:655267)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at he (/usr/local/lib/node_modules/vercel/dist/index.js:2:375059)
##[error]The process '/usr/local/bin/npx' failed with exit code 1

The actual deployment on Vercel's end succeeds for me, too.

The project in question is here: https://github.com/joonashak/reclab-web (N.B., I'm currently deploying just the trunk)

@facosta0787
Copy link

I'm getting the same error
image

but the weird part is that the deployment in vercel finishes succesfully.

image

@EvanLovely
Copy link
Contributor

Looks to be similar to issue #28

@EvanLovely
Copy link
Contributor

So the GitHub Actions docs says I can set the secret ACTIONS_STEP_DEBUG to true and re-run actions to get more details. I did and then saw that this is the command being ran right before the error:

vercel inspect https://my-site.vercel.app --scope team_ABC123

Running that locally gives me the same error:

Error! An unexpected error occurred in inspect: TypeError: Cannot read property 'split' of undefined

I tried to update to the latest cli [email protected] but had same error.

@EvanLovely
Copy link
Contributor

So this is happening during the vercel inspect usage - which happens after the vercel deploy so that's why deploys are still successful. This step is most likely used to get all the useful GitHub actions outputs like deploy url (which I love BTW!). When I ran this locally, it fails right before listing the "Builds" out - I'm guessing that is an array and the cli is basically trying to run builds.split('\n') but builds is undefined. Probably an API data structure change. PS This is why optional chaining is amazing b/c then builds?.split('\n') wouldn't crash the whole thing.

ScreenShot 2020-08-07 at 14 37 33@2x

@simonhaenisch
Copy link

I've contacted Vercel Support about this, as I believe this is an upstream issue.

@sakulstra
Copy link

@simonhaenisch did you get any update? contacted them as well, but didn't get any response yet.

@simonhaenisch
Copy link

Yeah they said it's an issue with the inspect command but they haven't updated me since.

@EvanLovely
Copy link
Contributor

Is there a GitHub issue on the https://github.com/vercel/vercel repo anyone has a link to?

@simonhaenisch
Copy link

simonhaenisch commented Aug 10, 2020

Nope because they don't do bug tracing publicly anymore. Let me rephrase that, you can't open a bug report publicly anymore, unless you "ask for help" in their discussions.

@EvanLovely
Copy link
Contributor

Well that's a convenient way to appear less buggy 😠

@jackguoAtJogg
Copy link

That's annoying, I have to do manually deployment.

@EvanLovely
Copy link
Contributor

I've got a fork that is working for me (use EvanLovely/vercel-action@506f39d in GitHub Actions config to use/test) and have made a PR for it: #29

@klapec
Copy link

klapec commented Aug 10, 2020

I've filled an issue about this as well, got in response:

Hello,

There is an issue with vercel inspect which we are currently fixing as we speak.

We will get back to you as soon as that is fixed.

@louisbirla
Copy link

It works for me now.

@klapec
Copy link

klapec commented Aug 12, 2020

I've got a response from the Vercel support team

The issue has been fixed for all new deployments. We are working to make it compatible with old deployments as well.

vercel inspect seems to be working now but this vercel action still fails with Error! Failed to find deployment xxx in xxx.

@simonhaenisch
Copy link

Got the same response from support as well, and new deployments with this action are working again for us.

@klapec
Copy link

klapec commented Aug 12, 2020

@simonhaenisch
By

new deployments

do you mean new pull requests (assuming you're using this action for deploying PR previews?)
It seems to be still broken for me when I'm triggering new workflow runs within the same PR.

@simonhaenisch
Copy link

We use it to manually deploy master to a staging environment. It works for new commits on master now. PR previews are done by the Github Integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.