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

"Match error: Expected string, got object" #16

Closed
JohnAllen opened this issue Jul 16, 2014 · 3 comments
Closed

"Match error: Expected string, got object" #16

JohnAllen opened this issue Jul 16, 2014 · 3 comments
Labels

Comments

@JohnAllen
Copy link

We got the error above with the stack trace in the image.

screen shot 2014-07-15 at 6 14 36 pm

The code is essentially structured to the code in issue #9.

This only happens using node-inspector BTW.

Any thoughts?

@vsivsi
Copy link
Owner

vsivsi commented Jul 16, 2014

This sounds like an _id type issue.

Until now, jobCollection has required Mongo style IDs, which manifest in Meteor as type Meteor.Collection.ObjectID (an EJSON custom type). If you are specifying String type Ids for Job documents, then it currently won't work and you'll get this error.

Another issue (#12) requested a relaxation of this requirement, to allow use of random strings for Ids as well. I've implemented that, and it got merged into the master branch yesterday, but I haven't published it to Atmosphere yet (I will tonight).

So check to see if you are setting any Job _id values to a String... If that's it, then the code I'm releasing tonight should fix it for you. As a part of that, the default auto-generated _id type will be changing from Mongo-style to random string. This behavior can be controlled by setting the idGeneration option when you create your JobCollection.

If you think your problem has nothing to do with Ids, then give me a shout back, but it seems about 90% likely that this is your issue.

@vsivsi
Copy link
Owner

vsivsi commented Jul 18, 2014

I've published v0.0.14 to Atmosphere which permits using String type _id values. Please let me know if this solves your issue.

@vsivsi
Copy link
Owner

vsivsi commented Feb 8, 2015

Resolved long ago. Closing.

@vsivsi vsivsi closed this as completed Feb 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants