Skip to content

Add native stacktrace field for PlatformException#63502

Merged
lidongze91 merged 14 commits intoflutter:masterfrom
lidongze91:crash_report
Aug 13, 2020
Merged

Add native stacktrace field for PlatformException#63502
lidongze91 merged 14 commits intoflutter:masterfrom
lidongze91:crash_report

Conversation

@lidongze91
Copy link
Contributor

Description

Exposing an extra field for native stacktrace from PlatformException. This change would follow by further changes on Flutter Engine to give back native stacktrace information for both iOS&Android. This is essential for crash reporting, currently our client can only see the error message Instance of 'PlatformException' if the crash is coming from native platform.

Related Issues

b/158148913

Checklist

Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Aug 11, 2020
@lidongze91 lidongze91 marked this pull request as draft August 11, 2020 17:28
@lidongze91 lidongze91 requested a review from cyanglaz August 11, 2020 20:06
@lidongze91
Copy link
Contributor Author

Not sure why presubmits failed previously though. Is it possibly because of the failing flutter build?

@lidongze91 lidongze91 marked this pull request as ready for review August 11, 2020 20:08
Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM

@lidongze91 lidongze91 merged commit c67eafa into flutter:master Aug 13, 2020
jonahwilliams pushed a commit that referenced this pull request Aug 13, 2020
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
* Add native stacktrace field for PlatformException

* Mute the readValue check for stacktrace.

* polish

* Add unit test and further polish

* Added more comments

* remove unnecessary import

* fill in stacktrace to JSONMethodCodec and fix tests

* fix style

* Fix format

* Remove unnecessary TODO since not all explicitly declared errors have stacktrace in it from native side.

* Handle case for exception without stacktrace on jsonMethodCodec

* Add more unit tests

* format test

Co-authored-by: Ben Li <libe@google.com>
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants