Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

iOS: Illegal callback invocation from native module react native push notifications #23

Open
uniquecorn09 opened this issue Sep 28, 2020 · 0 comments

Comments

@uniquecorn09
Copy link

Hi!

Our team is trying to setup Push Notifications for ios & android devices.
Following the README instructions with the given code examples works totally fine for android and we're able to trigger notifications from backend to android frontend app. Unfortunately the same code (with further adaptions in XCode, like enable Background modes & Push Notifications) doesn't work for iOS, getting the following error(s):

This appears on the emulator (IPhone 11 / Swift Language Version: 5 / iOS 9.0):
Illegal callback invocation from native module react native push notifications

This appears in the React-Native Debugger Console:

Not Found. 
InitSuccess:  IBM cloud Push Notification init successful 
Illegal callback invocation from native module. This callback type only permits a single invocation from native code.
reactConsoleErrorHandler 
BugReporting extraData: Object 
Unable to symbolicate stack trace: The stack is null 
Register Error:  Error: didFailToRegisterForRemoteNotifications
    at Object.fn [as registerDevice] (NativeModules.js:99)
    at PushNotification.register (index.js:50)
    at _callee$ (VM5 checkInContainer.bundle:113)
    at tryCatch (runtime.js:45)
    at Generator.invoke [as _invoke] (runtime.js:274)
    at Generator.prototype.<computed> [as next] (runtime.js:97)
    at tryCatch (runtime.js:45)
    at invoke (runtime.js:135)
    at runtime.js:170
    at tryCallTwo (core.js:45)

Seems that there is a problem handling the callback from registration.

Initialization works fine with following parameters:

var initObj = {
    "appGUID": sessionData.pushAppGUID,
    "clientSecret": sessionData.pushClientSecret,
    "region": "eu-de"
}

Do you have any clues, how to fix this issue? Or what could be causing this?

Thank you in advance!

@uniquecorn09 uniquecorn09 changed the title Illegal callback invocation from native module react native push notifications iOS: Illegal callback invocation from native module react native push notifications Sep 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant