Closed dginovker closed 1 year ago
Hi! Is there a C# script called UnityNativeShare.cs in your project? NativeShare.Share's native source code doesn't have a boolean which gets me confused: https://github.com/yasirkula/UnityNativeShare/blob/13ad5af7c378f6b47c0ec4ad34b55bce38883526/.github/AAR%20Source%20(Android)/java/com/yasirkula/unity/NativeShare.java#L40
Yup! I'm confused too. It seems like the boolean is further inside the AJC.CallStatic
's stacktrace.
(None of the parameters passed into CallStatic are null either)
Can I see the full stacktrace? Is there a C# script called UnityNativeShare.cs in your project?
I can't get the full stacktrace, I've been printing it out via a message dialog in my app since it isn't appearing in the logs lol.
I do not have a UnityNativeShare.cs
in my project. Should I?
I'm utmost confused since it works on development builds
Looks like we have additional obfuscation at play (BeeByte Obfuscator). Will update later with the config change needed to make it work, thanks for all your help and the package @yasirkula :hugs:
I Unity : UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
I Unity : UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
I Unity : UnityEngine.EventSystems.StandaloneInputModule:Process()
I Unity :
E Unity : Exception: No such proxy method: GOPHNOOANPB.HasManagedCallback()
E Unity :
E Unity :
E Unity : UnityEngine.AndroidJavaException: java.lang.NullPointerException: Expected to unbox a 'boolean' primitive type but was returned null
E Unity : at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0
E Unity : at UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0
E Unity : at DuckyShare.OnShareClick () [0x00000] in <00000000000000000000000000000000>:0
Ah, looks like it yeah. Good catch 😃
Solution is to add NativeShareNamespace.NSShareResultCallbackAndroid
to the SkipClasses of the Beebyte ObfuscatorOptions.asset
object
Description of the bug
Hello! Thanks for the package.
I've got an app using NativeShare and it works great both on
development
builds and all iOS builds. Unfortunately, on Android prod I'm getting the following exception:From this line here: https://github.com/yasirkula/UnityNativeShare/blob/master/Plugins/NativeShare/NativeShare.cs#L208
Reproduction steps
Very confused, here's what I'm doing
Platform specs
Please provide the following info if this is a Unity 3D repository.
Additional info
It was hard to figure out even an exception was being thrown but I'm mostly making this to keep track of my thoughts as I debug it