Open prashanthmadi opened 7 years ago
What version of Meteor are you on and did you recently update?
I guessing that somewhere in your code you are attempting to find or update a user object from MongoDB like this
Meteor.users.find( { emails.address: 'user@example.com' })
The MongoDB drive requires the nested values to be in quotes to access
Meteor.users.find( { 'emails.address': 'user@example.com' })
// or
Meteor.users.find( { emails: { address: 'user@example.com' } })
Check through your code and report back. :)
Thanks for helping with this @fiveisprime
I haven't found any address/email in my code but have seen some in .meteor / .demeteor folder
COuld be that one of the module i'm using might have it...
I'm having the same problem. Were you able to fix this @prashanthmadi ?
are you using documentdb ? we tried with mlab and it worked :)
@prashanthmadi yep! That is exactly how I just spent the last 3 hours. ๐
@mattdell is your issue resolved ?
Yep ๐
Do you have simple steps to repro this issue. I will work with documentdb team to fix it.
As you can see below that insert with โ.โ In key doesnโt work even with mongo shell. You can try it on your local environment
db.test.insert({"a.1":1})
2017-02-23T14:01:07.655-0800 E QUERY [thread1] Error: can't have . in field names [a.1] :
DBCollection.prototype._validateForStorage@src/mongo/shell/collection.js:181:1
Bulk/this.insert@src/mongo/shell/bulk_api.js:646:9
DBCollection.prototype.insert@src/mongo/shell/collection.js:271:13
@(shell):1:1
No idea on why it's working using mlab..
@fiveisprime I am having the same issue when I am deploying a Meteor app using Azure MongoDB. I guess this is the line which raises the exception.
https://github.com/meteor/meteor/blob/master/packages/accounts-base/accounts_server.js#L1492
As can be seen, it does have quotes when accessing nested keys, but I still don't understand why it is working when I using a mlab.com sandbox MongoDB while it throws such exception when using Azure MongoDB.
@prashanthmadi You can only query a nested document in this way, but to insert document, I guess we cannot do so. I tested on both Azure MongoDB and mlab MongoDB, and db.test.insert({"a.1":1})
is not allowed on both.
https://docs.mongodb.com/manual/tutorial/insert-documents/ https://docs.mongodb.com/manual/tutorial/query-embedded-documents/
Hi @weitony111, I have discussed on this issue with DocumentDB Team today. Can you send an email to askdocdbmongoapi@microsoft.com .
Disclaimer: I work at Microsoft Azure
I didn't realize that, in the original issue, you were using DocumentDB over MongoDB! It makes some kind of sense now. :) I'm guessing that DocumentDB doesn't support this part of the API yet.
@weitony111 when you send that email, please copy maherna@microsoft.com as well so I can track this for future DocumentDB use cases.
@prashanthmadi ๐ from Redmond.
@fiveisprime Oh, yeah, thanks for reminding. I actually chose MongoDB as my NoSQL API in Azure NoSQL (DocumentDB). I overlooked it since I thought it will work exactly the same way as MongoDB, but now it seems not. I'll send an email tomorrow since it is too late in Singapore now...
From the DocumentDB team
Looks like the problem is with ensureIndex since unique index is not supported yet (itโs coming this week) but will only enabled for new accounts at first... until we enable migration from old accounts.
Any news on this one @prashanthmadi @fiveisprime? Doesn't seem to be enabled yet for new accounts. Running to the same problem with fresh azure cosmosDB database. Tried fresh database and imported database. Works fine on other DB services.
FWIW it's mid-October and I'm seeing the same results on Azure Cosmos DB
I was trying to run a demeteorized app but it fails with below error. Could you help me debug this issue
I understand that mongo is not allowing .(period) symbol in keys. I couldn't find where i have included it in my meteor code
tried demeteorized -d option but that did not help either.
C:\Workspace\nodejs\koufa.demeteorized\bundle\programs\server>npm start
Note: you are using a pure-JavaScript implementation of bcrypt. While this implementation will work correctly, it is known to be approximately three times slower than the native implementation. In order to use the native implementation instead, run
meteor npm install --save bcrypt
in the root directory of your application.