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

Error when searching districts in campaign productsFilter #59

Open
CaduGomes opened this issue Jun 20, 2023 · 1 comment
Open

Error when searching districts in campaign productsFilter #59

CaduGomes opened this issue Jun 20, 2023 · 1 comment
Labels

Comments

@CaduGomes
Copy link
Member

image

#56 Branch Develop

Log error:

Bugsnag:  Encountered an uncaught error, terminating…
qw3fd  MongoInvalidArgumentError: Method "collection.aggregate()" accepts at most two arguments
qw3fd      at Collection.aggregate (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:365:19)
qw3fd      at packages/meteor.js:350:21
qw3fd      at Collection.Mongo.Collection.aggregate (packages/meteorhacks_aggregate.js:39:46)
qw3fd      at MethodInvocation.DNE_District_List (server/methods/dne.js:234:49)
qw3fd      at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1902:12)
qw3fd      at packages/ddp-server/livedata_server.js:1820:15
qw3fd      at packages/meteor.js:365:18
qw3fd      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1389:31)
qw3fd      at packages/ddp-server/livedata_server.js:1818:36
qw3fd      at new Promise (<anonymous>)
qw3fd      at Server.applyAsync (packages/ddp-server/livedata_server.js:1817:12)
qw3fd      at Server.apply (packages/ddp-server/livedata_server.js:1756:26)
qw3fd      at Server.call (packages/ddp-server/livedata_server.js:1738:17)
qw3fd      at server/routes/rest/dne/dne.js:14:19
qw3fd      at server/lib/routes/app.js:272:4
qw3fd      at doCall (packages/meteorhacks_picker.js:128:14)
qw3fd      at PickerImp._processRoute (packages/meteorhacks_picker.js:122:5)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:90:14)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:78:7)
qw3fd      at PickerImp._dispatch (packages/meteorhacks_picker.js:72:3)
qw3fd      at processNextSubRouter (packages/meteorhacks_picker.js:102:17)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:95:7)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:78:7)
qw3fd      at cors (/app/bundle/programs/server/npm/node_modules/cors/lib/index.js:188:7)
qw3fd      at /app/bundle/programs/server/npm/node_modules/cors/lib/index.js:224:17
qw3fd      at origin (server/lib/routes/app.js:250:4)
qw3fd      at /app/bundle/programs/server/npm/node_modules/cors/lib/index.js:219:13
qw3fd      at optionsCallback (/app/bundle/programs/server/npm/node_modules/cors/lib/index.js:199:9)
qw3fd      at corsMiddleware (/app/bundle/programs/server/npm/node_modules/cors/lib/index.js:204:7)
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at urlencodedParser (/app/bundle/programs/server/npm/node_modules/body-parser/lib/types/urlencoded.js:91:7)
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at jsonParser (/app/bundle/programs/server/npm/node_modules/body-parser/lib/types/json.js:113:7)
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at server/lib/routes/app.js:226:2
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at cookieParser (/app/bundle/programs/server/npm/node_modules/cookie-parser/index.js:71:5)
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at PickerImp._dispatch (packages/meteorhacks_picker.js:72:3)
qw3fd      at packages/meteorhacks_picker.js:162:10
qw3fd      at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
qw3fd   => awaited here:
qw3fd      at Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
qw3fd      at Server.apply (packages/ddp-server/livedata_server.js:1769:22)
qw3fd      at Server.call (packages/ddp-server/livedata_server.js:1738:17)
qw3fd      at server/routes/rest/dne/dne.js:14:19
qw3fd      at server/lib/routes/app.js:272:4
qw3fd      at doCall (packages/meteorhacks_picker.js:128:14)
qw3fd      at PickerImp._processRoute (packages/meteorhacks_picker.js:122:5)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:90:14)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:92:9)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:78:7)
qw3fd      at PickerImp._dispatch (packages/meteorhacks_picker.js:72:3)
qw3fd      at processNextSubRouter (packages/meteorhacks_picker.js:102:17)
qw3fd      at processNextRoute (packages/meteorhacks_picker.js:95:7)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:78:7)
qw3fd      at cors (/app/bundle/programs/server/npm/node_modules/cors/lib/index.js:188:7)
qw3fd      at /app/bundle/programs/server/npm/node_modules/cors/lib/index.js:224:17
qw3fd      at origin (server/lib/routes/app.js:250:4)
qw3fd      at /app/bundle/programs/server/npm/node_modules/cors/lib/index.js:219:13
qw3fd      at optionsCallback (/app/bundle/programs/server/npm/node_modules/cors/lib/index.js:199:9)
qw3fd      at corsMiddleware (/app/bundle/programs/server/npm/node_modules/cors/lib/index.js:204:7)
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at urlencodedParser (/app/bundle/programs/server/npm/node_modules/body-parser/lib/types/urlencoded.js:91:7)
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at jsonParser (/app/bundle/programs/server/npm/node_modules/body-parser/lib/types/json.js:113:7)
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at server/lib/routes/app.js:226:2
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at cookieParser (/app/bundle/programs/server/npm/node_modules/cookie-parser/index.js:71:5)
qw3fd      at doCall (packages/meteorhacks_picker.js:140:16)
qw3fd      at PickerImp._processMiddleware (packages/meteorhacks_picker.js:134:5)
qw3fd      at processNextMiddleware (packages/meteorhacks_picker.js:76:12)
qw3fd      at PickerImp._dispatch (packages/meteorhacks_picker.js:72:3)
qw3fd      at packages/meteorhacks_picker.js:162:10
qw3fd      at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
@CaduGomes CaduGomes added the bug label Jun 20, 2023
@CaduGomes
Copy link
Member Author

O erro ocorre na linha 242 do arquivo server/methods/dne.

const resultsCursor = Models['AddressPlace'].aggregate(pipeline, { cursor: { batchSize: 1 } });

Acredito que os demais .aggregate estejam com o mesmo erro.

A função aggregate do package npm-mongo (4.16.0) realmente recebe 3 argumentos, porém não entendo o motivo.

Print dos argumentos recebidos pela função.

I20230620-19:46:13.432(-3)? [Arguments] {
I20230620-19:46:13.433(-3)?   '0': [ { '$sort': [Object] } ],
I20230620-19:46:13.433(-3)?   '1': { cursor: { batchSize: 1 } },
I20230620-19:46:13.433(-3)?   '2': [Function (anonymous)]
I20230620-19:46:13.433(-3)? }

Encontrei essa possível solução:
https://forums.meteor.com/t/mongodb-meteor-2-12/59992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant