Bookmarks section is properly opened
Crash
❗The crash when trying to access the History section occurs only on Beta 5.0.0-beta.1
❗ Not reproducible on Android >= 7
► Video

► Video

► Log Bookmarks
--------- beginning of crash
04-29 09:57:29.451 10802-10802/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.mozilla.fenix.beta, PID: 10802
java.lang.NoSuchMethodError: No virtual method putBoolean(Ljava/lang/Object;JZ)V in class Lsun/misc/Unsafe; or its super classes (declaration of 'sun.misc.Unsafe' appears in /system/framework/core-libart.jar)
at com.google.protobuf.UnsafeUtil$JvmMemoryAccessor.putBoolean(UnsafeUtil.java:1)
at com.google.protobuf.UnsafeUtil.putBoolean(UnsafeUtil.java:1)
at com.google.protobuf.MessageSchema.mergeFromHelper(MessageSchema.java:224)
at com.google.protobuf.MessageSchema.mergeFrom(MessageSchema.java:84)
at com.google.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:6)
at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:23)
at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:22)
at mozilla.appservices.places.MsgTypes$BookmarkNode.parseFrom(MsgTypes.java:13)
at mozilla.appservices.places.PlacesReaderConnection.getBookmarksTree(PlacesConnection.kt:11)
at mozilla.components.browser.storage.sync.PlacesBookmarksStorage$getTree$2.invokeSuspend(PlacesBookmarksStorage.kt:3)
at mozilla.components.browser.storage.sync.PlacesBookmarksStorage$getTree$2.invoke(PlacesBookmarksStorage.kt)
at kotlin.jvm.internal.Intrinsics.startUndispatchedOrReturn(Intrinsics.java:2)
at kotlin.jvm.internal.Intrinsics.withContext(Intrinsics.java:9)
at mozilla.components.browser.storage.sync.PlacesBookmarksStorage.getTree(PlacesBookmarksStorage.kt:1)
at kotlin.jvm.internal.Intrinsics.getTree$default(Intrinsics.java:1)
at org.mozilla.fenix.library.bookmarks.BookmarkFragment$loadInitialBookmarkFolder$1$currentRoot$1.invokeSuspend(BookmarkFragment.kt:6)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:19)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:14)
04-29 09:57:29.451 10802-10802/? D/AppTracker: App Event: crash
► Log History
--------- beginning of crash
04-29 12:15:40.335 21628-21721/? E/AndroidRuntime: FATAL EXCEPTION: arch_disk_io_2
Process: org.mozilla.fenix.beta, PID: 21628
java.lang.NoSuchMethodError: No virtual method putBoolean(Ljava/lang/Object;JZ)V in class Lsun/misc/Unsafe; or its super classes (declaration of 'sun.misc.Unsafe' appears in /system/framework/core-libart.jar)
at com.google.protobuf.UnsafeUtil$JvmMemoryAccessor.putBoolean(UnsafeUtil.java:1)
at com.google.protobuf.UnsafeUtil.putBoolean(UnsafeUtil.java:1)
at com.google.protobuf.MessageSchema.mergeFromHelper(MessageSchema.java:224)
at com.google.protobuf.MessageSchema.mergeFrom(MessageSchema.java:84)
at com.google.protobuf.CodedInputStreamReader.readMessage(CodedInputStreamReader.java:9)
at com.google.protobuf.CodedInputStreamReader.readMessageList(CodedInputStreamReader.java:2)
at com.google.protobuf.MessageSchema.readMessageList(MessageSchema.java:4)
at com.google.protobuf.MessageSchema.mergeFromHelper(MessageSchema.java:156)
at com.google.protobuf.MessageSchema.mergeFrom(MessageSchema.java:84)
at com.google.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:6)
at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:23)
at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:22)
at mozilla.appservices.places.MsgTypes$HistoryVisitInfos.parseFrom(MsgTypes.java:13)
at mozilla.appservices.places.PlacesReaderConnection.getVisitPage(PlacesConnection.kt:8)
at mozilla.components.browser.storage.sync.PlacesHistoryStorage$getVisitsPaginated$2.invokeSuspend(PlacesHistoryStorage.kt:7)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:19)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:14)
04-29 12:15:40.336 21628-21721/? E/AbstractTracker: Can't create handler inside thread that has not called Looper.prepare()
04-29 12:15:40.336 21628-21721/? D/AppTracker: App Event: crash
04-29 12:15:40.336 21628-21628/? D/AppTracker: App Event: stop
04-29 12:15:40.340 21628-21721/? E/AbstractTracker: mTrackerAsyncQueryHandler is null
Upon further investigation, the cause of this issue might be the version of the com.google.protobuf:protobuf-javalite plugin that is used in the application services, as indicated by https://github.com/protocolbuffers/protobuf/issues/6551 .
The version that is currently used is 3.9.2, and the issue that I mentioned is fixed in 3.10. However, it is mentioned that they (application services) are blocked from updating the version by another issue: https://github.com/protocolbuffers/protobuf/issues/7422, so this seems to be a recent regression from android-services.
I think it's worth mentioning that reverting the android component version changes that were made in https://github.com/mozilla-mobile/fenix/pull/10269 prevents these crashes from happening, as this issue occurs only on the most recent builds.
Upon further investigation, the cause of this issue might be the version of the com.google.protobuf:protobuf-javalite plugin that is used in the application services
CC @grigoryk, @eoger
I think it's worth mentioning that reverting the android component version changes that were made in #10269 prevents these crashes from happening, as this issue occurs only on the most recent builds.
- const val VERSION = "39.0.20200427130108"
+ const val VERSION = "40.0.20200428130031"
I don't see any AS dependency change in this range. 🤔
Not exact range, much larger: https://github.com/mozilla-mobile/android-components/compare/02c1759aa4af150be7fc4607d00ee0c76c14be28...master
The only remotely interesting change in that range is maybe the Glean update? But then again it doesn't look like Glean uses protobuf. At least not directly as a dependency (Just in case CC @Dexterp37, @mdboom)
Ah, no, I may have been confused by the commit date (which can be much older than the date the merge happened).
The AS bump to 0.58.1 just happened two days ago:
https://github.com/mozilla-mobile/android-components/pull/6636
CC @grigoryk @eoger
The only remotely interesting change in that range is maybe the Glean update? But then again it doesn't look like Glean uses protobuf. At least not directly as a dependency (Just in case CC @Dexterp37, @mdboom)
Nope, Glean doesn't use protobuf. Moreover, the changes introduced in version 28 do not really change the dependencies compared to 27.1.0
v0.58.2 is out (bump in a-c here), switching assignee to @grigoryk who'll take it from there.
Preparing an AC 39.0.1 dot release now that includes the AS bump to 0.58.2.
The 39.0.1 release went out earlier today!
Hi, verified as fixed on the Debug Build from Master I've just created: 39.0.1, f19856fa4 GV: 77.0a1 20200427094322 AS: 0.58.2 using the following devices:
• OnePlus A3 (Android 6.0.1)
• HTC Desire 820 (Android 6.0.1)
• Samsung Galaxy A6 (Android 5.1.1)
► Video

Hi, verified as fixed on Beta 76.0.0-beta.1 from 5/1 using the following devices:
• OnePlus A3 (Android 6.0.1)
• Samsung Galaxy A6 (Android 5.1.1)