Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Delete all" broken in latest release #103

Open
camalot opened this issue Oct 10, 2023 · 6 comments
Open

"Delete all" broken in latest release #103

camalot opened this issue Oct 10, 2023 · 6 comments
Assignees

Comments

@camalot
Copy link

camalot commented Oct 10, 2023

If you attempt to "Delete All" from a collection the server crashes and logs the following error

2023-10-10T00:35:46.021960762Z /node_modules/mongo-express/lib/routes/collection.js:84
2023-10-10T00:35:46.021983745Z           ...result,
2023-10-10T00:35:46.021988073Z              ^
2023-10-10T00:35:46.021991550Z 
2023-10-10T00:35:46.021995016Z TypeError: result is not iterable
2023-10-10T00:35:46.021998673Z     at exp._buildMongoQuery (/node_modules/mongo-express/lib/routes/collection.js:84:14)
2023-10-10T00:35:46.022002541Z     at exp.deleteCollection (/node_modules/mongo-express/lib/routes/collection.js:448:23)
2023-10-10T00:35:46.022006077Z     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
2023-10-10T00:35:46.022009594Z     at next (/node_modules/express/lib/router/route.js:144:13)
2023-10-10T00:35:46.022013050Z     at mongoMiddleware (/node_modules/mongo-express/lib/router.js:260:5)
2023-10-10T00:35:46.022016557Z     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
2023-10-10T00:35:46.022020053Z     at next (/node_modules/express/lib/router/route.js:144:13)
2023-10-10T00:35:46.022023600Z     at Route.dispatch (/node_modules/express/lib/router/route.js:114:3)
2023-10-10T00:35:46.022027187Z     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
2023-10-10T00:35:46.022030693Z     at /node_modules/express/lib/router/index.js:284:15
2023-10-10T00:35:46.022034130Z
@BlackthornYugen BlackthornYugen self-assigned this Oct 10, 2023
@BlackthornYugen
Copy link
Member

Thanks for the bug report. I will try to reproduce tomorrow. Is this the latest docker release (1.0.0) or latest npm release (1.0.2)?

@camalot
Copy link
Author

camalot commented Oct 10, 2023

Latest docker

@camalot
Copy link
Author

camalot commented Oct 10, 2023

my compose

mongo-express:
    user: 1000:1000
    hostname: mongo-express
    container_name: mongo-express
    image: mongo-express:latest
    ports: 
      - 49068:8081
    volumes:
      - /mnt/container_data/mongo-express/config/config.js:/config.js
    environment:
      ME_CONFIG_MONGODB_ENABLE_ADMIN: true
      ME_CONFIG_MONGODB_AUTH_USERNAME: 'root'
      ME_CONFIG_MONGODB_AUTH_PASSWORD: '**************************************'
      ME_CONFIG_MONGODB_ADMINUSERNAME: 'root'
      ME_CONFIG_MONGODB_ADMINPASSWORD: '*************************************'
      ME_CONFIG_MONGODB_URL: mongodb://mdbroot:[email protected]:27017/
      ME_CONFIG_BASICAUTH: true
      ME_CONFIG_BASICAUTH_USERNAME: 'admin'
      ME_CONFIG_BASICAUTH_PASSWORD: '**********************************'
      ME_CONFIG_MONGODB_ALLOW_DISK_USE: true
    restart: unless-stopped
    networks:
    - internal
    dns:
    - 192.168.2.1
    - 1.1.1.1
    - 1.0.0.1
    - 8.8.8.8
    - 8.8.4.4
    dns_search: my-internal.local

@BlackthornYugen
Copy link
Member

Reproducible on mongo-express:1.0.0 (arm64). I'll test with 1.0.1 and/or 1.0.2 shortly.

mongo-express-docker-mongoexpress-1  | /node_modules/mongo-express/lib/routes/collection.js:84
mongo-express-docker-mongoexpress-1  |           ...result,
mongo-express-docker-mongoexpress-1  |              ^
mongo-express-docker-mongoexpress-1  | 
mongo-express-docker-mongoexpress-1  | TypeError: result is not iterable
mongo-express-docker-mongoexpress-1  |     at exp._buildMongoQuery (/node_modules/mongo-express/lib/routes/collection.js:84:14)
mongo-express-docker-mongoexpress-1  |     at exp.deleteCollection (/node_modules/mongo-express/lib/routes/collection.js:448:23)
mongo-express-docker-mongoexpress-1  |     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
mongo-express-docker-mongoexpress-1  |     at next (/node_modules/express/lib/router/route.js:144:13)
mongo-express-docker-mongoexpress-1  |     at mongoMiddleware (/node_modules/mongo-express/lib/router.js:260:5)
mongo-express-docker-mongoexpress-1  |     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
mongo-express-docker-mongoexpress-1  |     at next (/node_modules/express/lib/router/route.js:144:13)
mongo-express-docker-mongoexpress-1  |     at Route.dispatch (/node_modules/express/lib/router/route.js:114:3)
mongo-express-docker-mongoexpress-1  |     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
mongo-express-docker-mongoexpress-1  |     at /node_modules/express/lib/router/index.js:284:15
mongo-express-docker-mongoexpress-1  | 
mongo-express-docker-mongoexpress-1  | Node.js v18.18.0
mongo-express-docker-mongoexpress-1  |

@GabrielBragaGit
Copy link

same here, it's broken... had to downgrade to 1.0.0-alpha.4 to work...

@raphaelsander
Copy link

Hi,

Version 1.0.0-alpha.4 is working well for me by now.

raphaelsander added a commit to marcosmatioli/ragnarok-wiki that referenced this issue Nov 5, 2023
The new mongo-express image (e8f1096fc88d) is broken, not possible
delete objects of a collection and also import data.
mongo-express/mongo-express-docker#103
raphaelsander added a commit to marcosmatioli/ragnarok-wiki that referenced this issue Nov 6, 2023
The new mongo-express image (e8f1096fc88d) is broken, not possible
delete objects of a collection and also import data.
mongo-express/mongo-express-docker#103
raphaelsander added a commit to marcosmatioli/ragnarok-wiki that referenced this issue Jan 15, 2024
The new mongo-express image (e8f1096fc88d) is broken, not possible
delete objects of a collection and also import data.
mongo-express/mongo-express-docker#103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants