Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue with background isolate when obfuscating Android APK / AppBundle #98475

@sarbagyastha

Description

@sarbagyastha

The background message arrives when obfuscate flag is not used. Seems like this is some kind of issue related to background isolate when obfuscating code.

Steps to Reproduce

  1. Clone the project from https://github.com/sarbagyastha/obfuscate
  2. Generate an APK with flutter build apk --release --verbose --obfuscate --split-debug-info=test/symbols
  3. Put the app in background.
  4. Grab the push token from console and send push notification with following payload:
{
    "data": {
        "title": "Test Title",
        "body": "Test Body",
        "type": "promotion"
    },
    "mutable_content": true,
    "content_available": true,
    "priority": "high",
    "registration_ids": [
        "<push-token>"
    ]
}

Expected results:
We should see a Push Message payload in console for the background message.

Actual results:
We see nothing but, these logs.
image

Flutter Doctor ```

[✓] Flutter (Channel stable, 2.10.1, on Ubuntu 21.10 5.13.0-28-generic, locale en_US.UTF-8)
• Flutter version 2.10.1 at ...
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision db747aa (5 days ago), 2022-02-09 13:57:35 -0600
• Engine revision ab46186
• Dart version 2.16.1
• DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at ...
• Platform android-Tiramisu, build-tools 32.1.0-rc1
• ANDROID_HOME = ...
• Java binary at:
6777.52.2113.8156070/jre/bin/java
• Java version OpenJDK Runtime Environment (build
11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.

Android Studio at ...
• Flutter plugin installed
• Dart plugin version 212.5632
• Java version OpenJDK Runtime Environment (build
11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.64.1)
• VS Code at /usr/share/code
• Flutter extension version 3.34.0

[✓] Connected device (2 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12
(API 32) (emulator)
• Chrome (web) • chrome • web-javascript • Google
Chrome 98.0.4758.80

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

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: buildBuilding flutter applications with the tooldependency: dartDart team may need to help usengineflutter/engine related. See also e: labels.found in release: 2.10Found to occur in 2.10found in release: 2.11Found to occur in 2.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyr: duplicateIssue is closed as a duplicate of an existing issuetoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions