Meteor-Community-Packages / Meteor-Community-Packages/meteor-roles

Upgrading from 3.4.0 to 3.5.0 introduces 6x node "UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'isCalledFromAsync' of undefined" warnings.

Open
#369 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
913
Forks
167
PR merge metrics
No merged PRs in 30d

Description

Using METEOR@2.12, 3.4.0 has no warnings. Upgrading to 3.5.0 introduces a 6x UnhandledPromiseRejectionWarning warnings:

W20230713-14:04:07.850(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'isCalledFromAsync' of undefined
W20230713-14:04:07.851(-5)? (STDERR) at Mongo.Collection. (packages/mongo/collection.js:1002:41)
W20230713-14:04:07.851(-5)? (STDERR) at packages/alanning:roles/roles/roles_server.js:22:20
W20230713-14:04:07.851(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.851(-5)? (STDERR) at module (packages/alanning:roles/roles/roles_server.js:22:3)
W20230713-14:04:07.851(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20230713-14:04:07.851(-5)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20230713-14:04:07.852(-5)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20230713-14:04:07.852(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1571:1
W20230713-14:04:07.852(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1578:3
W20230713-14:04:07.852(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:385:38
W20230713-14:04:07.852(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.852(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:210:21
W20230713-14:04:07.852(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:439:7
W20230713-14:04:07.852(-5)? (STDERR) at Function.run (/Users/j/dev/test/.meteor/local/build/programs/server/profile.js:256:14)
W20230713-14:04:07.852(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:438:13
W20230713-14:04:07.853(-5)? (STDERR) (Use `node --trace-warnings ...` to show where the warning was created)
W20230713-14:04:07.853(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
W20230713-14:04:07.853(-5)? (STDERR) (node:83994) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
W20230713-14:04:07.853(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'isCalledFromAsync' of undefined
W20230713-14:04:07.853(-5)? (STDERR) at Mongo.Collection. (packages/mongo/collection.js:1002:41)
W20230713-14:04:07.854(-5)? (STDERR) at packages/alanning:roles/roles/roles_server.js:22:20
W20230713-14:04:07.854(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.854(-5)? (STDERR) at module (packages/alanning:roles/roles/roles_server.js:22:3)
W20230713-14:04:07.854(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20230713-14:04:07.854(-5)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20230713-14:04:07.854(-5)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20230713-14:04:07.854(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1571:1
W20230713-14:04:07.854(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1578:3
W20230713-14:04:07.854(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:385:38
W20230713-14:04:07.854(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.855(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:210:21
W20230713-14:04:07.855(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:439:7
W20230713-14:04:07.855(-5)? (STDERR) at Function.run (/Users/j/dev/test/.meteor/local/build/programs/server/profile.js:256:14)
W20230713-14:04:07.855(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:438:13
W20230713-14:04:07.856(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
W20230713-14:04:07.856(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'isCalledFromAsync' of undefined
W20230713-14:04:07.856(-5)? (STDERR) at Mongo.Collection. (packages/mongo/collection.js:1002:41)
W20230713-14:04:07.856(-5)? (STDERR) at packages/alanning:roles/roles/roles_server.js:22:20
W20230713-14:04:07.856(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.856(-5)? (STDERR) at module (packages/alanning:roles/roles/roles_server.js:22:3)
W20230713-14:04:07.856(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20230713-14:04:07.856(-5)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20230713-14:04:07.856(-5)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20230713-14:04:07.856(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1571:1
W20230713-14:04:07.857(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1578:3
W20230713-14:04:07.857(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:385:38
W20230713-14:04:07.857(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.857(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:210:21
W20230713-14:04:07.857(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:439:7
W20230713-14:04:07.857(-5)? (STDERR) at Function.run (/Users/j/dev/test/.meteor/local/build/programs/server/profile.js:256:14)
W20230713-14:04:07.857(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:438:13
W20230713-14:04:07.857(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
W20230713-14:04:07.857(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'isCalledFromAsync' of undefined
W20230713-14:04:07.857(-5)? (STDERR) at Mongo.Collection. (packages/mongo/collection.js:1002:41)
W20230713-14:04:07.858(-5)? (STDERR) at packages/alanning:roles/roles/roles_server.js:22:20
W20230713-14:04:07.858(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.858(-5)? (STDERR) at module (packages/alanning:roles/roles/roles_server.js:22:3)
W20230713-14:04:07.858(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20230713-14:04:07.858(-5)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20230713-14:04:07.858(-5)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20230713-14:04:07.858(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1571:1
W20230713-14:04:07.858(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1578:3
W20230713-14:04:07.859(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:385:38
W20230713-14:04:07.859(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.859(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:210:21
W20230713-14:04:07.859(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:439:7
W20230713-14:04:07.859(-5)? (STDERR) at Function.run (/Users/j/dev/test/.meteor/local/build/programs/server/profile.js:256:14)
W20230713-14:04:07.859(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:438:13
W20230713-14:04:07.859(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
W20230713-14:04:07.859(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'isCalledFromAsync' of undefined
W20230713-14:04:07.860(-5)? (STDERR) at Mongo.Collection. (packages/mongo/collection.js:1002:41)
W20230713-14:04:07.860(-5)? (STDERR) at packages/alanning:roles/roles/roles_server.js:22:20
W20230713-14:04:07.860(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.860(-5)? (STDERR) at module (packages/alanning:roles/roles/roles_server.js:22:3)
W20230713-14:04:07.860(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20230713-14:04:07.860(-5)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20230713-14:04:07.860(-5)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20230713-14:04:07.860(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1571:1
W20230713-14:04:07.860(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1578:3
W20230713-14:04:07.862(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:385:38
W20230713-14:04:07.862(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.862(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:210:21
W20230713-14:04:07.862(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:439:7
W20230713-14:04:07.862(-5)? (STDERR) at Function.run (/Users/j/dev/test/.meteor/local/build/programs/server/profile.js:256:14)
W20230713-14:04:07.862(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:438:13
W20230713-14:04:07.862(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
W20230713-14:04:07.872(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'isCalledFromAsync' of undefined
W20230713-14:04:07.872(-5)? (STDERR) at Mongo.Collection. (packages/mongo/collection.js:1002:41)
W20230713-14:04:07.872(-5)? (STDERR) at module (packages/alanning:roles/roles/roles_server.js:23:1)
W20230713-14:04:07.872(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20230713-14:04:07.873(-5)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20230713-14:04:07.873(-5)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20230713-14:04:07.873(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1571:1
W20230713-14:04:07.873(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/packages/alanning_roles.js:1578:3
W20230713-14:04:07.873(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:385:38
W20230713-14:04:07.873(-5)? (STDERR) at Array.forEach ()
W20230713-14:04:07.873(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:210:21
W20230713-14:04:07.873(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:439:7
W20230713-14:04:07.873(-5)? (STDERR) at Function.run (/Users/j/dev/test/.meteor/local/build/programs/server/profile.js:256:14)
W20230713-14:04:07.873(-5)? (STDERR) at /Users/j/dev/test/.meteor/local/build/programs/server/boot.js:438:13
W20230713-14:04:07.874(-5)? (STDERR) (node:83994) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/alanning:roles/roles/roles_server.js at lines 22-23 and packages/mongo/collection.js at line 1002, then reproduce the warning while upgrading METEOR 2.12 from 3.4.0 to 3.5.0. Done means startup no longer emits the reported TypeError and unhandled-promise-rejection warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authorization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.