mdbootstrap / mdb-cli

Command Line Interface for MDB (https://mdbootstrap.com/) - learn more about CLI via the link below
https://mdbootstrap.com/docs/standard/cli/
57 stars 26 forks source link

Login with Google throwing UnhandledPromiseRejectionWarning #48

Open andreisaikouski opened 3 years ago

andreisaikouski commented 3 years ago

Using version 3.4.0 of mdb cli

Receive the following when running

   mdb login --method google
    ? Enter text copied from web browser (node:8461) UnhandledPromiseRejectionWarning: TypeError: Expected a `target`
    at Object.module.exports [as default] (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/node_modules/open/index.js:62:9)
    at GoogleAuthStrategy.SocialAuthStrategy.openSocialLoginBrowser (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/strategies/auth/social-auth-strategy.js:82:23)
    at GoogleAuthStrategy.<anonymous> (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/strategies/auth/social-auth-strategy.js:71:30)
    at step (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/strategies/auth/social-auth-strategy.js:48:23)
    at Object.next (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/strategies/auth/social-auth-strategy.js:29:53)
    at /Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/strategies/auth/social-auth-strategy.js:23:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/strategies/auth/social-auth-strategy.js:19:12)
    at GoogleAuthStrategy.SocialAuthStrategy.login (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/strategies/auth/social-auth-strategy.js:66:16)
    at UserReceiver.<anonymous> (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/user-receiver.js:111:64)
    at step (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/user-receiver.js:48:23)
    at Object.next (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/user-receiver.js:29:53)
    at /Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/user-receiver.js:23:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/user-receiver.js:19:12)
    at UserReceiver.login (/Users/andrei.saikouskiibm.com/.nvm/versions/node/v10.19.0/lib/node_modules/mdb-cli/receivers/user-receiver.js:104:16)
(node:8461) 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(). (rejection id: 1)
(node:8461) [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.

Update: this issue does not occur with version 3.2.6