Heuristic crash

تم تعديل László Tóth منذ 6 سنوات من الدقائق. Junior Member المشاركات: 36 تاريخ الإنضمام: 9‏/5‏/19 المشاركات الحديثة
Hi!
I use screenlets (usually AssetListScreenlet or WebContentDisplayScreenlet) to display contents, but sometimes it's crashing with this error:
java.lang.IllegalMonitorStateException:
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease (ReentrantLock.java:152)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release (AbstractQueuedSynchronizer.java:1285)
at java.util.concurrent.locks.ReentrantLock.unlock (ReentrantLock.java:458)
at com.liferay.mobile.android.auth.refresh.OAuth2AuthenticationRefreshHandler$1.onFailure (OAuth2AuthenticationRefreshHandler.java:45)
at com.liferay.mobile.android.auth.oauth2.TokenRequester$1.onResponse (TokenRequester.java:101)
at com.squareup.okhttp.Call$AsyncCall.execute (Call.java:177)
at com.squareup.okhttp.internal.NamedRunnable.run (NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:764)


Why get this error?How can I prevent/catch this crash?
Thank you!
thumbnail
تم تعديل Victor Galan منذ 6 سنوات من الدقائق. Regular Member المشاركات: 144 تاريخ الإنضمام: 14‏/6‏/16 المشاركات الحديثة
Hey, this should be fixed with the 7.2.2 version of the liferay-mobile-sdk-core
تم تعديل László Tóth منذ 6 سنوات من الدقائق. Junior Member المشاركات: 36 تاريخ الإنضمام: 9‏/5‏/19 المشاركات الحديثة
I've modified the dependency to the 7.2.2., but the the error is still coming! 
تم تعديل László Tóth منذ 6 سنوات من الدقائق. Junior Member المشاركات: 36 تاريخ الإنضمام: 9‏/5‏/19 المشاركات الحديثة
Now is coming the below exception.... it's not the same, but similar
java.lang.IllegalMonitorStateException:
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease (ReentrantLock.java:152)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release (AbstractQueuedSynchronizer.java:1285)
at java.util.concurrent.locks.ReentrantLock.unlock (ReentrantLock.java:458)
at com.liferay.mobile.android.auth.refresh.OAuth2AuthenticationRefreshHandler$1.onFailure (OAuth2AuthenticationRefreshHandler.java:45)
at com.liferay.mobile.android.auth.oauth2.TokenRequester$1.onFailure (TokenRequester.java:93)
at com.squareup.okhttp.Call$AsyncCall.execute (Call.java:185)
at com.squareup.okhttp.internal.NamedRunnable.run (NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:764)
thumbnail
تم تعديل Victor Galan منذ 6 سنوات من الدقائق. Regular Member المشاركات: 144 تاريخ الإنضمام: 14‏/6‏/16 المشاركات الحديثة
Hey,Are you using liferay-screens in the same project?  I think it is using a past version imported for liferay-screensCan you check the version used executing
./gradlew app:dependencies 
app is the name of the gradle project, yours can be different
I hope it helps emoticon
تم تعديل László Tóth منذ 6 سنوات من الدقائق. Junior Member المشاركات: 36 تاريخ الإنضمام: 9‏/5‏/19 المشاركات الحديثة
The relevant dependencies
+--- com.liferay.mobile:liferay-material-viewset:4.0.1@aar
+--- com.liferay.mobile:liferay-screens:5.0.3@aar
+--- com.liferay.mobile:liferay-push:1.2.1@aar
+--- com.liferay.mobile:liferay-android-sdk:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v62:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v7:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v71:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v72:7.2.2@aar
+--- com.liferay.mobile:liferay-android-sdk-core:7.2.2@aar
thumbnail
تم تعديل Victor Galan منذ 6 سنوات من الدقائق. Regular Member المشاركات: 144 تاريخ الإنضمام: 14‏/6‏/16 المشاركات الحديثة
HeyIf you have the 7.2.2 version it shouldn't be possible to get that error because we didn't even use a reentrantLock in that class, can you check in your project the class OAuth2AuthenticationRefreshHandler and let me know if this is using the lock?
Thanks 
تم تعديل László Tóth منذ 6 سنوات من الدقائق. Junior Member المشاركات: 36 تاريخ الإنضمام: 9‏/5‏/19 المشاركات الحديثة
As you've seen above, I use 7.2.2. I'd like to believe that it shouldn't be possible, but this error is created by endusers mobile.  After refreshing to 7.2.2, the error occurrence is less than before in 7.2.1.I don't know how can I check client's lock.I trying to refresh the application one more time.
تم تعديل László Tóth منذ 6 سنوات من الدقائق. Junior Member المشاركات: 36 تاريخ الإنضمام: 9‏/5‏/19 المشاركات الحديثة
I inspected the apps logs, on newer version it runs good... no error.Thank you!