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

The callback initWithAccessToken() exists in module RNTwilioVoice #103

Closed
rochapablo opened this issue Oct 17, 2018 · 5 comments
Closed

Comments

@rochapablo
Copy link

rochapablo commented Oct 17, 2018

For some reason, only after the first build when I open the app, I get the follow error; after that it all run normally.

10-17 08:26:33.303 5164-5253/ D/RNTwilioVoice: initWithAccessToken ACTION_FCM_TOKEN
    Registering with FCM
10-17 08:26:33.313 5164-5252/ E/ReactNativeJS: The callback initWithAccessToken() exists in module RNTwilioVoice, but only one callback may be registered to a function in a native module.
10-17 08:26:33.323 5164-5253/ E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: , PID: 5164
    com.facebook.react.common.JavascriptException: The callback initWithAccessToken() exists in module RNTwilioVoice, but only one callback may be registered to a function in a native module., stack:
    __invokeCallback@2034:20
    <unknown>@1844:31
    __guard@1982:11
    invokeCallbackAndReturnFlushedQueue@1843:20
    
        at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:56)
        at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:40)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:363)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
        at android.os.Looper.loop(Looper.java:148)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
        at java.lang.Thread.run(Thread.java:818)

Any idea what that could be?

Testing on Device

"react": "16.0.0-alpha.12"
"react-native": "^0.48.4"
"react-native-twilio-programmable-voice": "v3.21.0"
@fabriziomoscon
Copy link
Collaborator

I can reproduce this error and I am looking for a fix.

@codingwaysarg
Copy link

Hi! Any news about this issue? Thanks

@codingwaysarg
Copy link

I've created PR #109, there was a missing return after promise.reject, and then reaching a promise.resolve, resulting in callback called twice.

@mateodaza
Copy link

I solved this issue by setting android microphone permissions first

@jdegger
Copy link
Collaborator

jdegger commented Oct 27, 2020

This issue seems to be solved right now.

Since a long time has passed I will be closing this issue. Read our repository update in #158. I invite you to reopen this issue when you still have problems so we can debug the problems together.

@jdegger jdegger closed this as completed Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants