The Wayback Machine - https://web.archive.org/web/20200711032215/https://github.com/getgauge/gauge/issues/1583
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report details when a plugin fails to install due to a network issue. #1583

Open
zabil opened this issue Feb 19, 2020 · 0 comments
Open

Report details when a plugin fails to install due to a network issue. #1583

zabil opened this issue Feb 19, 2020 · 0 comments

Comments

@zabil
Copy link
Member

@zabil zabil commented Feb 19, 2020

Actual behavior

When there is no internet connection or the machine is behind a proxy

$ gauge install js
Failed to install plugin 'js'.
Reason: Invalid plugin. Could not download js-install.json file.

This error very cryptic and does not point out to the right cause which confuses the user for example.

Steps to reproduce

  1. Go off the internet or configure a proxy
  2. Run gauge install js

Expected behavior

Be very specific and print a detailed error. For example

[gauge] ERR! Could not download and install 'js' plugin
[gauge] ERR!
[gauge] ERR! code ENOTFOUND
[gauge] ERR! network Request to https://download.gauge.org/js-install.json failed
[gauge] ERR! network This is a problem related to network connectivity
[gauge] ERR! network Are you offline or behind a proxy?
[gauge] ERR! network 
[gauge] ERR! network If you are behind a proxy check your 
[gauge] ERR! network  proxy configuration 

[gauge] ERR! A complete log of this error can be found in:
[gauge] ERR!  ~/.gauge/logs/timestamp_debug.log

[gauge] Get Support -
[gauge]	Docs:          https://docs.gauge.org/faq/network
[gauge]	Bugs:          https://github.com/getgauge/gauge/issues
[gauge]	Chat:          https://spectrum.chat/gauge

[gauge] Your Environment Information -
[gauge]	darwin, 1.0.7
[gauge]	html-report (4.0.9), python (0.3.7), screenshot (0.0.1), spectacle (0.1.3)

Summarise clearly

[gauge] ERR! Could not download and install 'js' plugin

Prefix, the line with [gauge] to indicate that it is an error message from Gauge. ERR! indicates the error level after which the clear and relevant error is displayed. This prefix is only required for errors and warnings.

Use error codes and categories

[gauge] ERR! code ENOTFOUND
[gauge] ERR! network Request to https://download.gauge.org/js-install.json failed
...

Break down the error and display a code. The code can be from root api call, in this case a call to http.get

The error is clearly categorised as a network error.

Point to the error logs

[gauge] ERR! A complete log of this error can be found in:
[gauge] ERR!  ~/.gauge/logs/network/timestamp_debug.log

Dump a detailed debug log (Only when there is an error) in a separate log file specific for that run. This way the user does not have to sort through all the logs.

Contextual links

	Docs:          https://docs.gauge.org/faq/network

Point to the category of the error.

@zabil zabil added this to the Installation debug milestone Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.