question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to upload a record with _id as non-objectId to mongodb

See original GitHub issue

Repro steps:

  1. insert a record with a non-objectId _id to a collection in mongo shell. It shows in cosmosdb as:
{
  "_id": "HJxU4ap5f",
  "title": "test393",
}
  1. in cosmosdb, open the record and modify it with another title:
{
  "_id": "HJxU4ap5f",
  "title": "new",
}
  1. 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
PrashanthCorpcommented, Jun 8, 2018

Opening, It looks like we never addressed the root issue filed.

1reaction
PrashanthCorpcommented, Jul 6, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found