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

TypeError: Cannot read properties of undefined (reading 'map') #72

Open
krsaedan opened this issue Nov 23, 2023 · 5 comments
Open

TypeError: Cannot read properties of undefined (reading 'map') #72

krsaedan opened this issue Nov 23, 2023 · 5 comments

Comments

@krsaedan
Copy link

Hello, currently, I have the following error when trying to send messages: "Cannot read properties of undefined (reading 'map')" when executing "this.sqsService.send".

The configuration is as follows:

"@ssut/nestjs-sqs": "^1.2.0",
"aws-sdk": "^2.1488.0",

the error is intermittent

@Noezor
Copy link

Noezor commented Nov 28, 2023

Getting the same issue and using the same library. Are you sure it's from the library? The intermittence of the issue is weird.

@gabriel-skinny
Copy link

gabriel-skinny commented Nov 28, 2023

Happining the same here. Started intermittent, but now every time i call this method it returns the same error. I think it is probally the version that im using (1.0.1), because what is causing the error is in the line 48 of producer.js, and this part of the code only treats the return of the sqs message. I think they changed the return and the old versions are not working.

@gabriel-skinny
Copy link

gabriel-skinny commented Nov 28, 2023

Yep, its seems that is it. The aws-sdk changed the return of the sendMessageBatch function, and does not return the object of failure. In the newest version of sqs-producer, they changed the treatment, but in the old ones are not working. One solution is to downgrade aws-sdk to the version 2.1490.

There is already an issue open on the aws-sdk repository: aws/aws-sdk#657.

@Noezor
Copy link

Noezor commented Nov 28, 2023

I think we can close as not related to this library ?

@sildar
Copy link

sildar commented Nov 29, 2023

I believe the issue is with the version of sqs-producer that is used, as the last version of that library does check for undefined.

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

4 participants