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

Show error dialog when MS crashes #1255

Open
thomas-senechal opened this issue Nov 7, 2023 · 3 comments
Open

Show error dialog when MS crashes #1255

thomas-senechal opened this issue Nov 7, 2023 · 3 comments

Comments

@thomas-senechal
Copy link
Member

Context
ATM, when Massa Station crashes, the user has nothing to know it. The only errors are in the logs, which are not easy to access and read for most users.

Opening a window showing the error when MS crashes would help users to know that MS crashed and what is the error so they can do some researches.

User flow

  • Massa Station crashes
  • User is prompted with a dialog showing the error message

How to

  • When MS crashes (should be represented as a Fatal in the logger), display a dialog with the error message

Technical details

QA testing

@thomas-senechal
Copy link
Member Author

I did some tries, here is what I found:

  • We can create a callback in the logger that will be called when Fatal is called. https://github.com/massalabs/station/blob/main/pkg/logger/global.go
    This would allow us to get back the error message
  • Fyne (the GUI we are using) requires to be in the main thread to open a new Window/App, which makes it impossible to open a new window/dialog from a routine
  • During a Fatal, MS closes before the dialog opens

@Thykof
Copy link
Contributor

Thykof commented Nov 10, 2023

maybe another solution would be to create another binary that we will execute in another process in the fatal callback?

@thomas-senechal
Copy link
Member Author

maybe another solution would be to create another binary that we will execute in another process in the fatal callback?

I thought about this solution, the issue is that we will need to build one for each platform, ship it, store it somewhere... So I feel like it's not the right thing to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants