BranchMetrics / unity-branch-deep-linking-attribution

The Branch Unity SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/apps/unity/
MIT License
118 stars 24 forks source link

No such proxy method: UnityEngine.AndroidJavaRunnableProxy.run() in Unity 2017.1.0f3 #93

Closed dustinkerstein closed 5 years ago

dustinkerstein commented 7 years ago

As soon as I associate the Branch prefab (current commit) I start seeing this error when launching Unity. Note that this happens regardless of whether I call Branch.initSession or not.

08-21 10:20:50.503 7779-7779/? I/Unity: Exception: No such proxy method: UnityEngine.AndroidJavaRunnableProxy.run()
                                          at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0 
                                          at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, UnityEngine.AndroidJavaObject[] javaArgs) [0x00000] in <filename unknown>:0 
                                          at UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, IntPtr jmethodName, IntPtr jargs) [0x00000] in <filename unknown>:0 

                                        (Filename:  Line: -1)
08-21 10:20:50.622 7779-7823/? I/Unity: OnApplicationPause
08-21 10:20:59.413 8067-8136/? I/AppsFlyer_1.18: WARNING:checkPlatform Not Built using Unity 22.
dustinkerstein commented 7 years ago

Seems to be related to the Mono stripping level. If I set it to disabled or use IL2CPP this error goes away and Branch works fine.

antonargunov commented 7 years ago

Hi @dustinkerstein :

dustinkerstein commented 7 years ago

Unity 2017.1.0f3 and Mono + Strip Byte Code (and Strip Assemblies) produce this error.

antonargunov commented 7 years ago

thanks, let me check

antonargunov commented 7 years ago

Hi @dustinkerstein , sorry for delay. I checked Stripping Levels, and yes, we have that troubles with two stripping levels. As I understand, Unity3d cut some features for android native things. But I was able to use some stripping features. I hope, my info will be able to help you.

I use Unity 2017.1.0p4. I am able to use Mono + Use micro mscorelib, also IL2CPP + Strip Engine Code. For "Mono + Use micro mscorelib" I use link.xml <linker> <assembly fullname="UnityEngine"> <type fullname="UnityEngine.AndroidJavaRunnableProxy" preserve="all"/> </assembly> </linker>

dustinkerstein commented 7 years ago

Nice. Using that link.xml + Mono + Strip Byte Code works great. It appears micro mscorelib isn't available in 2017 though. Thanks!

Not sure if you want to fix this as a bug, or however, but I'll leave that to you.

antonargunov commented 7 years ago

It appears micro mscorelib isn't available in 2017 though

micro mscorelib added in 2017.1.0p3

Not sure if you want to fix this as a bug, or however, but I'll leave that to you.

I am working with that issue.

Nyankoo commented 6 years ago

@antonargunov I'm getting the same exception, but in Unity 5.6.5f1. Stripping level is already disabled!

Exception: No such proxy method: UnityEngine.AndroidJavaRunnableProxy.toString()
UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args)
UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, UnityEngine.AndroidJavaObject[] javaArgs)
UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, IntPtr jmethodName, IntPtr jargs)
Nyankoo commented 6 years ago

@antonargunov Any update in this?

csalmi-branch commented 5 years ago

@Nyankoo are you still experiencing this issue?

fankidark commented 5 years ago

@Nyankoo Exception: No such proxy method: UnityEngine.AndroidJavaRunnableProxy.toString() I'm getting the same problem in 5.6.1p3, Have you solve the problem yet?

antonargunov commented 5 years ago

@Nyankoo sorry for delay, try to move Branch android libs from folder Plugins/Branch/Android/libs in folder Plugins/Android.

csalmi-branch commented 5 years ago

@Nyankoo and @fankidark did moving the android libs help solve this issue for you?

csalmi-branch commented 5 years ago

Due to the age and inactivity of this issue, I am closing this now. If you are encountering this problem still, please reach out to our support team (support.branch.io) or open a new github issue and we would be happy to help you out!