LemmyNet / jerboa

A native android app for Lemmy
GNU Affero General Public License v3.0
1.14k stars 167 forks source link

Jerboa crashes when post contains an invalid date format (double Z at the end) #1230

Closed frebib closed 9 months ago

frebib commented 9 months ago

Edit: Crash logs further down: https://github.com/dessalines/jerboa/issues/1230#issuecomment-1715536070

I'll start by saying that I'm sorry this report is a bit sparse.. I don't know how to collect crash logs, especially seeing as the app stays running for maybe 200ms before crashing. Happy to provide some if someone points me at instructions.

So this started maybe a week ago? It only happens if I'm logged into my personal Lemmy instance. If I clear app data, it works fine until I again log in. I'm running the latest version (0.46-alpha from GitHub) and whatever the latest Lemmy container version is at the time of writing. I'm not sure what else to try

MV-GH commented 9 months ago

If it doesn't always crash, go to settings > about > crash logs

But those will be gone if u deleted appdata

In the issue bug creation menu at the bottom there is entire guide to get the logs. Which would really need to understand the cause.

MV-GH commented 9 months ago

Btw another thing, when it crashes on startup can you turn off internet. And see if it still crashes if not. Definitely get crash logs from the crashlogs section in About.

frebib commented 9 months ago

I submitted this report on mobile so didn't see the helpful text there :( Thanks GitHub. Unfortunately it always crashes

I'll give adb a go later. Thanks :)

frebib commented 9 months ago

Oh that's much easier. ...lol

Looks like a double zulu on the date

Stacktrace

java.time.format.DateTimeParseException: Text '2023-09-11T20:41:58.396046ZZ' could not be parsed, unparsed text found at index 27 at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2047) at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1946) at java.time.Instant.parse(Instant.java:389) at okio.Utf8.dateStringToPretty(Unknown Source:11) at okio.Utf8.TimeAgo(Unknown Source:162) at okio.Utf8.ScoreAndTime(Unknown Source:555) at okio.Utf8.PostHeaderLine(Unknown Source:1401) at okio.Utf8.PostListingCard(Unknown Source:1418) at okio.Utf8.PostListing(Unknown Source:1835) at com.jerboa.ui.components.post.PostListingsKt$PostListings$1$invoke$$inlined$itemsIndexed$default$3.invoke(Unknown Source:370) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:10) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:15) at com.jerboa.ui.components.home.HomeKt$Taglines$2.invoke(SourceFile:53) at com.jerboa.ui.components.home.HomeKt$Taglines$2.invoke(SourceFile:13) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:7) at okio.Okio.CompositionLocalProvider(Unknown Source:182) at kotlin.io.ByteStreamsKt.LazyLayoutPinnableItem(Unknown Source:198) at androidx.compose.foundation.lazy.LazyListItemProviderImpl.Item(Unknown Source:39) at com.jerboa.ui.components.inbox.InboxKt$InboxHeaderTitle$2.invoke(SourceFile:16) at com.jerboa.ui.components.inbox.InboxKt$InboxHeaderTitle$2.invoke(SourceFile:6) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:7) at okio.Okio.CompositionLocalProvider(Unknown Source:182) at androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider(Unknown Source:113) at androidx.compose.foundation.lazy.layout.LazySaveableStateHolder.SaveableStateProvider(Unknown Source:32) at kotlin.io.ByteStreamsKt.access$SkippableItem-JVlU9Rs(Unknown Source:112) at androidx.navigation.compose.NavHostKt$NavHost$14$1.invoke(SourceFile:113) at androidx.navigation.compose.NavHostKt$NavHost$14$1.invoke(SourceFile:17) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:7) at androidx.navigation.compose.NavHostKt$NavHost$14$1.invoke(SourceFile:89) at androidx.navigation.compose.NavHostKt$NavHost$14$1.invoke(SourceFile:8) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:7) at androidx.appcompat.app.ActionBar.invokeComposable(Unknown Source:19) at androidx.compose.runtime.ComposerImpl.doCompose(Unknown Source:130) at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Unknown Source:13) at androidx.compose.runtime.CompositionImpl.composeContent(Unknown Source:18) at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Unknown Source:44) at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Unknown Source:9) at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Unknown Source:9) at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Unknown Source:9) at androidx.compose.runtime.CompositionImpl.setContent(Unknown Source:10) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(Unknown Source:111) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(Unknown Source:139) at androidx.compose.foundation.lazy.layout.LazyLayoutMeasureScopeImpl.measure-0kLqBqw(Unknown Source:33) at androidx.compose.foundation.lazy.LazyListKt$rememberLazyListMeasurePolicy$1$1$measuredItemProvider$1.getAndMeasure(Unknown Source:18) at androidx.compose.foundation.lazy.LazyListKt$rememberLazyListMeasurePolicy$1$1.invoke(Unknown Source:617) at androidx.navigation.compose.NavHostKt$NavHost$14$1.invoke(SourceFile:16) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1.measure-3p2s80s(Unknown Source:91) at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(Unknown Source:45) at androidx.compose.material3.ComposableSingletons$AppBarKt$lambda-2$1.invoke-3p2s80s(Unknown Source:58) at androidx.compose.material3.ComposableSingletons$AppBarKt$lambda-2$1.invoke(SourceFile:73) at androidx.compose.ui.layout.LayoutModifierImpl.measure-3p2s80s(Unknown Source:12) at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(Unknown Source:10) at androidx.compose.material3.ComposableSingletons$AppBarKt$lambda-2$1.invoke-3p2s80s(Unknown Source:19) at androidx.compose.material3.ComposableSingletons$AppBarKt$lambda-2$1.invoke(SourceFile:76) at androidx.compose.ui.layout.LayoutModifierImpl.measure-3p2s80s(Unknown Source:12) at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(Unknown Source:10) at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(Unknown Source:5) at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(Unknown Source:10) at androidx.compose.foundation.layout.FillNode.measure-3p2s80s(Unknown Source:101) at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(Unknown Source:10) at androidx.compose.foundation.layout.PaddingValuesModifier.measure-3p2s80s(Unknown Source:122) at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(Unknown Source:10) at okhttp3.internal.http2.Http2Connection$1.invoke(SourceFile:17) at okhttp3.internal.http2.Http2Connection$1.invoke(SourceFile:13) at coil.Coil.observe(Unknown Source:63) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(Unknown Source:66) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(Unknown Source:75) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(Unknown Source:12) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(Unknown Source:109) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(Unknown Source:110) at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1.measure-3p2s80s(Unknown Source:220) at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(Unknown Source:45) at okhttp3.internal.http2.Http2Connection$1.invoke(SourceFile:17) at okhttp3.internal.http2.Http2Connection$1.invoke(SourceFile:13) at coil.Coil.observe(Unknown Source:63) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(Unknown Source:66) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(Unknown Source:75) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(Unknown Source:12) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(Unknown Source:109) at androidx.compose.ui.node.MeasureAndLayoutDelegate.doRemeasure-sdFAvZA(Unknown Source:54) at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureAndRelayoutIfNeeded(Unknown Source:130) at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout(Unknown Source:128) at androidx.compose.ui.platform.AndroidComposeView.measureAndLayout(Unknown Source:61) at androidx.compose.ui.node.Owner.measureAndLayout$default(Unknown Source:3) at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(Unknown Source:18) at android.view.View.draw(View.java:23269) at android.view.View.updateDisplayListIfDirty(View.java:22133) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486) at android.view.View.updateDisplayListIfDirty(View.java:22089) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486) at android.view.View.updateDisplayListIfDirty(View.java:22089) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486) at android.view.View.updateDisplayListIfDirty(View.java:22089) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486) at android.view.View.updateDisplayListIfDirty(View.java:22089) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486) at android.view.View.updateDisplayListIfDirty(View.java:22089) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486) at android.view.View.updateDisplayListIfDirty(View.java:22089) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:689) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:695) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:793) at android.view.ViewRootImpl.draw(ViewRootImpl.java:4789) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4500) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3687) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2371) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9297) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239) at android.view.Choreographer.doCallbacks(Choreographer.java:899) at android.view.Choreographer.doFrame(Choreographer.java:832) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7924) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

END of stacktrace

Thread info

Name: main ID: 2 State: RUNNABLE Priority: 5 Thread group name: main Thread group parent: system Thread group active count: 42 Thread time: 0 hr 0 min, 4 sec

END of thread info

Device info

Report ID: e4497b36-bb41-444d-bbed-d9fc529abe9d Device ID: 3e4eacd3713e553b Application version: 46 Default launcher: com.android.settings Timezone name: Greenwich Mean Time Timezone ID: Europe/London Version release: 13 Version incremental : bdfadce87d Version SDK: 33 Board: kona Bootloader: unknown Brand: OnePlus CPU ABIS 32: armeabi-v7a, armeabi CPU ABIS 64: arm64-v8a Supported ABIS: arm64-v8a, armeabi-v7a, armeabi Device: OnePlus8 Display: lineage_instantnoodle-userdebug 13 TQ3A.230805.001 bdfadce87d Fingerprint: OnePlus/OnePlus8/OnePlus8:13/RKQ1.211119.001/Q.11402a4-c5f9-c5fa:user/release-keys Hardware: qcom Host: f7d95f86ddd0 ID: TQ3A.230805.001 Manufacturer: OnePlus Product: OnePlus8 Build time: 1694263883000 Build time formatted: 09-09-2023 13:51:23 Type: user Radio: Q_V1_P14,Q_V1_P14 Tags: release-keys User: root User IDs: N/A Is sustained performance mode supported: Yes Is in power save mode: No Is in interactive state: Yes Is ignoring battery optimizations: No Thermal status: STATUS_NONE Location power save mode: MODE_NO_CHANGE Is device idle: No Battery percentage: 24 Battery remaining time: N/A Is battery charging: No Is device rooted: Yes CPU Model: Qualcomm Technologies, Inc SM8250 Number of CPU cores: 8 Up time with sleep: 35 hr 46 min, 18 sec Up time without sleep: 23 hr 10 min, 47 sec

END of Device info

Exit reasons

N/A

END of exit reasons

Application info

App name: Jerboa Version code: 46 Version name: 0.0.46 Package name: com.jerboa Short package name: jerboa Flavor: N/A Signatures: KvQuis6lLSzWNkzLFfVFwtoVsyk= Is debuggable: No First installed: 12-09-2023 08:40:50 Last updated: 12-09-2023 08:40:50 Requested permissions: android.permission.ACCESS_NETWORK_STATE, android.permission.INTERNET, android.permission.READ_MEDIA_AUDIO, android.permission.READ_MEDIA_IMAGES, android.permission.READ_MEDIA_VIDEO, com.jerboa.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION Default prefs: N/A Default prefs: N/A

END of Application info

Currently running foreground/background processes

N/A

END of running foreground/background processes info

MV-GH commented 9 months ago

Your custom instance what version is it running? is it running the latest main? Or just 0.18.4? The latest main already contains breaking changes for 0.19 which Jerboa does not support yet.

MV-GH commented 9 months ago

Jerboa should definitely handle datetime parse failures better. But this is also backend issue, Lemmy should not be creating bad timezones.

frebib commented 9 months ago

According to the UI

UI: 0.18.4 BE: 0.18.4-beta.8

I'm not doing anything custom per-se

I'm using the dessalines/lemmy and dessalines/lemmy-ui Docker images (:latest tag... maybe I should pin or find a "stable" tag or something)

Either way, seems like a server-side issue

MV-GH commented 9 months ago

If your are using the latest changes your are using the main with 0.19 changes. Could you report this at Lemmy that the main is creating badbly formatted datetimes

guillaume-uH57J9 commented 9 months ago

Hi !

I just experienced a startup crash of Jerboa with the same exception (ie java.time.format.DateTimeParseException) and same callstack as mentioned in an earlier comment.

What can I do as a user? @frebib mentioned "server-side issue" but I'm not a server admin. Should I recommend the server admin apply a fix or update to a specific version?

Client: Jerboa 0.0.45 Server: BE 0.18.4

guillaume-uH57J9 commented 9 months ago

Just updated to Jerboa 0.0.46 via F-Droid. The startup crash persist. Jerboa's UI suddenly disappear while loading posts/homepage. Scoop collects a similar error log that includes a double Z in the date.

MV-GH commented 9 months ago

Just updated to Jerboa 0.0.46 via F-Droid. The startup crash persist. Jerboa's UI suddenly disappear while loading posts/homepage. Scoop collects a similar error log that includes a double Z in the date.

Which instance and what BE version does it say? This is very strange that it happens to a 0.18.4 version. In 0.19 that will come they made changes to the datetime which probably introduced the problem. I wasn't aware of this happening earlier.

Right now as a user the only thing you can do delete appdata and do not login with that instance as it has problems. Make your admin aware of the potential problems.

I will definitely look into making sure this won't crash Jerboa in the future but this won't be for a while.

guillaume-uH57J9 commented 9 months ago

@MV-GH The instance is beehaw.org, and BE version is 0.18.4 at the time of testing (cf previous comments).

I'll share this issue's link with admins.

MV-GH commented 9 months ago

Thanks, I do have some questions for those admins. Are they running a custom version of lemmy 0.18.4? Have they cherrypicked any 0.19 changes into their BE? especially regarding time. Or maybe it's a existing issue that only recently started happening due to locale/ time changes

MV-GH commented 9 months ago

Nvm this was entirely caused clientsided (By jerboa), Due to changes in timezone handling in 0.19. Which Jerboa did not support yet.

Still strange that Beehaw was encountering these issues though.