-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Mystery error thrown with no reference to query or operation #10845
Comments
Can you provide the code you are running that is throwing this error? |
No I can't, because it's reported by Sentry and lacks any identifiable
source or hint. If I could, I would have posted it here :)
We use it mongoose in about 10,000 places in the app, so needle in a
haystack.
…On Thu, 7 Oct 2021, 03:33 Daniel Diaz, ***@***.***> wrote:
Can you provide the code you are running that is throwing this error?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10845 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADXYQVZRSAOYZVT3IDJLFDUFRM4NANCNFSM5FMR7D5Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Can you give me an indication of how/ why this happened?error might
trigger? That could point me in the right direction
…On Thu, 7 Oct 2021, 08:13 Adam Reis, ***@***.***> wrote:
No I can't, because it's reported by Sentry and lacks any identifiable
source or hint. If I could, I would have posted it here :)
We use it mongoose in about 10,000 places in the app, so needle in a
haystack.
On Thu, 7 Oct 2021, 03:33 Daniel Diaz, ***@***.***> wrote:
> Can you provide the code you are running that is throwing this error?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#10845 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AADXYQVZRSAOYZVT3IDJLFDUFRM4NANCNFSM5FMR7D5Q>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
|
Random side note: I've never seen this particular error "Cannot read properties of undefined". Normally it would be "Cannot read property 'toArray' of undefined". Do you know why this error message is different on your end? |
@vkarpov15 thanks for fixing, is there something we can do on our end to figure out where this was thrown from (other than using I know, we started seeing these errors formatted in this different manner recently as well. I suspect they may have changed the wording for these errors in a recent javascript engine update, as they started creeping up in Node 16 as well as newer browser versions. For example, the following error changed from:
to:
🤷🏼 |
@adamreisnz I don't think so, the |
Ok, would a possible scenario be if |
@adamreisnz try adding event handlers and see the execution order https://mongoosejs.com/docs/connections.html#connection-events |
@adamreisnz I think it is possible this error was caused by Mongoose being disconnected for more than |
Do you want to request a feature or report a bug?
Bug, but possibly caused by user error/invalid input
What is the current behavior?
This error is thrown, but the stack trace doesn't tell me where in the app it's thrown from, so I have no clues to go on:
If the current behavior is a bug, please provide the steps to reproduce.
Unknown
What is the expected behavior?
Maybe this error should be handled internally in Mongoose to clarify what exactly is going wrong, as to provide a hint to the developers to indicate what query/operation is causing it to fail.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
The text was updated successfully, but these errors were encountered: