mingo-app / mingo

Found a bug? have a FR ?
60 stars 2 forks source link

Invalid Selector: TypeError: Class constructor ObjectId cannot be invoked without 'new' #612

Closed ghengeveld closed 1 month ago

ghengeveld commented 11 months ago

Mingo version: 1.13.4

I get this when running a query like:

{ _id: ObjectId("6528fde36417a3572b58e07f") }

This can be resolved by adding new:

{ _id: new ObjectId("6528fde36417a3572b58e07f") }

However, this breaks when following a relation through this link:

Screenshot 2023-10-13 at 10 46 25

This yields an empty screen and the error Invalid Selector: TypeError: Class constructor ObjectId cannot be invoked without 'new'.

tothradoslav commented 11 months ago

Thank you for letting us know, we corrected it. Will be in new release.

pepkin88 commented 11 months ago

I'd like to request a clarification. I hope that the correction involves not requiring the new keyword, not just fixing broken relations. Other tools often export lists of ObjectIds without new, it would be a shame to be required to specially format them every time, since it worked just fine a version ago.

tothradoslav commented 11 months ago

Sure, in queries, you won't have to enter "new". I'll make sure you don't have to enter it in other situations, either.

tothradoslav commented 10 months ago

Hi, this has been released in the latest version. Please check it out and let us know if there's still an issue. Thank you!

sagrawal31 commented 9 months ago

All of a sudden, opening a new collection tab resulting in the same error image

And I can't see anything on Documents tab.

I'm on version 1.13.5. Tried clearing all history as well.

tothradoslav commented 9 months ago

Can you please tell me how exactly did you open the tab? From the sidebar?

sagrawal31 commented 9 months ago

I tried to open from both ways- 1) Via sidebar and 2) Via CMD + T

sagrawal31 commented 9 months ago

Any update here, please? I can't delete the app completely to attempt a fix.

pepkin88 commented 9 months ago

Sure, in queries, you won't have to enter "new". I'll make sure you don't have to enter it in other situations, either.

Unfortunately, it seems that new is still required. After entering such query:

{user: ObjectId("615ad6d95c92ea37d66936a2")}

I get this on version 1.13.5:

image
sagrawal31 commented 9 months ago

Can we open this issue at least?

fers4t commented 5 months ago

Still, we have this error.

tothradoslav commented 1 month ago

This issue is fixed / available in the new release v1.14.1

https://github.com/mingo-app/mingo/releases/tag/v1.14.1

Please reopen this issue if necessary.