mapper icon indicating copy to clipboard operation
mapper copied to clipboard

Maximum Call Stack Size error after migrating to v8

Open FurqanAthar opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the issue

After upgrading Automapper to v8 and fixing all the breaking changes, my application is returning error of maximum call stack size at ApplyMetaData.

Screenshot from 2023-06-17 23-39-57

My jest unit tests are also not running and returning mapping between class A and class B cannot be found error even though there are mappings present and injected as well.

See image below of the code.

image

The mapper returned by the createMapper is not actually the empty proxy and produces the below error when running tests.

image

Models/DTOs/VMs

No response

Mapping configuration

No response

Steps to reproduce

No response

Expected behavior

It should return the mapper instance and not give maximum call stack error and should get the mapping as defined.

Screenshots

No response

Minimum reproduction code

No response

Package

  • [ ] I don't know.
  • [X] @automapper/core
  • [X] @automapper/classes
  • [X] @automapper/nestjs
  • [ ] @automapper/pojos
  • [ ] @automapper/mikro
  • [ ] @automapper/sequelize
  • [ ] Other (see below)

Other package and its version

No response

AutoMapper version

8.7.7

Additional context

Linux Node v14.18.1

FurqanAthar avatar Jun 17 '23 18:06 FurqanAthar

I'm observing the same behavior when upgraded to 8.7.7

brdar avatar Oct 19 '23 11:10 brdar

https://github.com/nartc/mapper/issues/575#issuecomment-1772438855

brdar avatar Oct 20 '23 14:10 brdar