Skip to content

Error when observing the cursor: TypeError: this.documents?.clear is not a function #13652

@welkinwong

Description

@welkinwong

Observed Errors:

version: METEOR@3.1.2

After I change the subscription, there is a certain probability of errors occurring, and once an error occurs, it will continue to report errors at intervals.

Exception while polling query {"collectionName":"name","selector":{"type":"a","ownerId":"123456789"},"options":{"transform":null,"sort":{"accessAt":-1},"limit":200,"projection":{"_id":1,"referenceId":1}}} TypeError: this.documents?.clear is not a function
    at FindCursor.rewind (/Users/name/.meteor/packages/npm-mongo/.6.10.2.1sx2v8ti8rif++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/src/cursor/abstract_cursor.ts:660:21)
    at AsynchronousCursor._rewind (packages/mongo/asynchronous_cursor.js:120:20)
    at AsynchronousCursor.forEach (packages/mongo/asynchronous_cursor.js:99:10)
    at AsynchronousCursor.map (packages/mongo/asynchronous_cursor.js:111:16)
    at AsynchronousCursor.fetch (packages/mongo/asynchronous_cursor.js:131:17)
    at AsynchronousCursor.getRawObjects (packages/mongo/asynchronous_cursor.js:147:19)
    at PollingObserveDriver._pollMongo (packages/mongo/polling_observe_driver.ts:153:39)
    at Object.task (packages/mongo/polling_observe_driver.ts:111:18)
    at AsynchronousQueue._processOrderedBatch (packages/meteor.js:915:41)
    at AsynchronousQueue._run (packages/meteor.js:873:18)
    at Immediate.<anonymous> (packages/meteor.js:850:14)
    at processImmediate (node:internal/timers:491:21)
    at process.topLevelDomainCallback (node:domain:161:15)
    at process.callbackTrampoline (node:internal/async_hooks:128:24)

Image

Image

Before this error occurred, I had just re-imported the database, and I'm not sure if it's related.

Impact:

Apart from the continuous error messages, no other impacts have been observed.

Request for Help:

Any help or pointers would be highly appreciated!

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions