Skip to content

Conversation

@radumg
Copy link
Collaborator

@radumg radumg commented Oct 5, 2018

Purpose

Fixes #5909 by pre-filling the new Github issue page with

  • an appropriate title that includes Dynamo version number : Crash report from Dynamo 2.0.1
  • issue body filled with the crash details text, displayed in the CrashPrompt window bottom text box

Currently pressing Submit to Github takes you here :

image

With the new behaviour, pressing Submit to Github takes you here :

image

In the above image, the This is the error text body would be replaced by the actual details of the crash stack trace, as per original screenshot in #5909 .

I can't seem to be able to make Dynamo crash on purpose right now (funny how that works...), so dunno how to replicate.

Other notes

  • sends users to https://github.com/DynamoDS/Dynamo/issues/new by default when no crash text is supplied (friendlier than sending to the super-busy all issues page)
  • as per current implementation, you still need to be logged in to Github to be able to submit the issue

Further improvements

We could add the rest of the current issue template text to the body and wrap the crash dump inside a nice code block, but I'm afraid that'd make the query string way too long. Open to ideas/suggestions ?

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@Racel

FYIs

@andydandy74 , @johnpierson

radumg added 3 commits October 5, 2018 20:01
you want to make it easy for users to report the issue, not take them to a page where they stare at a wall of 600 unsolved issues and having to figure out HOW to open/submit a new one
@radumg radumg mentioned this pull request Oct 5, 2018
@mjkkirschner
Copy link
Member

This is great, we were just talking about this -additionally would be great to add:

  • dynamo version number
  • dynamoRevit version number
  • packages
  • dyn/dyf dependencies if the user wants them to be uploaded...

just things we have discussed, not that all that needs to go in this PR.

🎉

@radumg
Copy link
Collaborator Author

radumg commented Oct 5, 2018

Thanks @mjkkirschner !

Dynamo version number is actually included in the issue title.

The rest could also be added to body of issue, my only concern is how feasible it is to use the simple url query params mechanism i'm using here to add that much info - haven't stress-tested it yet 💪

@andydandy74
Copy link
Contributor

Looks like 2kB of data is safe:
https://stackoverflow.com/questions/2659952/maximum-length-of-http-get-request

@alfarok
Copy link
Contributor

alfarok commented Oct 26, 2018

Hey @radumg I just made sure this is in the backlog to get reviewed next sprint. It would be a nice improvement!

// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("2.0.2.6067")]
[assembly: AssemblyFileVersion("2.0.2.6426")]
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes don't need to be committed and can be excluded

Copy link
Collaborator Author

@radumg radumg Oct 30, 2018

Choose a reason for hiding this comment

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

i'm not doing anything on purpose here (include or exclude) - do you mean I should manually exclude (not commit) them ? Feels like there should be something in .gitignore for it or an action step on build ?

// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this update required? Are there any other repercussions to updating?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is due to my VisualStudio 2017, i'll revert to be on the safe side.

</data>
<data name="PackagePathAutoAddNotificationShortDescription" xml:space="preserve">
<value>A library (*.dll, *.ds) was recently imported into Dynamo. Its path was automatically added to "Settings > Manage Node and Package Paths..."</value>
<value>A library (*.dll, *.ds) was recently imported into Dynamo. Its path was automatically added to "Settings &gt; Manage Node and Package Paths..."</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this change required?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Visual Studio 2017 did this one, i can revert it.

@alfarok
Copy link
Contributor

alfarok commented Oct 26, 2018

Took a quick peak, I just added a couple comments/questions but looks good. We will get it pulled next sprint for further testing.

@radumg
Copy link
Collaborator Author

radumg commented Oct 30, 2018

Thanks @alfarok for the review, i'll fix up those issues now 👍

since we make a new Uri, it would never have any existing query parameters
@radumg
Copy link
Collaborator Author

radumg commented Oct 30, 2018

should be ready for review again @alfarok !

@alfarok
Copy link
Contributor

alfarok commented Oct 30, 2018

Thanks for the updates @radumg, looks good. We will run the changes on the self-serve CI and get some manual testing in the upcoming sprint. It may also be worth adding a unit test calling ReportABug (without actually forcing a crash) just to verify everything is operating as expected.

@radumg
Copy link
Collaborator Author

radumg commented Oct 30, 2018

Might get tricky/messy to detect a browser window opened correctly, but i could decompose the window launching & figuring out what to launch part, so we can unit test.

Or i could just check the return code (int) of Process.Start - which would be better suited you think ?

@alfarok
Copy link
Contributor

alfarok commented Nov 5, 2018

Hey @radumg, I don't think it will be super easy test the issue text body but what about verifying the window is open and has the correct window title. I would try to call ReportABug(), verify the process is running Process.GetProcesses(), and use Process.MainWindowTitle to verify the expected window exists in the running processes. Let me know if that makes sense or if you run into any issues.

@radumg
Copy link
Collaborator Author

radumg commented Nov 6, 2018

Yep, makes sense and i was thinking similar, so good to know that's all we'd need to check 👍
Now, because this launches user default browser, we have no way of knowing if it'll launch Chrome, IE, Firefox or Edge (or Opera for hipster users 😛). I'll look into it, though.

@alfarok
Copy link
Contributor

alfarok commented Nov 6, 2018

I think no matter which browser gets launched the main window title should be consistent, such as New Issue - DynamoDS/Dynamo but I am not positive on that with tabs etc. Thanks for looking into this. It would be really great if we could make the self-serve CI publicly accessible in the future to make testing easier for everyone. Maybe Microsoft will give us some additional new options!

@alfarok
Copy link
Contributor

alfarok commented Nov 8, 2018

Hey @radumg I just realized this PR is to RC2.0.2_master but it should be to master (2.1.0), no new features are currently going into 2.0.2. I just kicked off your branch on the self-serve CI to make sure all the existing tests are passing. I will also pull it down locally over the next couple days to do a little manual testing.

@radumg
Copy link
Collaborator Author

radumg commented Nov 8, 2018

thanks @alfarok , will rebase on master then.

@radumg radumg changed the base branch from RC2.0.2_master to master November 8, 2018 19:36
@radumg radumg changed the base branch from master to RC2.0.2_master November 8, 2018 19:36
@radumg
Copy link
Collaborator Author

radumg commented Nov 8, 2018

hmmm, changing base to master does not look quite ok, not sure which branch this should be based on then ?
image

I just picked the highest 2.0+ branch i found at the time 😁

@alfarok
Copy link
Contributor

alfarok commented Nov 8, 2018

@radumg That's because you are diffing your fork of RC2.0.2_master against Master. These 2 branches have quite a few difference so you are seeing all of them when comparing. There are a couple options but the easiest is probably to cherry-pick your commits to master on your fork and open a new PR. (Let me know if you have any questions on this)

I also have some good news and bad news. The good news is all the tests are passing with your changes. The bad news is that pressing the Submit to Github button seems to crash the crash? After clicking, everything closes including Dynamo with no further activity. Looks like an exception is being thrown:

image

Previously the Dynamo and crash windows would remain open while the browser was opened allowing the user to save upon pressing Continue. This makes that test even more important because we should be getting a failure if the behavior has regressed. Since the self-serve is passing it means we have no code coverage on this functionality ☹.

The crash I was using to test was reported by @andydandy74 recently. Load the Core_Math sample, select all the nodes, use node to code. I also tested on master and the previous implementation launches the browser as expected and Dynamo remains open.

@alfarok
Copy link
Contributor

alfarok commented Nov 8, 2018

It seems the issue is that Resources.CrashPromptGithubNewIssueTitle is returning null

@radumg
Copy link
Collaborator Author

radumg commented Nov 8, 2018

Great, thanks so much @alfarok ! I can test this now knowing a reproducible crash.
I'll cherry-pick to new PR if I can't rebase more cleanly.

@alfarok
Copy link
Contributor

alfarok commented Nov 26, 2018

Hey @radumg, just checking in to see if there are any updates here? The testing task in our last sprint closed so just let me know if this needs another look and I will make sure it gets into the following sprint.

@radumg
Copy link
Collaborator Author

radumg commented Nov 27, 2018

Hey Keith @alfarok , haven’t managed to look at it post-AU (backlog..😖) but will set some time aside on Friday and let you know how I get on 🙂

@radumg radumg mentioned this pull request Jan 9, 2019
7 tasks
@radumg
Copy link
Collaborator Author

radumg commented Jan 9, 2019

@alfarok , made a new PR

  • based on latest master branch
  • adds unit test
  • fixes null check

@radumg radumg closed this Jan 9, 2019
@radumg radumg deleted the 5909-Bug-reporting-UX branch January 9, 2019 12:57
@horatiubota horatiubota added the error/warning/crash Issues mentioning a Dynamo error, warning or crash message label Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

error/warning/crash Issues mentioning a Dynamo error, warning or crash message

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants