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

FATAL EXCEPTION: mqt_native_modules #1566

Closed
1 task done
krunalray opened this issue Sep 23, 2023 · 3 comments
Closed
1 task done

FATAL EXCEPTION: mqt_native_modules #1566

krunalray opened this issue Sep 23, 2023 · 3 comments

Comments

@krunalray
Copy link

krunalray commented Sep 23, 2023

How can we help?

I migrate 4.3.6 to 5.0.0 and follow the Android SDK Setup instruction.

i used
"react-native": "0.64.0",

buildToolsVersion = "34"
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "23.1.7779620"
kotlin_version = '1.9.0'

when i build the release apk and start the app then suddenly it's crash and give me error
`FATAL EXCEPTION: mqt_native_modules

com.facebook.react.bridge.NativeArgumentsParseException: OneSignal.setLogLevel got 2 arguments, expected 1

FATAL EXCEPTION: mqt_native_modules
Process: com.student.project, PID: 9884
com.facebook.react.bridge.NativeArgumentsParseException: OneSignal.setLogLevel got 2 arguments, expected 1
at com.facebook.react.bridge.JavaMethodWrapper.invoke(Unknown Source:332)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(Unknown Source:21)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
at java.lang.Thread.run(Thread.java:1012)`

in debug mode i'm not getting any kind of error and working fine.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@skam22
Copy link

skam22 commented Oct 2, 2023

@krunalray as the error says, you're calling setlogLevel() with two arguments (version 4 syntax) instead of one argument (v5 syntax).

It should look like this:

import {OneSignal, LogLevel} from 'react-native-onesignal';
OneSignal.Debug.setLogLevel(LogLevel.Verbose);

@usamaabutt
Copy link

I am also getting this issue

@jennantilla
Copy link
Contributor

Thanks @skam22 for the help! @krunalray let us know if you are still having issues.

@usamaabutt I've responded to the other linked issue requesting more details.

I'm going to close out this issue since the original problem should already be addressed.

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

4 participants