Skip to content

Android: PushNotifications.register() Kill the app => (E/Capacitor: Serious error executing plugin java.lang.reflect.InvocationTargetException) #514

@xavierarpa

Description

@xavierarpa

Bug Report

Plugin(s)

   **@capacitor/push-notifications@1.0.0**

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 3.1.1
  @capacitor/core: 3.1.1
  @capacitor/android: 3.1.1
  @capacitor/ios: 3.1.1

Installed Dependencies:

  @capacitor/cli: 3.1.1
  @capacitor/core: 3.1.1
  @capacitor/android: 3.1.1
  @capacitor/ios: 3.0.0

[success] Android looking great! 👌

Platform(s)

  • Android

Current Behavior

Each time when it do the check as expect and reach to the line PushNotification.register shows an error on the Android studio logcat (using the 'Run' app option with a USB mobile conection) and then close the app itself !

that occurs when it pass after PushNotifications.requestPermissions().then promise and checking if it is a 'granted' in the return response

Currently it was tested on this android devices:

  1. HUAWEI GRA-L09 (Close the App, tested in 'Run' app option and release)
  2. 5048Y_EEA (Close the App, tested in 'Run' app option and release)
  3. SM-G935F (First attemp 'stop working', the followings works right, tested only in release)

Expected Behavior

As the PushNotifications plugin works, it should start to do the request and then if is right to be registered (by the promise response with a 'granted' value) and next register it.

Other Technical Details

Possible details to know:

  • Using Visual Studio Code
  • npm: '6.14.13',
  • node: '14.17.1',
  • "capacitor-firebase-auth": "^3.0.0-rc.0",
  • "@capacitor/push-notifications": "^1.0.0",

Additional Context

the following images shows the Android studio logcat within 'HUAWEI GRA-L09' device:

Captura de pantalla 2021-07-11 a las 12 36 20

And this is the Plugin, why so many things appears Deprecated? am I missing a new version and if is it, how can I update it?:
Captura de pantalla 2021-07-11 a las 12 36 57

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions