Fails to upload a record with _id as non-objectId to mongodb
See original GitHub issueRepro steps:
- insert a record with a non-objectId
_id
to a collection in mongo shell. It shows in cosmosdb as:
{
"_id": "HJxU4ap5f",
"title": "test393",
}
- in cosmosdb, open the record and modify it with another title:
{
"_id": "HJxU4ap5f",
"title": "new",
}
- save it in cosmosdb, causing the following error.
Action: cosmosDB.CosmosEditorManager.onDidSaveTextDocument Error type: Error Error Message: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
Version: 0.6.0 OS: win32
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Fails to upload a record with _id as non-objectId to mongodb
Repro steps: insert a record with a non-objectId _id to a collection in mongo shell. It shows in cosmosdb as: { "_id": "HJxU4ap5f", ......
Read more >Error adding a new document - Working with Data - MongoDB
Hello guys, I'm trying to add a new document but I'm getting this error: The provided ... I think you can't input the...
Read more >Nothing is returned on search of an existing document on the ...
One possible scenario I can think of is that maybe you have an _id field with ObjectId type and you search it as...
Read more >mongofiles — MongoDB Database Tools
An identifier which is either: the name of a file on your local file system ... To upload a file named 32-corinth.lp to...
Read more >Insert not permitted while document contains errors - MongoDB
I have tried various syntax. Even with the quotes around the ObjectID removed, it still says there is an error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Opening, It looks like we never addressed the root issue filed.
Hi @beeplin , @Danlock , the merged fix was published today (version 0.8.0). Hope this fixes your issue. 😃 Let us know how the fix holds up with your usage.