Skip to content

_TypeError - Battery Level - iOS 16.4 #1432

@PaoloTolentino

Description

@PaoloTolentino

Platform

Dart

Obfuscation

Enabled

Debug Info

Disabled

Doctor

[✓] Flutter (Channel stable, 3.7.12, on macOS 13.2.1 22D68 darwin-arm64, locale en-PH)
• Flutter version 3.7.12 on channel stable at /Users/solstella/fvm/versions/stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4d9e56e694 (3 weeks ago), 2023-04-17 21:47:46 -0400
• Engine revision 1a65d409c7
• Dart version 2.19.6
• DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/solstella/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.12.0

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.2)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.79.0-insider)
• VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
• Flutter extension version 3.63.20230303

[✓] Connected device (3 available)
• iPhone (2) (mobile) • ef913248aabd81890dd7e6787045ddfa9b1f08f3 • ios • iOS 16.4.1 20E252
• macOS (desktop) • macos • darwin-arm64 • macOS 13.2.1 22D68 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.92

[✓] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

Version

7.5.2

Steps to Reproduce

  1. Setup Sentry
  2. Run normally and start capturing exceptions

Expected Result

There should be no exceptions in parsing SentryDevice. Especially the batteryLevel

Actual Result

2023-05-10 13:24:09.867025+0800 Enstack Beta[4444:354698] [Sentry] [debug] [SentryFileManager:423] Writing to file: /var/mobile/Containers/Data/Application/782968EC-446B-42E8-A5DA-7E56BE461125/Library/Caches/io.sentry/98bd54bd3f1d2068e656ac1f0a7b6ee840a12f4f/envelopes/1683696249.866968-00091-9ADA1973-12C7-4443-B82A-BC1E71551F4F.json
[sentry] _TypeError (type 'int' is not a subtype of type 'double?')
[sentry] #0      new SentryDevice.fromJson
sentry_device.dart:181
#1      new Contexts.fromJson
contexts.dart:38
#2      _LoadContextsIntegrationEventProcessor.apply
load_contexts_integration.dart:51
#3      SentryClient._runEventProcessors
sentry_client.dart:416
#4      SentryClient.captureEvent
sentry_client.dart:90
#5      Hub.captureMessage

Are you willing to submit a PR?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions