Meteor-Community-Packages / meteor-collection2

A Meteor package that extends Mongo.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating.
https://packosphere.com/aldeed/collection2
MIT License
1.03k stars 108 forks source link

Failed validation Connection after laptop wakesup #451

Closed pmogollons closed 1 day ago

pmogollons commented 3 weeks ago

When the laptop wakesup from sleep I get this error, not sure how to better describe it.

It doesnt seem like a critical bug, but still something to check.

W20240706-17:41:34.138(-5)? (STDERR) meteor://💻app/packages/aldeed_collection2.js:679
W20240706-17:41:34.138(-5)? (STDERR)       const error = new Error(message);
W20240706-17:41:34.138(-5)? (STDERR)                     ^
W20240706-17:41:34.139(-5)? (STDERR) 
W20240706-17:41:34.139(-5)? (STDERR) Error: Failed validation Connection to 127.0.0.1:3001 interrupted due to server monitor timeout
W20240706-17:41:34.139(-5)? (STDERR)     at getErrorObject (packages/aldeed:collection2/main.js:572:19)
W20240706-17:41:34.139(-5)? (STDERR)     at Collection.Mongo.Collection.<computed> [as updateAsync] (packages/aldeed:collection2/main.js:258:16)
W20240706-17:41:34.139(-5)? (STDERR)     at processTicksAndRejections (node:internal/process/task_queues:95:5)
W20240706-17:41:34.139(-5)? (STDERR)     at AccountsServer._expireTokens (packages/accounts-base/accounts_server.js:1133:5)
W20240706-17:41:34.139(-5)? (STDERR)     at packages/accounts-base/accounts_server.js:1724:4 {
W20240706-17:41:34.139(-5)? (STDERR)   invalidKeys: [],
W20240706-17:41:34.139(-5)? (STDERR)   validationContext: <ref *1> ValidationContext {
W20240706-17:41:34.139(-5)? (STDERR)     name: 'default',
W20240706-17:41:34.139(-5)? (STDERR)     _simpleSchema: SimpleSchema {
W20240706-17:41:34.139(-5)? (STDERR)       pick: [Function: pickOrOmit],
W20240706-17:41:34.139(-5)? (STDERR)       omit: [Function: pickOrOmit],
W20240706-17:41:34.139(-5)? (STDERR)       _constructorOptions: { humanizeAutoLabels: true, requiredByDefault: true },
W20240706-17:41:34.139(-5)? (STDERR)       _cleanOptions: {
W20240706-17:41:34.139(-5)? (STDERR)         autoConvert: true,
W20240706-17:41:34.139(-5)? (STDERR)         extendAutoValueContext: {},
W20240706-17:41:34.139(-5)? (STDERR)         filter: false,
W20240706-17:41:34.141(-5)? (STDERR)         getAutoValues: true,
W20240706-17:41:34.141(-5)? (STDERR)         removeEmptyStrings: true,
W20240706-17:41:34.141(-5)? (STDERR)         removeNullsFromArrays: false,
W20240706-17:41:34.141(-5)? (STDERR)         trimStrings: true
W20240706-17:41:34.142(-5)? (STDERR)       },
W20240706-17:41:34.142(-5)? (STDERR)       _validators: [],
W20240706-17:41:34.142(-5)? (STDERR)       _docValidators: [],
W20240706-17:41:34.142(-5)? (STDERR)       _validationContexts: { default: [Circular *1] },
W20240706-17:41:34.142(-5)? (STDERR)       _schema: {
W20240706-17:41:34.142(-5)? (STDERR)         username: {
W20240706-17:41:34.142(-5)? (STDERR)           optional: true,
W20240706-17:41:34.142(-5)? (STDERR)           label: 'Username',
W20240706-17:41:34.142(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.142(-5)? (STDERR)         },
W20240706-17:41:34.142(-5)? (STDERR)         emails: {
W20240706-17:41:34.142(-5)? (STDERR)           optional: true,
W20240706-17:41:34.142(-5)? (STDERR)           label: 'Emails',
W20240706-17:41:34.146(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.146(-5)? (STDERR)         },
W20240706-17:41:34.146(-5)? (STDERR)         phones: {
W20240706-17:41:34.146(-5)? (STDERR)           optional: true,
W20240706-17:41:34.146(-5)? (STDERR)           label: 'Phones',
W20240706-17:41:34.146(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.146(-5)? (STDERR)         },
W20240706-17:41:34.147(-5)? (STDERR)         profile: {
W20240706-17:41:34.147(-5)? (STDERR)           optional: true,
W20240706-17:41:34.147(-5)? (STDERR)           label: 'Profile',
W20240706-17:41:34.147(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.147(-5)? (STDERR)         },
W20240706-17:41:34.148(-5)? (STDERR)         services: {
W20240706-17:41:34.148(-5)? (STDERR)           optional: true,
W20240706-17:41:34.148(-5)? (STDERR)           label: 'Services',
W20240706-17:41:34.148(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.148(-5)? (STDERR)         },
W20240706-17:41:34.149(-5)? (STDERR)         roles: {
W20240706-17:41:34.149(-5)? (STDERR)           optional: true,
W20240706-17:41:34.149(-5)? (STDERR)           label: 'Roles',
W20240706-17:41:34.149(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.149(-5)? (STDERR)         },
W20240706-17:41:34.149(-5)? (STDERR)         heartbeat: {
W20240706-17:41:34.149(-5)? (STDERR)           optional: true,
W20240706-17:41:34.150(-5)? (STDERR)           label: 'Heartbeat',
W20240706-17:41:34.150(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.150(-5)? (STDERR)         },
W20240706-17:41:34.150(-5)? (STDERR)         lastLoginAt: {
W20240706-17:41:34.150(-5)? (STDERR)           optional: true,
W20240706-17:41:34.150(-5)? (STDERR)           label: 'Last login at',
W20240706-17:41:34.150(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.150(-5)? (STDERR)         },
W20240706-17:41:34.150(-5)? (STDERR)         firstLoginAt: {
W20240706-17:41:34.150(-5)? (STDERR)           optional: true,
W20240706-17:41:34.150(-5)? (STDERR)           label: 'First login at',
W20240706-17:41:34.150(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.150(-5)? (STDERR)         },
W20240706-17:41:34.150(-5)? (STDERR)         createdAt: {
W20240706-17:41:34.150(-5)? (STDERR)           autoValue: [Function: autoValue],
W20240706-17:41:34.150(-5)? (STDERR)           optional: false,
W20240706-17:41:34.150(-5)? (STDERR)           label: 'Created at',
W20240706-17:41:34.150(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.151(-5)? (STDERR)         },
W20240706-17:41:34.151(-5)? (STDERR)         updatedAt: {
W20240706-17:41:34.151(-5)? (STDERR)           autoValue: [Function: autoValue],
W20240706-17:41:34.151(-5)? (STDERR)           optional: false,
W20240706-17:41:34.151(-5)? (STDERR)           label: 'Updated at',
W20240706-17:41:34.151(-5)? (STDERR)           type: SimpleSchemaGroup { definitions: [Array] }
W20240706-17:41:34.151(-5)? (STDERR)         }
W20240706-17:41:34.151(-5)? (STDERR)       },
W20240706-17:41:34.151(-5)? (STDERR)       _depsLabels: {},
W20240706-17:41:34.151(-5)? (STDERR)       _schemaKeys: [
W20240706-17:41:34.151(-5)? (STDERR)         'username',     'emails',
W20240706-17:41:34.151(-5)? (STDERR)         'phones',       'profile',
W20240706-17:41:34.151(-5)? (STDERR)         'services',     'roles',
W20240706-17:41:34.152(-5)? (STDERR)         'heartbeat',    'lastLoginAt',
W20240706-17:41:34.152(-5)? (STDERR)         'firstLoginAt', 'createdAt',
W20240706-17:41:34.152(-5)? (STDERR)         'updatedAt'
W20240706-17:41:34.152(-5)? (STDERR)       ],
W20240706-17:41:34.152(-5)? (STDERR)       _autoValues: [
W20240706-17:41:34.152(-5)? (STDERR)         {
W20240706-17:41:34.152(-5)? (STDERR)           closestSubschemaFieldName: '',
W20240706-17:41:34.152(-5)? (STDERR)           fieldName: 'createdAt',
W20240706-17:41:34.152(-5)? (STDERR)           func: [Function: autoValue]
W20240706-17:41:34.152(-5)? (STDERR)         },
W20240706-17:41:34.152(-5)? (STDERR)         {
W20240706-17:41:34.152(-5)? (STDERR)           closestSubschemaFieldName: '',
W20240706-17:41:34.152(-5)? (STDERR)           fieldName: 'updatedAt',
W20240706-17:41:34.152(-5)? (STDERR)           func: [Function: autoValue]
W20240706-17:41:34.152(-5)? (STDERR)         }
W20240706-17:41:34.152(-5)? (STDERR)       ],
W20240706-17:41:34.154(-5)? (STDERR)       _blackboxKeys: Set(9) {
W20240706-17:41:34.154(-5)? (STDERR)         'username',
W20240706-17:41:34.154(-5)? (STDERR)         'emails',
W20240706-17:41:34.154(-5)? (STDERR)         'phones',
W20240706-17:41:34.154(-5)? (STDERR)         'profile',
W20240706-17:41:34.154(-5)? (STDERR)         'services',
W20240706-17:41:34.154(-5)? (STDERR)         'roles',
W20240706-17:41:34.154(-5)? (STDERR)         'heartbeat',
W20240706-17:41:34.154(-5)? (STDERR)         'lastLoginAt',
W20240706-17:41:34.154(-5)? (STDERR)         'firstLoginAt'
W20240706-17:41:34.154(-5)? (STDERR)       },
W20240706-17:41:34.154(-5)? (STDERR)       _firstLevelSchemaKeys: [
W20240706-17:41:34.154(-5)? (STDERR)         'username',     'emails',
W20240706-17:41:34.154(-5)? (STDERR)         'phones',       'profile',
W20240706-17:41:34.154(-5)? (STDERR)         'services',     'roles',
W20240706-17:41:34.155(-5)? (STDERR)         'heartbeat',    'lastLoginAt',
W20240706-17:41:34.156(-5)? (STDERR)         'firstLoginAt', 'createdAt',
W20240706-17:41:34.156(-5)? (STDERR)         'updatedAt'
W20240706-17:41:34.156(-5)? (STDERR)       ],
W20240706-17:41:34.156(-5)? (STDERR)       _rawDefinition: null,
W20240706-17:41:34.156(-5)? (STDERR)       messageBox: MessageBox {
W20240706-17:41:34.156(-5)? (STDERR)         language: 'en',
W20240706-17:41:34.156(-5)? (STDERR)         messageList: {
W20240706-17:41:34.156(-5)? (STDERR)           en: {
W20240706-17:41:34.156(-5)? (STDERR)             required: '{{{label}}} is required',
W20240706-17:41:34.156(-5)? (STDERR)             minString: '{{{label}}} must be at least {{min}} characters',
W20240706-17:41:34.157(-5)? (STDERR)             maxString: '{{{label}}} cannot exceed {{max}} characters',
W20240706-17:41:34.157(-5)? (STDERR)             minNumber: '{{{label}}} must be at least {{min}}',
W20240706-17:41:34.157(-5)? (STDERR)             maxNumber: '{{{label}}} cannot exceed {{max}}',
W20240706-17:41:34.157(-5)? (STDERR)             minNumberExclusive: '{{{label}}} must be greater than {{min}}',
W20240706-17:41:34.157(-5)? (STDERR)             maxNumberExclusive: '{{{label}}} must be less than {{max}}',
W20240706-17:41:34.157(-5)? (STDERR)             minDate: '{{{label}}} must be on or after {{min}}',
W20240706-17:41:34.157(-5)? (STDERR)             maxDate: '{{{label}}} cannot be after {{max}}',
W20240706-17:41:34.157(-5)? (STDERR)             badDate: '{{{label}}} is not a valid date',
W20240706-17:41:34.157(-5)? (STDERR)             minCount: 'You must specify at least {{minCount}} values',
W20240706-17:41:34.157(-5)? (STDERR)             maxCount: 'You cannot specify more than {{maxCount}} values',
W20240706-17:41:34.157(-5)? (STDERR)             noDecimal: '{{{label}}} must be an integer',
W20240706-17:41:34.158(-5)? (STDERR)             notAllowed: '{{{value}}} is not an allowed value',
W20240706-17:41:34.158(-5)? (STDERR)             expectedType: '{{{label}}} must be of type {{dataType}}',
W20240706-17:41:34.158(-5)? (STDERR)             regEx: [Function: regEx],
W20240706-17:41:34.158(-5)? (STDERR)             keyNotInSchema: '{{name}} is not allowed by the schema'
W20240706-17:41:34.158(-5)? (STDERR)           }
W20240706-17:41:34.158(-5)? (STDERR)         },
W20240706-17:41:34.158(-5)? (STDERR)         interpolate: /{{{([^{}#][\s\S]+?)}}}/g,
W20240706-17:41:34.158(-5)? (STDERR)         evaluate: undefined,
W20240706-17:41:34.158(-5)? (STDERR)         escape: /{{([^{}#][\s\S]+?)}}/g
W20240706-17:41:34.158(-5)? (STDERR)       },
W20240706-17:41:34.158(-5)? (STDERR)       version: 2
W20240706-17:41:34.158(-5)? (STDERR)     },
W20240706-17:41:34.158(-5)? (STDERR)     _schema: {
W20240706-17:41:34.158(-5)? (STDERR)       username: {
W20240706-17:41:34.158(-5)? (STDERR)         optional: true,
W20240706-17:41:34.158(-5)? (STDERR)         label: 'Username',
W20240706-17:41:34.158(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.158(-5)? (STDERR)       },
W20240706-17:41:34.159(-5)? (STDERR)       emails: {
W20240706-17:41:34.159(-5)? (STDERR)         optional: true,
W20240706-17:41:34.159(-5)? (STDERR)         label: 'Emails',
W20240706-17:41:34.159(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.160(-5)? (STDERR)       },
W20240706-17:41:34.160(-5)? (STDERR)       phones: {
W20240706-17:41:34.160(-5)? (STDERR)         optional: true,
W20240706-17:41:34.160(-5)? (STDERR)         label: 'Phones',
W20240706-17:41:34.160(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.160(-5)? (STDERR)       },
W20240706-17:41:34.161(-5)? (STDERR)       profile: {
W20240706-17:41:34.161(-5)? (STDERR)         optional: true,
W20240706-17:41:34.161(-5)? (STDERR)         label: 'Profile',
W20240706-17:41:34.161(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.161(-5)? (STDERR)       },
W20240706-17:41:34.161(-5)? (STDERR)       services: {
W20240706-17:41:34.161(-5)? (STDERR)         optional: true,
W20240706-17:41:34.161(-5)? (STDERR)         label: 'Services',
W20240706-17:41:34.161(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.161(-5)? (STDERR)       },
W20240706-17:41:34.161(-5)? (STDERR)       roles: {
W20240706-17:41:34.161(-5)? (STDERR)         optional: true,
W20240706-17:41:34.162(-5)? (STDERR)         label: 'Roles',
W20240706-17:41:34.162(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.162(-5)? (STDERR)       },
W20240706-17:41:34.162(-5)? (STDERR)       heartbeat: {
W20240706-17:41:34.162(-5)? (STDERR)         optional: true,
W20240706-17:41:34.163(-5)? (STDERR)         label: 'Heartbeat',
W20240706-17:41:34.163(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.163(-5)? (STDERR)       },
W20240706-17:41:34.163(-5)? (STDERR)       lastLoginAt: {
W20240706-17:41:34.163(-5)? (STDERR)         optional: true,
W20240706-17:41:34.163(-5)? (STDERR)         label: 'Last login at',
W20240706-17:41:34.164(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.164(-5)? (STDERR)       },
W20240706-17:41:34.164(-5)? (STDERR)       firstLoginAt: {
W20240706-17:41:34.164(-5)? (STDERR)         optional: true,
W20240706-17:41:34.164(-5)? (STDERR)         label: 'First login at',
W20240706-17:41:34.164(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.164(-5)? (STDERR)       },
W20240706-17:41:34.164(-5)? (STDERR)       createdAt: {
W20240706-17:41:34.164(-5)? (STDERR)         autoValue: [Function: autoValue],
W20240706-17:41:34.164(-5)? (STDERR)         optional: false,
W20240706-17:41:34.164(-5)? (STDERR)         label: 'Created at',
W20240706-17:41:34.165(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.165(-5)? (STDERR)       },
W20240706-17:41:34.165(-5)? (STDERR)       updatedAt: {
W20240706-17:41:34.165(-5)? (STDERR)         autoValue: [Function: autoValue],
W20240706-17:41:34.165(-5)? (STDERR)         optional: false,
W20240706-17:41:34.165(-5)? (STDERR)         label: 'Updated at',
W20240706-17:41:34.165(-5)? (STDERR)         type: SimpleSchemaGroup { definitions: [ [Object] ] }
W20240706-17:41:34.166(-5)? (STDERR)       }
W20240706-17:41:34.166(-5)? (STDERR)     },
W20240706-17:41:34.166(-5)? (STDERR)     _schemaKeys: [
W20240706-17:41:34.166(-5)? (STDERR)       'username',     'emails',
W20240706-17:41:34.166(-5)? (STDERR)       'phones',       'profile',
W20240706-17:41:34.166(-5)? (STDERR)       'services',     'roles',
W20240706-17:41:34.166(-5)? (STDERR)       'heartbeat',    'lastLoginAt',
W20240706-17:41:34.166(-5)? (STDERR)       'firstLoginAt', 'createdAt',
W20240706-17:41:34.166(-5)? (STDERR)       'updatedAt'
W20240706-17:41:34.166(-5)? (STDERR)     ],
W20240706-17:41:34.166(-5)? (STDERR)     _validationErrors: [],
W20240706-17:41:34.167(-5)? (STDERR)     _deps: {}
W20240706-17:41:34.167(-5)? (STDERR)   },
W20240706-17:41:34.167(-5)? (STDERR)   code: undefined,
W20240706-17:41:34.167(-5)? (STDERR)   sanitizedError: errorClass [Error]: Failed validation Connection to 127.0.0.1:3001 interrupted due to server monitor timeout [400]
W20240706-17:41:34.168(-5)? (STDERR)       at getErrorObject (packages/aldeed:collection2/main.js:579:30)
W20240706-17:41:34.168(-5)? (STDERR)       at Collection.Mongo.Collection.<computed> [as updateAsync] (packages/aldeed:collection2/main.js:258:16)
W20240706-17:41:34.168(-5)? (STDERR)       at processTicksAndRejections (node:internal/process/task_queues:95:5)
W20240706-17:41:34.168(-5)? (STDERR)       at AccountsServer._expireTokens (packages/accounts-base/accounts_server.js:1133:5)
W20240706-17:41:34.168(-5)? (STDERR)       at packages/accounts-base/accounts_server.js:1724:4 {
W20240706-17:41:34.168(-5)? (STDERR)     isClientSafe: true,
W20240706-17:41:34.168(-5)? (STDERR)     error: 400,
W20240706-17:41:34.168(-5)? (STDERR)     reason: 'Failed validation Connection to 127.0.0.1:3001 interrupted due to server monitor timeout',
W20240706-17:41:34.168(-5)? (STDERR)     details: '[]',
W20240706-17:41:34.168(-5)? (STDERR)     errorType: 'Meteor.Error'
W20240706-17:41:34.168(-5)? (STDERR)   }
W20240706-17:41:34.168(-5)? (STDERR) }
W20240706-17:41:34.169(-5)? (STDERR) 
W20240706-17:41:34.169(-5)? (STDERR) Node.js v20.12.2

To Reproduce

Steps to reproduce the behavior:

  1. Leave laptop to go to sleep
  2. Wakeup the laptop
  3. Check the console for the error

Versions (please complete the following information):

github-actions[bot] commented 3 weeks ago

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously. Our goal is to provide long-term lifecycles for packages and keep up with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time. Therefore, we can't guarantee you issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit a pull request, too! We will accompany you in the process with reviews and hints on how to get development set up.

Please also consider sponsoring the maintainers of the package. If you don't know who is currently maintaining this package, just leave a comment and we'll let you know

jankapunkt commented 2 weeks ago

Thank you @pmogollons can you please cross-check with this https://github.com/meteor/meteor/issues/13108 to make sure the root cause is really with Collection 2 and not with the Meteor core system.

jankapunkt commented 2 weeks ago

@pmogollons it seems there is more to this from a core perspective: https://forums.meteor.com/t/back-from-offline-method-does-not-apply-on-server-side/61619/6