Ticket migration error

Hi All,
I did this for migration ticket code:
const host = “mongodb+srv://admin:admin@hiddenmongodb.net”
const client = await MongoClient.connect(
host,
{ useNewUrlParser: true },
)
const mflix = client.db(‘sample_mflix’)
const predicate = { ‘lastupdated’: { $exists: true,$type:‘string’ } }
const projection = {‘lastupdated’:1}
const cursor = mflix
.collection(“movies”)
.find(predicate, projection)
.toArray((err,doc)=>{
console.log(err)
})

Error during migration, TypeError: Cannot read property ‘map’ of undefined

Here nothing is returned by query …
can anyone please help…

Thanks

I have the same with nothing being returned by query

Found 0 documents to update
No documents to update

I am surprised that the url for your cluster is
Post edited to remove Ashish_29479 URL.

I would try with [CORRECT URL REMOVED] instead.

I would also be surprised if the requirements specified sample_mflix as the database name.

they posted today to switch the database to sample_mflix but i am still getting authorization error
something not correct with url

I have edited the post to remove the URL of Ashish_29479.

Hi @steevej-1495,
i tried not working

I was able to connect to the cluster with Compass. I would verify the version of the driver to see if it accept the SRV connection string. Could you please the new error message (with the correct cluster address) because it might be different from the one you posted earlier?

Found 0 documents to update
Error during migration, MongoError: Error determining if update will go over space quota: Error estimating update space usage: Error finding ‘u’ part of update: Expected ‘u’ to be BSON (or equivalent), but got instead. Doc = [{u } {multi true} {upsert false}]

Hi @steevej-1495
I think u updated my database but even then i am trying to run other queries it is stuck there and doing nothing…

I did not update any database. I just connected to it to verify your URL.

ok…
But its not returning anything…

The migration might take some time to complete.

yes i see this now it says…
Found 23539 documents to update
Error during migration, MongoError: Error determining if update will go over space quota: Error estimating update space usage: Error finding ‘u’ part of update: Expected ‘u’ to be BSON (or equivalent), but got instead. Doc = [{u } {multi true} {upsert false}]

That error might indicate that you do not pass the appropriate parameters to the update command:

Thanks @steevej-1495,
It worked now…
And can you remove your post of stating my cluster URI …
Thanks

I cannot really do that. I am just a student like you. I am not part of the MongoDB team. However I will try to edit my posts.

yes, i am saying to just mask or edit the post

Done. You should however also edit your own post as the correct URL is easy to find from the wrong URL you posted.

:sweat_smile:
yes,
now i have edited that …