-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Navigator.pushAndRemoveUntil throws exception in Bugsnag (#242)
* Navigator.pushAndRemoveUntil throws exception in Bugsnag #238 * Updated changelog * Extended the solution to other cases * Fixed an issue * Fixed an issue * Fixed metadata handling on Android * Apply suggestions from code review Co-authored-by: Jason <[email protected]> * Changes requested in code review * Added E2E tests --------- Co-authored-by: Robert <[email protected]> Co-authored-by: Jason <[email protected]>
- Loading branch information
1 parent
d7c6d59
commit faa15d0
Showing
6 changed files
with
79 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
features/fixtures/app/lib/scenarios/null_context_scenario.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:bugsnag_flutter/bugsnag_flutter.dart'; | ||
import 'scenario.dart'; | ||
|
||
class NullContextScenario extends Scenario { | ||
@override | ||
Future<void> run() async { | ||
await bugsnag.start(endpoints: endpoints); | ||
await bugsnag.setContext(null); | ||
await bugsnag.notify(Exception(), null); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
features/fixtures/app/lib/scenarios/null_user_scenario.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:bugsnag_flutter/bugsnag_flutter.dart'; | ||
import 'scenario.dart'; | ||
|
||
class NullUserScenario extends Scenario { | ||
@override | ||
Future<void> run() async { | ||
await bugsnag.start(endpoints: endpoints); | ||
await bugsnag.setUser(id: null, email: null, name: null); | ||
await bugsnag.notify(Exception(), null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Feature: nullParameters | ||
|
||
Scenario: Context is set to null | ||
When I run "NullContextScenario" | ||
Then I wait to receive an error | ||
And the error is valid for the error reporting API version "4.0" for the "Flutter Bugsnag Notifier" notifier | ||
And the exception "errorClass" equals "_Exception" | ||
And the event "severity" equals "warning" | ||
|
||
Scenario: User is set to null | ||
When I run "NullUserScenario" | ||
Then I wait to receive an error | ||
And the error is valid for the error reporting API version "4.0" for the "Flutter Bugsnag Notifier" notifier | ||
And the exception "errorClass" equals "_Exception" | ||
And the event "severity" equals "warning" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters