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

Audit randomly fails due to 503 (Yarn and NPM) #75

Closed
clement-escolano opened this issue Apr 5, 2019 · 7 comments · Fixed by #82 or #84
Closed

Audit randomly fails due to 503 (Yarn and NPM) #75

clement-escolano opened this issue Apr 5, 2019 · 7 comments · Fixed by #82 or #84
Labels
bug Something isn't working enhancement New feature or request

Comments

@clement-escolano
Copy link
Contributor

Hello,

I am using audit-ci in my CircleCI workflow (thank you for this package). I have a annoying issue: sometimes, the audit fails with the error:

Invocation of npm audit failed:
npm ERR! code ENOAUDIT
npm ERR! audit Your configured registry (https://registry.npmjs.org/) does not support audit requests.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/circleci/.npm/_logs/2019-04-03T14_57_17_893Z-debug.log
Exiting...

I understand this seems to be an error from NPM server and not audit-ci itself, however, I never encountered this error while running npm audit locally on the project.

This error is very random: sometimes it occurs 5 times in a row, sometimes it does not happen for days.

Did some of you stumble upon this issue? Do you know if we can implement some kind of retying mechanism in audit-ci to circumvent it?

Thank you

@quinnturner
Copy link
Member

This is very strange indeed! I don't think I have encountered this personally within the audit-ci project's own audits. Can you check npm --version in CircleCI? Perhaps you can run npm i -g npm in CircleCI, fixing some NPM bug?

@clement-escolano
Copy link
Contributor Author

npm --version gives 6.4.1 which is indeed pretty old. I will update npm and will see if it solves the problem.
Thank you for your input. I will come back to tell if it solved the problem or not.

@quinnturner
Copy link
Member

Hi again,

You are not alone on this issue. It has now happened on this project as well and seems to be an issue for others. Note that it is independent of CircleCI as it happened for both of our CircleCI and Travis-CI builds.

At this time, it seems as if the only options for now would be a retry mechanism.

@quinnturner quinnturner added bug Something isn't working enhancement New feature or request labels Apr 10, 2019
@clement-escolano
Copy link
Contributor Author

Thank you for the information 😄 Well, it is a good news in a way: it seems that NPM is aware of the issue and working on it.

@quinnturner quinnturner changed the title Audit randomly fails on CircleCI Audit randomly fails due to 503 (Yarn and NPM) Apr 11, 2019
@djomaa
Copy link
Contributor

djomaa commented Apr 29, 2019

Hi.

In my opinion, it would be great to integrate a retry mechanism into audit-ci. What do you think about it?

@mikkotikkanen
Copy link

mikkotikkanen commented Apr 30, 2019

Just chiming in that we have had this happen multiple times in different projects and different environments/OSs, so it's definitely a thing. Always gets fixed by rerunning the task so retry mechanism would indeed be a great addition, especially if it just checks if the error is the one mentioned above ("does not support" & "npmjs.org") -> try again.

@quinnturner
Copy link
Member

Released in v1.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants