ReadYouApp / ReadYouApp/ReadYou

`IllegalArgumentException` while loading the article list of a source

Open
#1,206 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug untriaged
Dominant language
Kotlin
Stars
7.5k
Forks
330
PR merge metrics
No merged PRs in 30d

Description

Checklist
  • I've already searched in existing issues and haven't found a similar problem reported.
  • I'm using the latest version of the app
  • This error caused the app to crash
  • This error is reproducible
Which category best fits this error?

Others

App version

0.15.3

Reproduction steps
  1. Add subscription: https://blog.xinshijiededa.men/atom.xml
  2. Load the article, and enter the article list of the source added
  3. Crashes
Crash report
Version: 0.15.3
Device: Xiaomi 23049RAD8C
System: Android 14 (API 34)

Stack trace: 

.lang.IllegalArgumentException: Unexpected char 0x95e8 at 0 in Referer value: 门-v2z2.svg
	at okhttp3.internal._HeadersCommonKt.headersCheckValue(-HeadersCommon.kt:121)
	at okhttp3.Headers$Builder.add(Headers.kt:14)
	at me.ash.reader.ui.component.base.RYAsyncImageKt.RYAsyncImage(RYAsyncImage.kt:444)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt.ArticleItem(ArticleItem.kt:272)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt.ArticleItem(ArticleItem.kt:24)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt.SwipeableArticleItem$lambda$40(ArticleItem.kt:192)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt.$r8$lambda$EZFJkQcKU15tNvFI4d4d200N-Wk(ArticleItem.kt:1)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt$$ExternalSyntheticLambda14.invoke(R8$$SyntheticClass:41)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:12)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:2)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt.SwipeActionBox$lambda$53(ArticleItem.kt:28)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt.$r8$lambda$YQ6IMEyuL_7uDVoD_ngHa3qk80E(ArticleItem.kt:1)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt$$ExternalSyntheticLambda21.invoke(R8$$SyntheticClass:13)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:21)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:3)
	at me.ash.reader.ui.component.swipe.SwipeableActionsBoxKt.SwipeableActionsBox-gXMAzVA(SwipeableActionsBox.kt:880)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt.SwipeActionBox(ArticleItem.kt:549)
	at me.ash.reader.ui.page.home.flow.ArticleItemKt.SwipeableArticleItem(ArticleItem.kt:704)
	at me.ash.reader.ui.page.home.flow.ArticleListKt.ArticleList$lambda$6(ArticleList.kt:186)
	at me.ash.reader.ui.page.home.flow.ArticleListKt.$r8$lambda$k2oMX0_DhRGVcAxlTa-lrDaXZm4(ArticleList.kt:1)
	at me.ash.reader.ui.page.home.flow.ArticleListKt$$ExternalSyntheticLambda5.invoke(R8$$SyntheticClass:51)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:29)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:4)
	at androidx.compose.foundation.lazy.LazyListItemProviderImpl$$ExternalSyntheticLambda0.invoke(R8$$SyntheticClass:57)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:12)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:2)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:84)
	at androidx.compose.foundation.lazy.layout.LazyLayoutPinnableItemKt.LazyLayoutPinnableItem(LazyLayoutPinnableItem.kt:236)
	at androidx.compose.foundation.lazy.LazyListItemProviderImpl.Item(LazyListItemProvider.kt:89)
	at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$$ExternalSyntheticLambda0.invoke(R8$$SyntheticClass:32)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:12)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:2)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:46)
	at androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider(SaveableStateHolder.kt:175)
	at androidx.compose.foundation.lazy.layout.LazySaveableStateHolder.SaveableStateProvider(LazySaveableStateHolder.kt:77)
	at androidx.compose.foundation.text.selection.HandleImageCache.SkippableItem-JVlU9Rs(AndroidSelectionHandles.android.kt:88)
	at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactory$CachedItemContent$$ExternalSyntheticLambda0.invoke(R8$$SyntheticClass:85)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:12)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:2)
	at androidx.compose.runtime.internal.Expect_jvmKt.invokeComposable(Expect.jvm.kt:15)
	at androidx.compose.runtime.ComposerImpl.doCompose-aFTiNEg(ComposerImpl.kt:85)
	at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:37)
	at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:75)
	at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime(ComposerImpl.kt:5)
	at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime(ComposerImpl.kt:5)
	at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:32)
	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:236)
	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(SubcomposeLayout.kt:177)
	at androidx.compose.foundation.lazy.layout.LazyLayoutMeasureScopeImpl.compose(LazyLayoutMeasureScope.kt:30)
	at androidx.compose.foundation.lazy.LazyListMeasuredItemProvider.getAndMeasure-0kLqBqw(LazyListMeasuredItemProvider.kt:28)
	at androidx.compose.foundation.lazy.LazyListKt$rememberLazyListMeasurePolicy$1$1.measure-0kLqBqw(LazyList.kt:768)
	at androidx.compose.foundation.lazy.layout.LazyLayoutKt$$ExternalSyntheticLambda4.invoke(R8$$SyntheticClass:16)
	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1.measure-3p2s80s(SubcomposeLayout.kt:68)
	at androidx.compose.ui.node.InnerNodeCoordinator$LookaheadDelegateImpl.measure-BRTryo0(InnerNodeCoordinator.kt:45)
	at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:1)
	at androidx.compose.ui.node.LayoutModifierNodeCoordinator$LookaheadDelegateForLayoutModifierNode.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:27)
	at androidx.compose.foundation.lazy.layout.LazyLayoutBeyondBoundsProviderModifierNode.measure-3p2s80s(LazyLayoutBeyondBoundsModifierLocal.kt:1)
	at androidx.compose.ui.node.LayoutModifierNodeCoordinator$LookaheadDelegateForLayoutModifierNode.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:27)
	at androidx.compose.foundation.layout.FillNode.measure-3p2s80s(Size.kt:105)
	at androidx.compose.ui.node.LayoutModifierNodeCoordinator$LookaheadDelegateForLayoutModifierNode.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:27)
	at androidx.compose.foundation.layout.OffsetPxNode.measure-3p2s80s(Offset.kt:1)
	at androidx.compose.ui.node.LayoutModifierNodeCoordinator$LookaheadDelegateForLayoutModifierNode.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:27)
	at androidx.compose.ui.node.LookaheadPassDelegate$performMeasureBlock$1.invoke(LookaheadPassDelegate.kt:18)
	at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:314)
	at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performLookaheadMeasure-BRTryo0$ui(LayoutNodeLayoutDelegate.kt:34)
	at androidx.compose.ui.node.LookaheadPassDelegate.remeasure-BRTryo0(LookaheadPassDelegate.kt:162)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.doLookaheadRemeasure-sdFAvZA(MeasureAndLayoutDelegate.kt:44)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureAndRelayoutIfNeeded(MeasureAndLayoutDelegate.kt:89)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout(MeasureAndLayoutDelegate.kt:140)
	at androidx.compose.ui.platform.AndroidComposeView.measureAndLayout(AndroidComposeView.android.kt:34)
	at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:15)
	at android.view.View.draw(View.java:23912)
	at android.view.View.updateDisplayListIfDirty(View.java:22776)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4543)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4516)
	at android.view.View.updateDisplayListIfDirty(View.java:22732)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4543)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4516)
	at android.view.View.updateDisplayListIfDirty(View.java:22732)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4543)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4516)
	at android.view.View.updateDisplayListIfDirty(View.java:22732)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4543)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4516)
	at android.view.View.updateDisplayListIfDirty(View.java:22732)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4543)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4516)
	at android.view.View.updateDisplayListIfDirty(View.java:22732)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4543)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4516)
	at android.view.View.updateDisplayListIfDirty(View.java:22732)
	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:694)
	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:700)
	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:798)
	at android.view.ViewRootImpl.draw(ViewRootImpl.java:5184)
	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4875)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4051)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2688)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9580)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1355)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1364)
	at android.view.Choreographer.doCallbacks(Choreographer.java:963)
	at android.view.Choreographer.doFrame(Choreographer.java:892)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1338)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8294)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:884)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with RYAsyncImage.kt around line 444, then trace the call from ArticleItem.kt around line 272 using the provided reproduction feed. Check how the Referer value reaches OkHttp and verify the article list no longer crashes when this feed is loaded.】【。

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.