-
Notifications
You must be signed in to change notification settings - Fork 873
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
feat: handle errors better #697
Conversation
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc ipfs/ipfs-webui#774 (Opt-in error reporting and anonymous usage reporting)
I really like like the "opt-in" for creating github issue with error pre-filled, extremely useful!
It is a last resort, but at least gives the next step to the user and shows we care about improving 👍
Small asks in comments inline below.
src/index.js
Outdated
buttons: [ | ||
'Close', | ||
'Open logs', | ||
'Create a new issue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The label could be more inviting and explicit on what will happen on click:
'Create a new issue' | |
'Help us fixing it by creating a new issue with error details' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only regards I have here is that it is the name of a button. We are lucky they're big on Windows, but I have no clue how they'll look around the other OSes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-Authored-By: hacdias <hacdias@gmail.com>
A proposal for a more human friendly error message The idea here is to
Of note, the github report thing is cool, but if you are not a github user and signed in, you'll be hit with a log-in / sign-up prompt, so we may want to let the user know that requirement before sending them off to report the error... |
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
**Specifications** | ||
|
||
- **OS**: ${process.platform} | ||
- **IPFS Desktop Version**: ${app.getVersion()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something of note, app.getVersion
returns electron version instead of one from package.json
field:
It seems to be a known issue (electron/electron#7085) when running development version from a subdirectory (./src/
) and should be fine in release build (which uses ./
), but would be good to fix it in dev in case someone builds it by hand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lidel building by hand, i.e., npm run build
will give you the correct value. Only if you run it directly with npm start
you'll be given Electron's version. We could though read package.json file directly. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lidel I'm merging this now. We can take a look at that detail later.
If an error occurs while Electron is getting ready, we just show up a dialog telling that. There isn't much we can do. On the other hand, if the error happens during the execution of IPFS Desktop itself, we will have this error message:
The first option clearly opens the logs directory. The second option opens an URL to an issue pre-filled with the details of the error, like this:
This was something we didn't have in the last version, but we need to improve a lot: error handling! This will catch any major errors that might not be caught in other parts of the app.
License: MIT
Signed-off-by: Henrique Dias hacdias@gmail.com