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

Add crash report visualizer #2829

Merged
merged 2 commits into from
Jan 18, 2023
Merged

Add crash report visualizer #2829

merged 2 commits into from
Jan 18, 2023

Conversation

maxpatiiuk
Copy link
Member

@maxpatiiuk maxpatiiuk commented Jan 17, 2023

Fixes #2183

It will be available with each specify instance at the following URL: /specify/developer/crash-report-visualizer. It's loaded dynamically so including it in production instances does not pose a performance problem.
I decided to include it in Specify 7 rather than develop it separately as it allowed me to piggy back on Specify's front-end infrastructure and thus speed up the development by a lot (took just 2 hours to do this)

Features:

  • Visualizes the HTML snapshot of Specify 7 at the moment of the crash. The preview is resizable.
  • Can download the visualized crash report as an HTML page to be shared with someone else. The downloaded HTML page works offline and with no JavaScript. The downloaded HTML page also includes the original JSON crash report as a hidden <noscript> element in case you ever need to get back the original crash report. The only problem seems to be that the downloaded HTML page does not display the HTML snapshot and does not remember which sections were collapsed/expanded. If it's a big deal, can be fixed in the future. Didn't want to spend too much time on this as don't know how useful the feature would be.
  • Labels in the crash report are automatically converted to a more human-friendly form.
  • Crash report visualizer can handle any kind of JSON crash report (even if it came from an older or newer version of Specify or contains unknown keys or was edited by hand - as long as it's a valid JSON document)

@maxpatiiuk maxpatiiuk requested a review from a team January 17, 2023 02:34
@grantfitzsimmons
Copy link
Member

grantfitzsimmons commented Jan 17, 2023

  • Visualizes the HTML snapshot of Specify 7 at the moment of the crash. The preview is resizable.

Not really working for me. The entire HTML page is shown in a single line

Screen.Recording.2023-01-17.at.9.04.15.AM.mp4

Specify 7 Crash Report - 2023-01-17T15 02 26.065Z.txt

  • Can download the visualized crash report as an HTML page to be shared with someone else. The downloaded HTML page works offline and with no JavaScript. The downloaded HTML page also includes the original JSON crash report as a hidden <noscript> element in case you ever need to get back the original crash report. The only problem seems to be that the downloaded HTML page does not display the HTML snapshot and does not remember which sections were collapsed/expanded. If it's a big deal, can be fixed in the future. Didn't want to spend too much time on this as don't know how useful the feature would be.

I do not see any real use cases for this feature personally as I'd prefer the JSON output– it's a cool thing to support though. Maybe Mandi will use it!

image

  • Labels in the crash report are automatically converted to a more human-friendly form.

Very nice for us support people.

  • Crash report visualizer can handle any kind of JSON crash report (even if it came from an older or newer version of Specify or contains unknown keys or was edited by hand - as long as it's a valid JSON document)

I imported a variety from the support@ email. I had a list of screenshots uploaded and I lost my GitHub draft but this is a great tool!

@maxpatiiuk
Copy link
Member Author

@grantfitzsimmons the page should be displayed if you open the "Page HTML" section.

It's weird that it just displays as blank for you. Not able to replicate it (though happens for me if I open the downloaded HTML)
Does it happen just for this crash report?
Does it happen in another browser?
Are there errors in the console? (errors for an error lol)

@maxpatiiuk maxpatiiuk linked an issue Jan 17, 2023 that may be closed by this pull request
@maxpatiiuk
Copy link
Member Author

Grant confirmed that the issue only happens in Firefox. Opened #2834. Fixed. Needs testing

@chanulee1
Copy link
Contributor

Grant confirmed that the issue only happens in Firefox. Opened #2834. Fixed. Needs testing

Appears to be fixed. Crash visualizer displays in Firefox.

Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected

@maxpatiiuk maxpatiiuk merged commit 3016364 into production Jan 18, 2023
@maxpatiiuk maxpatiiuk deleted the issue-2183 branch January 18, 2023 01:24
@specifysoftware
Copy link

This pull request has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/specify-7-8-4-announcement/999/1

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

Successfully merging this pull request may close these issues.

Crash visualizer not displaying in Firefox Build a crash report visualizer
4 participants