-
Notifications
You must be signed in to change notification settings - Fork 44
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
[Bug]: Module exports two methods to JavaScript with the same name: "setUserId" #163
Comments
@kareem-adel Hi, |
Hey @wfhm maybe this is caused by the new arch (fabric I guess)... I don't use this package but I have a similar log for another one
Seems somehow the I don't see anything suspicious here though |
I'm seeing a similar issue with the Iterable package. Have any of you found a fix? |
@connorpmullins I've looked at the history of that file and it seems that it was there since it was implemented... (by @RSNara in facebook/react-native@1f7daf9) so I guess this is a breaking change... and a big one cuz any sane person in java would use method overloads 😞 (but I guess it makes sense for cross communication between js and java... or they just assume packages use kotlin) My fix is a patch package (https://docs.sprig.com/discuss/667b2e307ac21e0018f77f68) for the specific reported package unifying the signatures and assuming the diff in the argument will be null. However I've gave up in using the new arch since its not supported by the bottom sheet package we're using. |
Thanks @Grohden - I'll pass this over to the new arch discussion group and see if anyone else is encountering similar issues. |
Hello @kareem-adel, @Grohden and @connorpmullins! We've fixed the issue with the newest release 6.1.32, please update the plugin in your apps and let us know if the issue persists. |
Documentation
Description
When enabling new architecture in android I'm getting in logcat:
Error: Exception in HostObject::get for prop 'Pushwoosh': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: Pushwoosh. Details: Module exports two methods to JavaScript with the same name: "setUserId"
Bug severity
High
Steps to Reproduce
Your Pushwoosh React Native Plugin version
6.1.30
Last worked Pushwoosh React Native Plugin version (if any)
No response
Affected platforms
Affected OS versions and/or devices
Pixel 3a API 34
Workaround
Commenting:
//@ReactMethod
//public void setUserId(String userId) {
// PushwooshInApp.getInstance().setUserId(userId);
//}
Relevant log output
Error: Exception in HostObject::get for prop 'Pushwoosh': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: Pushwoosh. Details: Module exports two methods to JavaScript with the same name: "setUserId"
The text was updated successfully, but these errors were encountered: