Description
Before opening, please confirm:
- I have searched for duplicate or closed issues and discussions.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
React Native
Amplify APIs
Push Notifications, Authentication, DataStore, Analytics
Amplify Version
v6
Amplify Categories
notifications, auth, analytics, api
Backend
Amplify CLI
Environment information
# Put output below this line
System:
OS: macOS 15.4.1
CPU: (14) arm64 Apple M4 Pro
Memory: 102.92 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 23.3.0 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 11.2.0 - /opt/homebrew/bin/npm
Watchman: 2025.04.14.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 135.0.7049.97
Safari: 18.4
npmPackages:
@aws-amplify/react-native: ^1.1.9-rn-exports.6c340f8.0 => 1.1.9-unstable.74f34a8.0+74f34a8
@aws-amplify/rtn-push-notification: ^1.2.34-rn-exports.f28cd66.0 => 1.2.34-unstable.74f34a8.0+74f34a8
@aws-amplify/ui-react-native: ^2.5.1 => 2.5.1
@azure/core-asynciterator-polyfill: ^1.0.2 => 1.0.2
@babel/core: ^7.26.10 => 7.26.10
@babel/preset-env: ^7.26.9 => 7.26.9
@babel/runtime: ^7.27.0 => 7.27.0
@dr.pogodin/react-native-fs: ^2.32.1 => 2.32.1
@react-native-async-storage/async-storage: ^2.1.2 => 2.1.2
@react-native-community/cli: 18.0.0 => 18.0.0
@react-native-community/cli-platform-android: 18.0.0 => 18.0.0
@react-native-community/cli-platform-ios: 18.0.0 => 18.0.0
@react-native-community/netinfo: ^11.4.1 => 11.4.1
@react-native-documents/picker: ^10.1.2 => 10.1.2
@react-native-firebase/analytics: ^21.14.0 => 21.14.0
@react-native-firebase/app: ^21.14.0 => 21.14.0
@react-native/babel-preset: 0.79.1 => 0.79.1
@react-native/eslint-config: 0.79.1 => 0.79.1
@react-native/metro-config: 0.79.1 => 0.79.1
@react-native/typescript-config: 0.79.1 => 0.79.1
@react-navigation/drawer: ^7.3.9 => 7.3.9
@react-navigation/material-top-tabs: ^7.2.10 => 7.2.10
@react-navigation/native: ^7.1.6 => 7.1.6
@react-navigation/native-stack: ^7.3.10 => 7.3.10
@shopify/react-native-skia: ^1.12.4 => 1.12.4
@types/lodash: ^4.17.16 => 4.17.16
@types/react: ^19.0.0 => 19.1.2
@types/react-native-get-random-values: ^1.8.2 => 1.8.2
@types/react-test-renderer: ^19.0.0 => 19.1.0
@types/uuid: ^10.0.0 => 10.0.0 (9.0.8)
@wuba/react-native-echarts: ^2.0.3 => 2.0.3
aws-amplify: ^6.14.2 => 6.14.3
aws-amplify/adapter-core: undefined ()
aws-amplify/adapter-core/internals: undefined ()
aws-amplify/analytics: undefined ()
aws-amplify/analytics/kinesis: undefined ()
aws-amplify/analytics/kinesis-firehose: undefined ()
aws-amplify/analytics/personalize: undefined ()
aws-amplify/analytics/pinpoint: undefined ()
aws-amplify/api: undefined ()
aws-amplify/api/internals: undefined ()
aws-amplify/api/server: undefined ()
aws-amplify/auth: undefined ()
aws-amplify/auth/cognito: undefined ()
aws-amplify/auth/cognito/server: undefined ()
aws-amplify/auth/enable-oauth-listener: undefined ()
aws-amplify/auth/server: undefined ()
aws-amplify/data: undefined ()
aws-amplify/data/server: undefined ()
aws-amplify/datastore: undefined ()
aws-amplify/in-app-messaging: undefined ()
aws-amplify/in-app-messaging/pinpoint: undefined ()
aws-amplify/push-notifications: undefined ()
aws-amplify/push-notifications/pinpoint: undefined ()
aws-amplify/storage: undefined ()
aws-amplify/storage/s3: undefined ()
aws-amplify/storage/s3/server: undefined ()
aws-amplify/storage/server: undefined ()
aws-amplify/utils: undefined ()
babel-jest: ^29.7.0 => 29.7.0
currency-codes: ^2.2.0 => 2.2.0
date-fns: ^4.1.0 => 4.1.0
echarts: ^5.6.0 => 5.6.0
eslint: ^9.23.0 => 9.25.1
eslint-plugin-react: ^7.37.4 => 7.37.5
eslint-plugin-react-hooks: ^5.2.0 => 5.2.0 (4.6.2)
eslint-plugin-react-native: ^5.0.0 => 5.0.0 (4.1.0)
events: ^3.3.0 => 3.3.0
financial: ^0.2.4 => 0.2.4
jest: ^29.7.0 => 29.7.0
lodash: ^4.17.21 => 4.17.21
ofx-js: ^0.2.0 => 0.2.0
patch-package: ^8.0.0 => 8.0.0
plaid: ^32.0.0 => 32.0.0
prettier: 3.5.3 => 3.5.3
react: 19.0.0 => 19.0.0
react-native: ^0.79.1 => 0.79.1
react-native-calendars: ^1.1311.0 => 1.1311.0
react-native-element-dropdown: ^2.12.4 => 2.12.4
react-native-gesture-handler: ^2.25.0 => 2.25.0
react-native-get-random-values: ^1.11.0 => 1.11.0
react-native-keyboard-controller: ^1.17.1 => 1.17.1
react-native-linear-gradient: ^2.8.3 => 2.8.3
react-native-pager-view: ^6.7.1 => 6.7.1
react-native-paper: ^5.13.3 => 5.13.3
react-native-paper-dates: ^0.22.40 => 0.22.40
react-native-plaid-link-sdk: ^12.1.1 => 12.1.1
react-native-purchases: ^8.9.5 => 8.9.5
react-native-purchases-ui: ^8.9.5 => 8.9.5
react-native-reanimated: ^3.17.4 => 3.17.4
react-native-safe-area-context: ^5.4.0 => 5.4.0 (4.5.0)
react-native-screens: ^4.10.0 => 4.10.0
react-native-svg: ^15.11.2 => 15.11.2
react-native-tab-view: ^4.0.10 => 4.0.10
react-native-vector-icons: ^10.2.0 => 10.2.0
react-test-renderer: 19.0.0 => 19.0.0
timers: ^0.1.1 => 0.1.1
typescript: 5.8.2 => 5.8.2
use-immer: ^0.11.0 => 0.11.0
uuid: ^11.1.0 => 11.1.0 (9.0.1)
npmGlobalPackages:
corepack: 0.29.4
npm: 11.2.0
serve: 14.2.4
Describe the bug
When attempting to compile and run using npm run android
, I'm met with this error in Task :aws-amplify_rtn-push-notification:compileDebugKotlin
:
e: file:///Users/[my-project-path]/node_modules/@aws-amplify/rtn-push-notification/android/src/main/kotlin/com/amazonaws/amplify/rtnpushnotification/PushNotificationHeadlessTaskService.kt:17:5 'getTaskConfig' overrides nothing.
When I modify the offending file to match the signature found in packages/react-native/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt
by making intent: Intent
nullable (intent: Intent?
), my app compiles and runs.
Expected behavior
The Android app should compile and run without needing to modify @aws-amplify/rtn-push-notification
on the filesystem.
Reproduction steps
- Create React Native application using community CLI (not Expo).
npx @react-native-community/cli@latest init AwesomeProject
- Follow the instructions to initialize the project at https://docs.amplify.aws/gen1/react-native/start/project-setup/create-application/
- Follow the instructions to set up Android notifications at https://docs.amplify.aws/gen1/react-native/build-a-backend/push-notifications/set-up-push-notifications/
- Run the project using
npm run android
Code Snippet
File rtn-push-notification/android/src/main/kotlin/com/amazonaws/amplify/rtnpushnotification/PushNotificationHeadlessTaskService.kt
line 17 should go from this
override fun getTaskConfig(intent: Intent): HeadlessJsTaskConfig? {
to this
override fun getTaskConfig(intent: Intent?): HeadlessJsTaskConfig? {
Notice the addition of the nullable character ?
after type Intent
.
Log output
// Put your logs below this line
e: file:///Users/[my-project-path]/node_modules/@aws-amplify/rtn-push-notification/android/src/main/kotlin/com/amazonaws/amplify/rtnpushnotification/PushNotificationHeadlessTaskService.kt:17:5 'getTaskConfig' overrides nothing. FAILURE: Build failed with an exception.
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
The source for HeadlessJsTaskService
can be found here: https://github.com/facebook/react-native/blob/aa51fb4cac88baa0e09d4458ca7cd60e31e5dcce/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt#L56