Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Android, Cannot find symbol: PushNotificationPackage #14059

Open
3 tasks done
iboy15 opened this issue Dec 9, 2024 · 2 comments
Open
3 tasks done

React Native Android, Cannot find symbol: PushNotificationPackage #14059

iboy15 opened this issue Dec 9, 2024 · 2 comments
Labels
bug Something isn't working pending-community-response Issue is pending a response from the author or community. Push Notifications Related to Push Notification components React Native React Native related issue

Comments

@iboy15
Copy link

iboy15 commented Dec 9, 2024

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

Push Notifications

Amplify Version

v5

Amplify Categories

notifications

Backend

None

Environment information

# Put output below this line

 System:
    OS: macOS 14.3.1
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13500
    Memory: 9.19 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 3.6.4 - ~/Desktop/WORKS/IncytMobile/node_modules/.bin/yarn
    npm: 9.8.1 - /usr/local/bin/npm
    Watchman: 2024.11.25.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 131.0.6778.109
    Safari: 17.3.1
  npmPackages:
    @aws-amplify/rtn-push-notification: ~1.1.x => 1.1.14 
    @babel/core: ^7.20.0 => 7.26.0 
    @babel/plugin-proposal-export-namespace-from: ^7.18.9 => 7.18.9 
    @babel/preset-env: ^7.20.0 => 7.26.0 
    @babel/runtime: ^7.20.0 => 7.26.0 
    @bam.tech/react-native-image-resizer: ^3.0.5 => 3.0.11 
    @emotion/babel-plugin: 11.10.5 => 11.10.5 (11.13.5)
    @emotion/react: ^11.9.3 => 11.14.0 
    @gorhom/bottom-sheet: ^4.6.1 => 4.6.4 
    @hookform/resolvers: ^3.0.1 => 3.9.1 
    @hookform/resolvers/ajv:  1.0.0 
    @hookform/resolvers/arktype:  2.0.0 
    @hookform/resolvers/class-validator:  1.0.0 
    @hookform/resolvers/computed-types:  1.0.0 
    @hookform/resolvers/effect-ts:  1.0.0 
    @hookform/resolvers/fluentvalidation-ts:  1.0.0 
    @hookform/resolvers/io-ts:  1.0.0 
    @hookform/resolvers/joi:  1.0.0 
    @hookform/resolvers/nope:  1.0.0 
    @hookform/resolvers/superstruct:  1.0.0 
    @hookform/resolvers/typanion:  1.0.0 
    @hookform/resolvers/typebox:  1.0.0 
    @hookform/resolvers/typeschema:  1.0.0 
    @hookform/resolvers/valibot:  1.0.0 
    @hookform/resolvers/vest:  1.0.0 
    @hookform/resolvers/vine:  1.0.0 
    @hookform/resolvers/yup:  1.0.0 
    @hookform/resolvers/zod:  1.0.0 
    @likashefqet/react-native-image-zoom: ^3.0.0 => 3.0.0 
    @mapbox/geojson-extent: ^1.0.1 => 1.0.1 
    @miblanchard/react-native-slider: ^2.6.0 => 2.6.0 
    @react-native-async-storage/async-storage: ^2.1.0 => 2.1.0 
    @react-native-camera-roll/camera-roll: ^7.8.3 => 7.9.0 
    @react-native-clipboard/clipboard: ^1.11.1 => 1.15.0 
    @react-native-community/blur: ^4.3.2 => 4.4.1 
    @react-native-community/cli-platform-android: 12.3.3 => 12.3.3 (12.3.6, 13.6.9)
    @react-native-community/datetimepicker: ^7.6.2 => 7.7.0 
    @react-native-community/eslint-config: ^2.0.0 => 2.0.0 
    @react-native-community/netinfo: ^11.4.1 => 11.4.1 
    @react-native-community/slider: ^4.5.0 => 4.5.5 
    @react-native-community/toolbar-android: ^0.2.1 => 0.2.1 
    @react-native-masked-view/masked-view: ^0.3.0 => 0.3.2 (0.2.9)
    @react-native-picker/picker: ^2.5.1 => 2.10.2 
    @react-native-voice/voice: ^3.2.4 => 3.2.4 
    @react-native/babel-preset: 0.73.21 => 0.73.21 (0.74.87)
    @react-native/eslint-config: 0.73.2 => 0.73.2 
    @react-native/metro-config: 0.73.5 => 0.73.5 
    @react-native/typescript-config: 0.73.1 => 0.73.1 
    @react-navigation/bottom-tabs: ^6.3.1 => 6.6.1 
    @react-navigation/drawer: 6.4.2 => 6.4.2 
    @react-navigation/native: ^6.1.7 => 6.1.18 
    @react-navigation/native-stack: ^6.9.13 => 6.11.0 
    @react-navigation/stack: ^6.3.16 => 6.4.1 
    @reactivex/rxjs: ^6.6.7 => 6.6.7 
    @rnmapbox/maps: ^10.1.33 => 10.1.33 
    @sentry/react-native: ^5.23.1 => 5.36.0 
    @shopify/react-native-skia: ^0.1.239 => 0.1.241 
    @tmcw/togeojson: ^5.8.1 => 5.8.1 
    @trpc/client: ^9.27.2 => 9.27.4 
    @trpc/react: ^9.27.2 => 9.27.3 
    @trpc/server: ^9.27.2 => 9.27.4 
    @tsconfig/react-native: ^2.0.2 => 2.0.3 
    @turf/center: ^6.5.0 => 6.5.0 
    @turf/helpers: ^6.5.0 => 6.5.0 (7.1.0)
    @turf/midpoint: ^6.5.0 => 6.5.0 
    @turf/turf: ^6.5.0 => 6.5.0 
    @twotalltotems/react-native-otp-input: ^1.3.11 => 1.3.11 
    @types/d3: ^7.4.0 => 7.4.3 
    @types/lodash: ^4.14.152 => 4.17.13 
    @types/numeral: ^2.0.2 => 2.0.5 
    @types/preval.macro: ^3.0.0 => 3.0.2 
    @types/react: ^18.2.6 => 18.3.14 (19.0.1)
    @types/react-native: ^0.70.6 => 0.70.19 
    @types/react-native-vector-icons: ^6.4.5 => 6.4.18 
    @types/react-redux: ^7.1.9 => 7.1.34 
    @types/react-test-renderer: ^18.0.0 => 18.3.1 
    @types/redux-actions: ^2.6.1 => 2.6.5 
    @typescript-eslint/eslint-plugin: ^5.37.0 => 5.62.0 (3.10.1)
    @typescript-eslint/parser: ^5.37.0 => 5.62.0 (3.10.1)
    @viro-community/react-viro: ^2.41.1 => 2.41.1 
    HelloWorld:  0.0.1 
    add: ^2.0.6 => 2.0.6 
    aesjs: ^1.0.0 => 1.0.0 
    amazon-cognito-identity-js: ^6.3.12 => 6.3.14 
    amazon-cognito-identity-js/internals:  undefined ()
    appcenter: 4.4.5 => 4.4.5 
    appcenter-analytics: 4.4.5 => 4.4.5 
    appcenter-crashes: 4.4.5 => 4.4.5 
    aws-amplify: ^5 => 5.3.26 
    aws-sdk: ^2.1353.0 => 2.1692.0 
    axios: ^1.1.3 => 1.7.9 
    babel-jest: ^29.6.3 => 29.7.0 
    babel-plugin-macros: ^3.1.0 => 3.1.0 
    babel-plugin-module-resolver: ^5.0.0 => 5.0.2 
    buffer: ^6.0.3 => 6.0.3 (4.9.2, 5.7.1)
    chroma-js: ^2.4.2 => 2.6.0 
    core-js: ^3.30.2 => 3.39.0 (2.6.12)
    crypto-js: ^4.2.0 => 4.2.0 
    d3: ^7.9.0 => 7.9.0 
    d3-scale-chromatic: ^3.0.0 => 3.1.0 
    deprecated-react-native-prop-types: ^2.3.0 => 2.3.0 (5.0.0)
    dot-prop-immutable: ^2.1.0 => 2.1.1 
    enum: ^3.0.4 => 3.0.4 
    eslint: ^8.19.0 => 8.57.1 
    eslint-plugin-prettier: ^3.1.3 => 3.4.1 (3.1.2, 4.2.1)
    example:  0.0.1 
    fast-deep-equal: ^3.1.3 => 3.1.3 
    ffmpeg-kit-react-native: ^6.0.2 => 6.0.2 
    fluent-iterable: ^0.1.6 => 0.1.6 
    geocluster: ^0.1.1 => 0.1.3 
    immer: ^9.0.19 => 9.0.21 (9.0.6)
    immutability-helper: ^3.1.1 => 3.1.1 
    iter-ops: ^3.1.1 => 3.5.0 
    jest: ^29.6.3 => 29.7.0 
    js-base64: ^3.7.5 => 3.7.7 
    libphonenumber-js: ^1.10.36 => 1.11.16 
    libphonenumber-js/build:  undefined ()
    libphonenumber-js/core:  undefined ()
    libphonenumber-js/max:  undefined ()
    libphonenumber-js/max/metadata:  undefined ()
    libphonenumber-js/min:  undefined ()
    libphonenumber-js/min/metadata:  undefined ()
    libphonenumber-js/mobile:  undefined ()
    libphonenumber-js/mobile/examples:  undefined ()
    libphonenumber-js/mobile/metadata:  undefined ()
    lodash: ^4.17.21 => 4.17.21 
    lottie-react-native: ^5.1.6 => 5.1.6 
    luxon: ^3.4.4 => 3.5.0 
    manage-external-storage: ^0.1.3 => 0.1.3 
    mathjs: ^11.8.0 => 11.12.0 
    memoize-one: ^6.0.0 => 6.0.0 (5.2.1)
    metro-react-native-babel-preset: ^0.70.3 => 0.70.4 (0.72.3)
    metro-react-native-babel-transformer: 0.72.3 => 0.72.3 
    metro-resolver: 0.72.3 => 0.72.3 (0.80.12)
    moment: ^2.29.4 => 2.30.1 
    moment-duration-format: ^2.3.2 => 2.3.2 
    moment-timezone: ^0.5.38 => 0.5.46 
    native-base: ^2.15.2 => 2.15.2 
    newrelic-react-native-agent: ^1.4.7 => 1.4.7 
    numeral: ^2.0.6 => 2.0.6 
    patch-package: ^6.4.7 => 6.5.1 
    postinstall-postinstall: ^2.1.0 => 2.1.0 
    prettier: 2.8.8 => 2.8.8 (3.4.2)
    preval.macro: ^5.0.0 => 5.0.0 
    proj4: ^2.11.0 => 2.15.0 
    react: 18.2.0 => 18.2.0 (18.3.1, 16.13.1)
    react-hook-form: ^7.43.9 => 7.54.0 
    react-native: 0.73.6 => 0.73.6 
    react-native-animatable: ^1.3.3 => 1.4.0 (1.3.3)
    react-native-audio-recorder-player: ^3.6.10 => 3.6.12 
    react-native-ble-manager: ^11.5.5 => 11.5.7 
    react-native-ble-plx: ^3.2.1 => 3.2.1 
    react-native-bootsplash: ^5.4.1 => 5.5.3 
    react-native-buffer: ^6.0.3 => 6.0.3 
    react-native-button-toggle-group: ^1.1.2 => 1.1.2 
    react-native-camera: ^4.2.1 => 4.2.1 
    react-native-charts-wrapper: ^0.5.11 => 0.5.11 
    react-native-code-push: ^8.2.1 => 8.3.1 
    react-native-codegen: ^0.0.7 => 0.0.7 
    react-native-collapsible: ^1.6.1 => 1.6.2 
    react-native-compass-heading: ^1.0.2 => 1.5.0 
    react-native-config: ^1.4.11 => 1.5.3 
    react-native-country-picker-modal: ^2.0.0 => 2.0.0 
    react-native-create-thumbnail: ^2.0.0 => 2.0.1 
    react-native-device-info: ^10.3.0 => 10.14.0 
    react-native-document-picker: ^9.0.1 => 9.3.1 
    react-native-draggable-flatlist: ^4.0.1 => 4.0.1 
    react-native-dropdown-picker: ^5.4.6 => 5.4.6 
    react-native-emoji-selector: ^0.2.0 => 0.2.0 
    react-native-error-boundary: ^1.2.4 => 1.2.7 
    react-native-exception-handler: ^2.10.9 => 2.10.10 
    react-native-fast-collapsible: ^1.1.1 => 1.1.2 
    react-native-fast-image2: ^8.3.4 => 8.3.11 
    react-native-fs: ^2.20.0 => 2.20.0 
    react-native-geolocation-service: ^5.3.0-beta.4 => 5.3.1 
    react-native-gesture-handler: ^2.15.0 => 2.21.2 
    react-native-get-random-values: ^1.11.0 => 1.11.0 
    react-native-image-crop-picker: ^0.41.1 => 0.41.6 
    react-native-image-size: ^1.1.6 => 1.1.6 
    react-native-image-viewing: ^0.2.2 => 0.2.2 
    react-native-json-tree: ^1.3.0 => 1.3.0 
    react-native-keyboard-aware-scroll-view: ^0.9.5 => 0.9.5 
    react-native-keychain: ^8.1.2 => 8.2.0 
    react-native-loading-spinner-overlay: ^3.0.1 => 3.0.1 
    react-native-localize: ^2.2.4 => 2.2.6 
    react-native-markdown-display: ^7.0.0-alpha.2 => 7.0.2 
    react-native-mask-input: ^1.2.3 => 1.2.3 
    react-native-material-menu: ^2.0.0 => 2.0.0 
    react-native-modal: ^13.0.1 => 13.0.1 
    react-native-modal-datetime-picker: ^17.0.0 => 17.1.0 
    react-native-nested-listview: ^0.14.2 => 0.14.2 
    react-native-notifier: ^1.9.0 => 1.10.0 
    react-native-orientation-locker: ^1.5.0 => 1.7.0 
    react-native-outside-press: ^1.2.1 => 1.2.2 
    react-native-pager-view: ^6.2.2 => 6.6.1 
    react-native-pan-pinch-view: ^2.0.0 => 2.0.0 
    react-native-permissions: ^3.3.1 => 3.10.1 
    react-native-phone-input: ^1.3.4 => 1.3.7 
    react-native-popup-menu: ^0.16.1 => 0.16.1 
    react-native-progress: ^5.0.1 => 5.0.1 
    react-native-quick-base64: ^2.1.2 => 2.1.2 
    react-native-reanimated: ^3.7.1 => 3.16.3 
    react-native-reanimated-table: ^0.0.2 => 0.0.2 
    react-native-render-html: ^6.3.4 => 6.3.4 
    react-native-responsive-grid: ^0.41.993 => 0.41.993 
    react-native-responsive-screen: ^1.4.2 => 1.4.2 
    react-native-restart: ^0.0.24 => 0.0.24 
    react-native-safe-area-context: ^4.7.1 => 4.14.1 
    react-native-screens: ^3.22.1 => 3.35.0 
    react-native-select-dropdown: ^2.0.3 => 2.0.4 
    react-native-size-matters: ^0.4.0 => 0.4.2 
    react-native-sound: ^0.11.2 => 0.11.2 
    react-native-svg: ^13.8.0 => 13.14.1 
    react-native-svg-transformer: ^1.0.0 => 1.5.0 
    react-native-tab-view: ^3.5.2 => 3.5.2 
    react-native-text-link: ^1.0.0 => 1.0.1 
    react-native-timeline-flatlist: ^0.8.0 => 0.8.0 
    react-native-toast-message: ^2.1.8 => 2.2.1 
    react-native-typescript-transformer: ^1.2.13 => 1.2.13 
    react-native-url-polyfill: ^2.0.0 => 2.0.0 (1.3.0)
    react-native-uuid: ^2.0.1 => 2.0.3 
    react-native-vector-icons: ^10.0.1 => 10.2.0 (7.1.0)
    react-native-version: ^4.0.0 => 4.0.0 
    react-native-version-check: ^3.4.7 => 3.4.7 
    react-native-video: ^6.1.2 => 6.8.2 
    react-native-view-shot: ^3.8.0 => 3.8.0 
    react-native-waveview: ^1.1.0 => 1.1.0 
    react-native-webview: ^11.17.2 => 11.26.1 
    react-native-youtube-iframe: ^2.2.2 => 2.3.0 
    react-native-zip-archive: ^6.1.0 => 6.1.2 
    react-query: ^3.39.3 => 3.39.3 
    react-redux: ^8.0.5 => 8.1.3 
    react-test-renderer: 18.2.0 => 18.2.0 
    reactotron-react-native: ^5.0.2 => 5.1.10 
    redux-actions: ^2.6.5 => 2.6.5 
    redux-devtools-extension: ^2.13.8 => 2.13.9 
    redux-persist: ^6.0.0 => 6.0.0 
    redux-persist/integration/react:  undefined ()
    redux-saga: ^1.2.1 => 1.3.0 
    redux-saga/effects:  undefined ()
    reselect: ^4.1.7 => 4.1.8 
    responsive-screen:  0.1.0 
    responsive-screen-orientation-change:  0.1.0 
    responsive-screen-styled-components:  0.1.0 
    rn-fetch-blob: ^0.12.0 => 0.12.0 
    rn-tooltip: ^3.0.3 => 3.0.3 
    rxjs: ^7.8.1 => 7.8.1 (6.6.7)
    rxjs-compat:  6.6.6 
    rxjs/ajax:  undefined ()
    rxjs/fetch:  undefined ()
    rxjs/internal-compatibility:  undefined ()
    rxjs/operators:  undefined ()
    rxjs/testing:  undefined ()
    rxjs/webSocket:  undefined ()
    supercluster: ^7.1.5 => 7.1.5 
    superjson: ^1.12.2 => 1.13.3 
    ts-jest: ^25.4.0 => 25.5.1 
    typescript: 5.0.4 => 5.0.4 
    use-supercluster: ^0.4.0 => 0.4.0 
    utility-types: ^3.10.0 => 3.11.0 
    victory-native: ^34.3.0 => 34.3.0 
    xmldom: ^0.6.0 => 0.6.0 (0.5.0)
    yarn: ^1.22.19 => 1.22.22 
    zod: ^3.21.4 => 3.23.8 
    zustand: ^4.3.7 => 4.5.5 
  npmGlobalPackages:
    appcenter-cli: 3.0.0
    corepack: 0.19.0
    npm: 9.8.1
    yarn: 1.22.22</details>

Describe the bug

When trying to build the app, the following error is thrown:
Cannot find symbol: class PushNotificationPackage in PackageList.java.

Expected behavior

The app should build successfully without errors related to missing classes.

Reproduction steps

Steps to Reproduce
Install AWS Amplify v5 and @aws-amplify/rtn-push-notification.
Attempt to build the Android app using npx react-native run-android.
Observe the error in the build logs.

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line

> Task :app:compileDebugJavaWithJavac FAILED
/Users/iboyishak/Desktop/WORKS/IncytMobile/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:15: error: cannot find symbol
import com.amazonaws.amplify.pushnotification.PushNotificationPackage;
                                             ^
  symbol:   class PushNotificationPackage
  location: package com.amazonaws.amplify.pushnotification
/Users/iboyishak/Desktop/WORKS/IncytMobile/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:185: error: cannot find symbol
      new PushNotificationPackage(),
          ^
  symbol:   class PushNotificationPackage
  location: class PackageList
2 errors

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

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Dec 9, 2024
@chrisbonifacio chrisbonifacio added React Native React Native related issue Push Notifications Related to Push Notification components labels Dec 9, 2024
@HuiSF
Copy link
Member

HuiSF commented Dec 9, 2024

Hi @iboy15 thank you for reporting this issue. We will look into it.

In addition, I'm curious are you building a new app with Amplify JS v5? If so we recommend to use Amplify JS v6.

@HuiSF HuiSF added the bug Something isn't working label Dec 9, 2024
@github-actions github-actions bot removed pending-maintainer-response Issue is pending a response from the Amplify team. pending-triage Issue is pending triage labels Dec 9, 2024
@HuiSF
Copy link
Member

HuiSF commented Dec 11, 2024

Hi @iboy15 we've released aws-amplify@5.3.27 which should fix this build issue. Could you try to upgrade the package and verify. Thanks again for reporting this!

@HuiSF HuiSF added the pending-community-response Issue is pending a response from the author or community. label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending-community-response Issue is pending a response from the author or community. Push Notifications Related to Push Notification components React Native React Native related issue
Projects
None yet
Development

No branches or pull requests

3 participants