Open herzcthu opened 4 years ago
I have the same problem. I will wait for her decision.
same problem too
Hi All, I had this same problem - take a look at the specific message:
index: id_1 dup key: { id: null }
Note that index is "id_1" and it's complaining that the id is null.
I found that my sessions table had 3 indexes: "_id", "id_1", and "last_activity".
You can see your indexes with:
db.sessions.getIndexes()
I think that "id_1" has been added in error - maybe during the Laravel upgrade to v7 or v8 or when switching session support on from file-based to database.
So the simple job is to remove the "id_1" key:
db.sessions.dropIndex("id_1")
It's now all working for me.
WOW! It's working for me. But it's worrying to see a 2021 problem not solved yet...
I got this response on second browser when trying to open my newly setup laravel app.
E11000 duplicate key error collection: pace.sessions index: id_1 dup key: { id: null }
I'm using latest laravel 8. laravel-mongodb 3.8 laravel-mongodb-session 1.4
I'm just trying to setup my new project with mongodb support. This is composer.json