mongo-express icon indicating copy to clipboard operation
mongo-express copied to clipboard

Import not working without any log

Open gcheliz opened this issue 5 years ago • 2 comments

Hi,

I'm trying to import a json file with some documents but mongo-express (0.54.0) not showing any error message and not getting any error log. The only message that we are getting is:

mongo-express_1 | POST /db/xxx/import/xxx 400 7.238 ms - 8

And the data that I'm trying to add is like:

{"_id":{"$oid":"xxx"},"acc":{"$oid":"xxx"},"user":{"$oid":"xxx"},"origin":"invoice#xxx","bridge":"contact#xxx","group":{"$oid":"xxx"},"type":"invoice","en":1,"line":1,"account":xxx,"debit":1.01,"credit":0.0,"desc":"xxx","docdesc":"xxx","tmp":1615330800,"tags":[],"notes":"","files":[],"contact":{"$oid":"xxx"},"cname":"c","year":2021,"date":{"$date":"2021-03-09T23:00:00Z"}} {"_id":{"$oid":"yyy"},"acc":{"$oid":"yyy"},"user":{"$oid":"yyy"},"origin":"invoice#yyy","bridge":"aa#yyy","group":{"$oid":"yyy"},"type":"invoice","en":1,"line":2,"account":1234567890,"debit":0.0,"credit":1.0,"desc":"yyy","docdesc":"yyy","tmp":1615330800,"tags":[""],"notes":"","files":[],"contact":{"$oid":"yyy"},"cname":"c","year":2021,"date":{"$date":"2021-03-09T23:00:00Z"}}

Are you planning to fix this?

Thanks in advance

gcheliz avatar Mar 18 '21 15:03 gcheliz

Just have the same issue with the lastest version. I exported with mongo express the db in json format but import dont work. Just have in console an error 400 for the post request

geoffroy-serre avatar May 31 '21 11:05 geoffroy-serre

Any update of that?

Thanks in advance.

gcheliz avatar May 31 '21 11:05 gcheliz

same here POST /db/itquiz/import/constants 400 9.385 ms - 8 Happened on mongo:5.0.9-focal / mongo-express;latest

Only fix is to use : mongoimport --authenticationDatabase admin --username [username] --password [password]--db [dbName]--collection [collectionName]--file [collectionName.json]

StoryDevOffical avatar Dec 18 '22 18:12 StoryDevOffical

This should be fixed with #996 (mongo-express v1.0.1-rc).

rtritto avatar Dec 23 '22 10:12 rtritto