Visual-Regression-Tracker: POST /test-run, 500 Error: Internal Server Error ReferenceError: it is not defined

After installing the docker container, I tried to call POST /test-run through the swagger, got the following error in response: 500 Error: Internal Server Error ReferenceError: it is not defined.

Request body:

{
  "name": "Image name",
  "os": "Mac",
  "browser": "Chrome",
  "viewport": "800x600",
  "device": "PC",
  "branchName": "master",
  "diffTollerancePercent": 1,
  "ignoreAreas": [
    {
      "x": 10,
      "y": 20,
      "width": 300,
      "height": 400
    }
  ],
  "imageBase64": "123"
}

Responses: 500 Error: Internal Server Error

{
  "path": "/test-runs",
  "name": "ReferenceError",
  "message": "it is not defined",
  "exception": {},
  "stack": "
	ReferenceError: it is not defined
	at Object.transformFn (/dist/test-runs/dto/create-test-request.dto.js:59:13)
	at /node_modules/class-transformer/cjs/TransformOperationExecutor.js:358:30
	at Array.forEach (<anonymous>)
	at TransformOperationExecutor.applyCustomTransformations (/node_modules/class-transformer/cjs/TransformOperationExecutor.js:357:19)
	at TransformOperationExecutor.transform (/node_modules/class-transformer/cjs/TransformOperationExecutor.js:300:47)
	at ClassTransformer.plainToInstance (/node_modules/class-transformer/cjs/ClassTransformer.js:27:25)
	at Object.plainToClass (/node_modules/class-transformer/cjs/index.js:34:29)
	at ValidationPipe.transform (/node_modules/@nestjs/common/pipes/validation.pipe.js:51:39)
	at /node_modules/@nestjs/core/pipes/pipes-consumer.js:16:33
	at processTicksAndRejections (internal/process/task_queues.js:97:5)"
}

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

@pashidlos I have created a PR at https://github.com/Visual-Regression-Tracker/backend/pull/199

It took a bit of work to get the postgres docker, vrt backend and vrt frontend running, but I managed to successfully create a test in vrt.