Hi Team,
We are getting below error from Custom Companion Server. We have written the code in Node JS and hosted on AWS EC2. Earlier this companion server was working fine. However, from last few days we are getting below error:
| MultipleValidationErrors: There were 2 validation errors:
0|index | * UnexpectedParameter: Unexpected key ‘content-length’ found in params.MultipartUpload.Parts[0]
0|index | * UnexpectedParameter: Unexpected key ‘etag’ found in params.MultipartUpload.Parts[0]
We have noticed Uppy client is passing extra two new Headers in Request i.e. content-length and etag.
Earlier it was passing only two headers i.e ETag and PartNumber. So, now it’s passing two new headers with respect to old headers.
We have upgraded Uppy Companion Server Nuget package as well like @uppy/companion (5.0.0) and @uppy/xhr-upload (3.6.8). After this upgrade Companion server is throwing bad gateway error (502).
Also, we have seen below errors after this upgrade:
0|index | Fri, 12 Jul 2024 13:58:39 GMT express-session deprecated undefined resave option; provide resave option at index.js:16:35
0|index | Fri, 12 Jul 2024 13:58:39 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at index.js:16:35
0|index | MultipleValidationErrors: There were 2 validation errors:
0|index | * UnexpectedParameter: Unexpected key ‘content-length’ found in params.MultipartUpload.Parts[0]
0|index | * UnexpectedParameter: Unexpected key ‘etag’ found in params.MultipartUpload.Parts[0]
0|index | at ParamValidator.validate (/home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/param_validator.js:40:28)
0|index | at Request.VALIDATE_PARAMETERS (/home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/event_listeners.js:126:42)
0|index | at Request.callListeners (/home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
0|index | at callNextListener (/home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
0|index | at /home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/event_listeners.js:86:9
0|index | at finish (/home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/config.js:386:7)
0|index | at /home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/config.js:404:9
0|index | at Credentials.get (/home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/credentials.js:127:7)
0|index | at getAsyncCredentials (/home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/config.js:398:24)
0|index | at Config.getCredentials (/home/ec2-user/CompanionServer/node_modules/aws-sdk/lib/config.js:418:9)
Kindly, help on this as we are stuck.
Regards,
Abhishek