Closed guyguy333 closed 1 year ago
hello @guyguy333, how did you solve the problem?
I'm getting the same error since yesterday, and it came out of nowhere.
in my case I just get: TypeError: argument verdaccio/verdaccio#1 unsupported type undefined
Hello, we are affected by the same bug, how can we get the updated version from https://github.com/verdaccio/monorepo/pull/676
The latest version does not resolve my case.
{"level":60,"time":1703501213000,"pid":8,"hostname":"cfcde7e564a2","err":{"type":"Error","message":"argument #1 unsupported type undefined","stack":"TypeError: argument #1 unsupported type undefined\n at createError (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/http-errors/index.js:68:13)\n at getError (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/@verdaccio/commons-api/lib/index.js:113:45)\n at getCode (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/@verdaccio/commons-api/lib/index.js:151:10)\n at convertS3Error (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/lib/s3Errors.js:43:38)\n at Response.<anonymous> (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/lib/index.js:215:56)\n at Request.<anonymous> (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/request.js:367:18)\n at Request.callListeners (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:106:20)\n at Request.emit (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:78:10)\n at Request.emit (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/request.js:686:14)\n at Request.transition (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/request.js:22:10)","code":"TypeError","time":"2023-12-25T10:46:52.998Z"},"msg":"uncaught exception, please report this\nTypeError: argument #1 unsupported type undefined\n at createError (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/http-errors/index.js:68:13)\n at getError (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/@verdaccio/commons-api/lib/index.js:113:45)\n at getCode (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/@verdaccio/commons-api/lib/index.js:151:10)\n at convertS3Error (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/lib/s3Errors.js:43:38)\n at Response.<anonymous> (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/lib/index.js:215:56)\n at Request.<anonymous> (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/request.js:367:18)\n at Request.callListeners (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:106:20)\n at Request.emit (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/sequential_executor.js:78:10)\n at Request.emit (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/request.js:686:14)\n at Request.transition (/usr/local/lib/node_modules/verdaccio-aws-s3-storage/node_modules/aws-sdk/lib/request.js:22:10)"} {"level":30,"time":1703501217845,"pid":9,"hostname":"cfcde7e564a2","content":"aws-s3-storage","prefix":"verdaccio","msg":"plugin successfully loaded: verdaccio-aws-s3-storage"} {"level":30,"time":1703501217914,"pid":9,"hostname":"cfcde7e564a2","file":"/verdaccio/conf/config.yaml","msg":"config file - /verdaccio/conf/config.yaml"} (node:9) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Your Environment
Describe the bug
We deploy 2, sometimes 3 instances of Verdaccio on a K8S cluster to handle load. S3 storage is used with verdaccio plugin. However, randomly, we get crash and unexpected exception. It looks like it's mainly related to S3.
To Reproduce
We don't do anything special except using Verdaccio as a cache for NPM registry. It happens randomly, mainly under load.
Expected behavior
No more crash of Verdaccio. I guess if there is a S3 error, a retry could be used as well as a proper error handling. Currently, it looks like Verdaccio crash.
Screenshots, server logs, package manager log
As we can see, both instances got the issue at similar time and stack trace is related to S3 lib.
Instance 1:
Instance 2:
Configuration File (cat ~/.config/verdaccio/config.yaml)
Environment information
Running on a K8S cluster.
Debugging output
$ NODE_DEBUG=request verdaccio
display request calls (verdaccio <--> uplinks)$ DEBUG=verdaccio* verdaccio
enable extreme verdaccio debug mode (verdaccio api)$ npm -ddd
prints:$ npm config get registry
prints:Contribute to Verdaccio