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

iOS context not being attached #1437

Closed
davidhsoftware opened this issue May 11, 2023 · 7 comments
Closed

iOS context not being attached #1437

davidhsoftware opened this issue May 11, 2023 · 7 comments

Comments

@davidhsoftware
Copy link

davidhsoftware commented May 11, 2023

Platform

Flutter Mobile

Obfuscation

Disabled

Debug Info

Disabled

Doctor

Dart 3.0.0
Flutter (Channel stable, 3.10.0, on macOS 12.6 21G115 darwin-arm64, locale en-AU)

Version

7.5.2

Steps to Reproduce

  1. Run Sentry.captureException() on an iPhone 8 running the specified versions

Expected Result

See iOS context attached in Sentry

Actual Result

iOS context not attached in Sentry

factory Contexts.fromJson(Map<String, dynamic> data) runs SentryDevice.fromJson(Map.from(data[SentryDevice.type])) which breaks on type 'int' is not a subtype of type 'double?'

It looks like data["device"]["screen_height_pixels"] and data["device"]["screen_width_pixels"] are double, being assigned to SentryDevice.screenHeightPixels and SentryDevice.screenWidthPixels which are int?

Edit: these are indeed already casted, will update when I have access to the stack trace

Are you willing to submit a PR?

None

@marandaneto
Copy link
Contributor

@davidhsoftware can you copy and paste the error? the full stack trace?
The code already cast it to ?.toInt() so this should not be an issue, I can't reproduce it locally.

@kuhnroyal
Copy link
Contributor

Maybe related to #1432 which is the same error message?

@ueman
Copy link
Collaborator

ueman commented May 11, 2023

Yeah, but this one is talking about the screen resolution.

@kuhnroyal
Copy link
Contributor

It looks like ...

@davidhsoftware Is this on iOS 16.4 and do you have a stacktrace?

@davidhsoftware
Copy link
Author

davidhsoftware commented May 11, 2023

Hi @kuhnroyal @marandaneto

I will send the stack trace and iOS version as soon as I am able (in ~13 hours). Thanks!

@marandaneto
Copy link
Contributor

@ueman the screen resolution already had this issue in the past, and there are tests about that.

@davidhsoftware
Copy link
Author

Apologies for the misleading guess, this was the same as the batteryLevel conversion issue in #1432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants