question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[targetSdk 31 / Android 12] - Indirect notification activity start (trampoline) from <package-name> blocked

See original GitHub issue

(Accidental submit 🤦‍♂️ ) I’m facing an issue when displaying a local notification after receiving data-only message in the background (using react-native-firebase). For android 12 devices, the app is not brought to foreground when tapping on notification. I need to press the app-icon to launch the app. Once the app is opened, it receives the notification and internal navigation works correctly.

On checking the logs and researching a bit about Android 12 notification changes, found that this error is thrown when I click on the notification.

Indirect notification activity start (trampoline) from <package-name> blocked

Here’s a screenshot of the logcat: There’s another error with notifee.hideNotificationDrawer(); but that’s for another day(issue).

notifee-issue

Text file for your convienience

react-native info

System:
    OS: macOS 11.1
    CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
    Memory: 396.46 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
    Yarn: Not Found
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
    Watchman: 2021.11.15.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 25, 28, 29, 30, 31
      Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0
      System Images: android-30 | Google APIs Intel x86 Atom, android-31 | ARM 64 v8a, android-31 | Intel x86 Atom_64, android-31 | Google APIs Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7784292
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

package.json:

{
"dependencies": {
    "@notifee/react-native": "^4.0.0",
    "@react-native-async-storage/async-storage": "^1.15.4",
    "@react-native-community/art": "^1.2.0",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/clipboard": "^1.5.1",
    "@react-native-community/netinfo": "^6.0.0",
    "@react-native-firebase/app": "^13.0.1",
    "@react-native-firebase/crashlytics": "^13.0.1",
    "@react-native-firebase/messaging": "^13.0.1",
    "@react-native-masked-view/masked-view": "^0.2.6",
    "@react-navigation/native": "^5.1.5",
    "@twotalltotems/react-native-otp-input": "^1.3.11",
    "axios": "^0.19.2",
    "lodash": "^4.17.21",
    "react": "16.13.1",
    "react-native": "0.63.2",
    "react-native-drop-shadow": "^0.0.2",,
    "react-native-exit-app": "^1.1.0",
    "react-native-fast-image": "^8.3.4",
    "react-native-fs": "^2.17.0",
    "react-native-gesture-handler": "^1.5.0",
    "react-native-image-crop-picker": "^0.36.2",
    "react-native-keychain": "6.1.1",
    "react-native-linear-gradient": "^2.4.0",
    "react-native-modal": "^11.10.0",
    "react-native-paper": "^4.8.1",
    "react-native-permissions": "^3.0.3",
    "react-native-reanimated": "^2.1.0",
    "react-native-responsive-fontsize": "^0.5.0",
    "react-native-restart": "^0.0.22",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "^2.10.1",
    "react-native-vector-icons": "^8.1.0",
    "react-native-version-info": "^1.1.0",
    "react-native-video": "^2.3.1",
    "react-navigation": "^4.4.4",
    "reanimated-bottom-sheet": "*",
    "rn-fetch-blob": "^0.12.0",
    "validate.js": "0.13.1"
  }
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
nishanttatvacommented, Dec 1, 2021

Why not just paste the text in thinking ? This is a rich text environment 😃

Hate scrolling through huge error logs in issue comments 😛 , sorry about that.

You should have no problem with targetSdk30 / compileSdk31

Okay will try out this config and report back here.

2reactions
mikehardycommented, Dec 11, 2021

I think this needs to stay open, there is a workaround of using targetSdkVersion 30, but we will eventually (by Nov 1, 2022) need to support targetSdkVersion 31

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notification trampoline restrictions-Android12 | by Nav Singh
Starting with Android 12 notifications will not work if they do not start activities directly. What is a Notification trampoline? Some apps ...
Read more >
Behavior changes: Apps targeting Android 12
Compile your app to target Android 12 (API level 31) by targetSdkVersion . ... Indirect notification activity start (trampoline) from PACKAGE_NAME, ...
Read more >
android 12, how replace the notification trampolines
Having android sdk which intercept the push notification, and has been using notification trampoline to further open the end activity.
Read more >
One does not simply: migrating to Android 12 - Speaker Deck
A not so easy migration to support Android 12! ... notification) Indirect notification activity start (trampoline) from PACKAGE_NAME, ...
Read more >
Firebase Android SDK Release Notes - Google
Updated minSdkVersion to 19 to match Cloud Messaging minSdkVersion . ... This change is to comply with Android 12 notification trampoline restrictions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found