Skip to content

iOS 15 Flutter 2.10.3 got crash because of NSInternalInconsistencyException Invalid JSON message, decoding failed #100891

@BlakeWuh

Description

@BlakeWuh

Steps to Reproduce

  1. 100% of the users crashed when the app is in foreground.
  2. 100% of the users crashed on iOS 15.
  3. The crash got reported to Firebase console.
  4. I haven't found a way to reproduce it.

Expected results:

App should not crash.

Actual results:

Fatal Exception: NSInternalInconsistencyException
Invalid JSON message, decoding failed

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x990fc __exceptionPreprocess
1  libobjc.A.dylib                0x15d64 objc_exception_throw
2  Foundation                     0x1303ac _userInfoForFileAndLine
3  Flutter                        0x50ded4 (missing UUID be105c8b7c053a8ba51f83e291732357)
4  Flutter                        0x50e220 (missing UUID be105c8b7c053a8ba51f83e291732357)
5  Flutter                        0x50cff0 (missing UUID be105c8b7c053a8ba51f83e291732357)
6  Flutter                        0x41ce8 (missing UUID be105c8b7c053a8ba51f83e291732357)
7  Flutter                        0x3d3ca4 (missing UUID be105c8b7c053a8ba51f83e291732357)
8  Flutter                        0x2fbbf0 (missing UUID be105c8b7c053a8ba51f83e291732357)
9  Flutter                        0x2ff1bc (missing UUID be105c8b7c053a8ba51f83e291732357)
10 CoreFoundation                 0xae318 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
11 CoreFoundation                 0x32cf0 __CFRunLoopDoTimer
12 CoreFoundation                 0x2d4ec __CFRunLoopDoTimers
13 CoreFoundation                 0xbd08 __CFRunLoopRun
14 CoreFoundation                 0x1f468 CFRunLoopRunSpecific
15 GraphicsServices               0x138c GSEventRunModal
16 UIKitCore                      0x51a088 -[UIApplication _run]
17 UIKitCore                      0x298958 UIApplicationMain
18 Runner                         0x7ca8 main + 10 (main.swift:10)
19 ???                            0x105ca5aa4 (missing)
Code sample
Logs
Fatal Exception: NSInternalInconsistencyException
Invalid JSON message, decoding failed

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x990fc __exceptionPreprocess
1  libobjc.A.dylib                0x15d64 objc_exception_throw
2  Foundation                     0x1303ac _userInfoForFileAndLine
3  Flutter                        0x50ded4 (missing UUID be105c8b7c053a8ba51f83e291732357)
4  Flutter                        0x50e220 (missing UUID be105c8b7c053a8ba51f83e291732357)
5  Flutter                        0x50cff0 (missing UUID be105c8b7c053a8ba51f83e291732357)
6  Flutter                        0x41ce8 (missing UUID be105c8b7c053a8ba51f83e291732357)
7  Flutter                        0x3d3ca4 (missing UUID be105c8b7c053a8ba51f83e291732357)
8  Flutter                        0x2fbbf0 (missing UUID be105c8b7c053a8ba51f83e291732357)
9  Flutter                        0x2ff1bc (missing UUID be105c8b7c053a8ba51f83e291732357)
10 CoreFoundation                 0xae318 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
11 CoreFoundation                 0x32cf0 __CFRunLoopDoTimer
12 CoreFoundation                 0x2d4ec __CFRunLoopDoTimers
13 CoreFoundation                 0xbd08 __CFRunLoopRun
14 CoreFoundation                 0x1f468 CFRunLoopRunSpecific
15 GraphicsServices               0x138c GSEventRunModal
16 UIKitCore                      0x51a088 -[UIApplication _run]
17 UIKitCore                      0x298958 UIApplicationMain
18 Runner                         0x7ca8 main + 10 (main.swift:10)
19 ???                            0x105ca5aa4 (missing)
[✓] Flutter (Channel stable, 2.10.3, on macOS 11.6 20G165 darwin-arm, locale zh-Hans-CN)
    • Flutter version 2.10.3 at /Users/Shared/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (4 weeks ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/blake/Library/Android/sdk
    • Platform android-32, build-tools 32.0.0
    • ANDROID_HOME = /Users/blake/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

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

[✓] Android Studio (version 2020.3)
    • 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.10+0-b96-7249189)

[✓] VS Code (version 1.63.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 99.0.4844.83

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

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: productionIssues experienced in live production appsc: crashStack traces logged to the consolee: OS-version specificAffects only some versions of the relevant operating systemengineflutter/engine related. See also e: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions