unpub icon indicating copy to clipboard operation
unpub copied to clipboard

Failed when publishing a package [Incompatible mongodb version]

Open rrmarto opened this issue 2 years ago • 2 comments

I start the server and it works perfectly, when I go to publish a package I receive the message "Successfully uploaded package" but when consulting the packages I receive the following error:

Error thrown by handler. {ok: 0.0, errmsg: Unsupported OP_QUERY command: count. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal, code: 352, codeName: UnsupportedOpQueryCommand} package:shelf/src/middleware/logger.dart 30:62 logRequests...

If you consult the url directly https://server:port/api/packages/{name of the package} you can see that the package was inserted correctly because it returns the json of the package, the problem is when displaying it. I think that the problem is related with the legacy opcodes unsupported since mongodb 5.1 as shown here https://dochub.mongodb.org/core/legacy-opcode-removal and I'm using the latest community version 6.0.4.

Is there any solution that doesn't be downgrade the mongodb version?

Thanks in advance!

rrmarto avatar Jan 26 '23 10:01 rrmarto

It looks that there's some migration work to support MongoDB 6.x.x.

talisk avatar Feb 24 '23 08:02 talisk

I start the server and it works perfectly, when I go to publish a package I receive the message "Successfully uploaded package" but when consulting the packages I receive the following error:

Error thrown by handler. {ok: 0.0, errmsg: Unsupported OP_QUERY command: count. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal, code: 352, codeName: UnsupportedOpQueryCommand} package:shelf/src/middleware/logger.dart 30:62 logRequests...

If you consult the url directly https://server:port/api/packages/{name of the package} you can see that the package was inserted correctly because it returns the json of the package, the problem is when displaying it. I think that the problem is related with the legacy opcodes unsupported since mongodb 5.1 as shown here https://dochub.mongodb.org/core/legacy-opcode-removal and I'm using the latest community version 6.0.4.

Is there any solution that doesn't be downgrade the mongodb version?

Thanks in advance!

You can downgrade MongoDB to 5.0.15

PauloYR avatar Mar 15 '23 19:03 PauloYR