adobe / aio-cli

Adobe I/O Extensible CLI
https://www.adobe.io
Apache License 2.0
77 stars 33 forks source link

init is weird when login times out #285

Open purplecabbage opened 3 years ago

purplecabbage commented 3 years ago

Expected Behaviour

If login times out while trying to create a new firefly app aio app init the user should be informed, and presented with a choice of how to proceed.

  1. try again
  2. continue without auth ( creates a new app which is not bound to a console project and is undeployable )
  3. quit/exit

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Environment Info

  System:
    OS: macOS 11.2.3
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 398.30 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.22.1 - ~/.nvm/versions/node/v12.22.1/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.12 - ~/.nvm/versions/node/v12.22.1/bin/npm
  Virtualization:
    Docker: 20.10.5 - /usr/local/bin/docker
  npmGlobalPackages:
    @adobe/aio-cli: 7.1.0

Sample Code that illustrates the problem

Logs taken while reproducing problem

aio app init poc-git-corp
Error while generating the configuration from the Adobe Developer Console: Error: Timed out after 120 seconds.
Skipping configuration setup..

You are about to initialize the project 'poc-git-corp'
Generating code in: ***/poc-git-corp
? Which Adobe I/O App features do you want to enable for this project?
Select components to include Actions: Deploy Runtime actions, Web Assets: Deploy hosted static assets
? Which type of sample actions do you want to create?
Select type of actions to generate Generic
? Which type of UI do you want to add to your project?
select template to generate React Spectrum 3
? We are about to create a new sample action that showcases how to access an external API.
How would you like to name this action? gitcorp
   create package.json
   create manifest.yml
   create README.md
   create test/jest.setup.js
   create .env
   create .gitignore
   create actions/gitcorp/index.js
   create test/actions/gitcorp.test.js
   create actions/utils.js
   create test/actions/utils.test.js
   create e2e/actions/gitcorp.e2e.js
   create web-src/index.html
   create web-src/src/config.json
   create web-src/src/exc-runtime.js
   create web-src/src/index.css
   create web-src/src/index.js
   create web-src/src/utils.js
   create web-src/src/components/About.js
   create web-src/src/components/ActionsForm.js
   create web-src/src/components/App.js
   create web-src/src/components/Home.js
   create web-src/src/components/SideBar.js
   create .babelrc
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.

> core-js@2.6.12 postinstall ***/poc-git-corp/node_modules/@babel/polyfill/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> core-js@2.6.12 postinstall ***/poc-git-corp/node_modules/@babel/runtime-corejs2/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

> core-js@3.15.1 postinstall ***/poc-git-corp/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

> core-js-pure@3.15.1 postinstall ***/poc-git-corp/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @openwhisk/wskdebug@1.3.0 requires a peer of ngrok@^3.2.7 but none is installed. You must install peer dependencies yourself.

added 1136 packages from 556 contributors and audited 1141 packages in 45.847s

51 packages are looking for funding
  run `npm fund` for details

found 3 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
✔ App initialization finished!

^C
aiojbot commented 3 years ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-1205