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接口快速失败 #673

Open
henrydf opened this issue Apr 24, 2024 · 2 comments
Open

Audit接口快速失败 #673

henrydf opened this issue Apr 24, 2024 · 2 comments

Comments

@henrydf
Copy link

henrydf commented Apr 24, 2024

audit相关接口在70秒之后才会失败返回,并提示501 NOT_IMPLEMENTED

如果没有实现相关接口的计划,请快速返回失败。

npm http fetch POST 501 https://registry.npmmirror.com/-/npm/v1/security/advisories/bulk 71485ms attempt #3 (cache skip)
npm sill audit bulk request failed [object Object]
npm http fetch POST 501 https://registry.npmmirror.com/-/npm/v1/security/audits/quick 70704ms attempt #3 (cache skip)
npm verb audit error HttpErrorGeneral: 501 Method Not Implemented - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick - [NOT_IMPLEMENTED] /-/npm/v1/security/audits/quick not implemented yet
npm verb audit error     at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:95:15
npm verb audit error     at runMicrotasks (<anonymous>)
npm verb audit error     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error     at async Map.[getReport] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\audit-report.js:337:21)
npm verb audit error     at async Map.run (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\audit-report.js:107:19)
npm verb audit error     at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:154:5)
npm verb audit error     at async Install.install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:170:5)
npm verb audit error  HttpErrorGeneral: 501 Method Not Implemented - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick - [NOT_IMPLEMENTED] /-/npm/v1/security/audits/quick not implemented yet
npm verb audit error     at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:95:15
npm verb audit error     at runMicrotasks (<anonymous>)
npm verb audit error     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error     at async Map.[getReport] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\audit-report.js:337:21)
npm verb audit error     at async Map.run (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\audit-report.js:107:19)
npm verb audit error     at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:154:5)
npm verb audit error     at async Install.install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:170:5) {
npm verb audit error   headers: [Object: null prototype] {
npm verb audit error     server: [ 'Tengine' ],
npm verb audit error     'content-type': [ 'application/json; charset=utf-8' ],
npm verb audit error     'content-length': [ '81' ],
npm verb audit error     connection: [ 'keep-alive' ],
npm verb audit error     'strict-transport-security': [ 'max-age=5184000' ],
npm verb audit error     date: [ 'Wed, 24 Apr 2024 03:08:16 GMT' ],
npm verb audit error     vary: [ 'Origin' ],
npm verb audit error     'request-id': [ 'e4eaf010-01e7-11ef-88b9-039fe19a3c34' ],
npm verb audit error     'x-frame-options': [ 'SAMEORIGIN' ],
npm verb audit error     'x-xss-protection': [ '1; mode=block' ],
npm verb audit error     'x-content-type-options': [ 'nosniff' ],
npm verb audit error     'x-download-options': [ 'noopen' ],
npm verb audit error     'x-readtime': [ '1.144' ],
npm verb audit error     'ali-swift-global-savetime': [ '1713928096' ],
npm verb audit error     via: [
npm verb audit error       'cache4.l2cn3135[0,0,501-0,H], cache77.l2cn3135[0,0], kunlun5.cn3909[55,55,501-1281,M], kunlun10.cn3909[56,0]'
npm verb audit error     ],
npm verb audit error     age: [ '0' ],
npm verb audit error     'x-cache': [ 'MISS TCP_MISS dirn:-2:-2' ],
npm verb audit error     'x-swift-error': [ 'orig response 5xx error' ],
npm verb audit error     'x-swift-savetime': [ 'Wed, 24 Apr 2024 03:08:16 GMT' ],
npm verb audit error     'x-swift-cachetime': [ '1' ],
npm verb audit error     'timing-allow-origin': [ '*' ],
npm verb audit error     eagleid: [ '8ccfecac17139280965711367e' ],
npm verb audit error     'x-fetch-attempts': [ '3' ],
npm verb audit error     'x-local-cache-status': [ 'skip' ]
npm verb audit error   },
npm verb audit error   statusCode: 501,
npm verb audit error   code: 'E501',
npm verb audit error   method: 'POST',
npm verb audit error   uri: 'https://registry.npmmirror.com/-/npm/v1/security/audits/quick',
npm verb audit error   body: {
npm verb audit error     error: '[NOT_IMPLEMENTED] /-/npm/v1/security/audits/quick not implemented yet'
npm verb audit error   },
npm verb audit error   pkgid: undefined
npm verb audit error }
npm sill audit error [object Object]
npm timing auditReport:getReport Completed in 143364ms
npm sill audit report null
npm timing reify:audit Completed in 143365ms
npm timing reify Completed in 148042ms
Copy link

我们已经看到你的反馈,如果是功能缺陷,可以提供一下重现该问题的方式;如果是新功能需求,我们会尽快加入讨论。同时我们非常期待你可以加入我们的贡献者行列,让项目可以长期可持续发展。

@elrrrrrrr
Copy link
Member

按目前实现,应用代码不会做任何额外处理,直接返回报错。

image

本地试了下没有重现,需要补充一个重现案例及对应 npm 版本。

由于这是端上的逻辑,可以尝试升级下 npm 客户端,或者直接使用 cnpm。

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

No branches or pull requests

2 participants