sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Clean `Library` cache when updating the SDK

Open bitsandfoxes opened this issue 4 months ago • 1 comments

We keep running into issue when users update the SDK with the build cache not invalidating the build cache. This most often causes issues with the Android native SDK not getting updated properly causing errors like

2024/10/14 14:35:11.465 11495 11708 Error Unity Sentry: Error during JNI execution: UnityEngine.AndroidJavaException: java.lang.NoSuchMethodError: no static method with name='setUser' signature='()V' in class Ljava.lang.Object;
2024/10/14 14:35:11.465 11495 11708 Error Unity   at UnityEngine._AndroidJNIHelper.GetMethodID (System.IntPtr jclass, System.String methodName, System.String signature, System.Boolean isStatic) [0x00000] in <00000000000000000000000000000000>:0 
2024/10/14 14:35:11.465 11495 11708 Error Unity   at UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0 
2024/10/14 14:35:11.465 11495 11708 Error Unity   at Sentry.Unity.Android.AndroidJavaScopeObserver.<UnsetUserImpl>b__8_0 () [0x00000] in <00000000000000000000000000000000>:0 
2024/10/14 14:35:11.465 11495 11708 Error Unity   at Sentry.Unity.Android.JniExecutor.DoWork () [0x00000] in <00000000000000000000000000000000>:0 
2024/10/14 14:35:11.465 11495 11708 Error Unity   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
2024/10/14 14:35:11.465 11495 11708 Error Unity  #0 0x77c1a3b10c (libu

The current workaround is to delete the Library folder and recreating it.

bitsandfoxes avatar Oct 15 '24 14:10 bitsandfoxes