Skip to content

Context escape with ScopeCallback #921

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

Closed
marandaneto opened this issue Jul 4, 2022 · 0 comments · Fixed by #925
Closed

Context escape with ScopeCallback #921

marandaneto opened this issue Jul 4, 2022 · 0 comments · Fixed by #925
Assignees

Comments

@marandaneto
Copy link
Contributor

The callback typedef ScopeCallback = void Function(Scope);

Should be:

typedef ScopeCallback = FutureOr<void> Function(Scope);

Otherwise, there's a context scope because Scope has async methods but you can't await for configureScope.

void configureScope(ScopeCallback callback)

Should be:

FutureOr<void> configureScope(ScopeCallback callback)

Executions of the ScopeCallback? withScope should also be awaited otherwise the same problem happens.

Add changes to https://docs.sentry.io/platforms/dart/migration/#migrating-from-sentry-65x-to-sentry-66x

@denrase denrase changed the title Context scape with ScopeCallback Context escape with ScopeCallback Jul 4, 2022
@bruno-garcia bruno-garcia moved this to Needs Discussion in Mobile SDKs Jul 5, 2022
Repository owner moved this from Needs Discussion to Done in Mobile SDKs Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants