wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.92k stars 1.3k forks source link

IllegalArgumentException: Unknown color #20694

Closed sentry-io[bot] closed 3 weeks ago

sentry-io[bot] commented 3 weeks ago

Sentry Issue: JETPACK-ANDROID-Q8T

java.lang.IllegalArgumentException: Unknown color
    at android.graphics.Color.parseColor(Color.java:1400)
    at org.wordpress.aztec.spans.MarkSpan.<init>(MarkSpan.kt:21)
    at org.wordpress.aztec.spans.MarkSpan.<init>(MarkSpan.kt:21)
    at org.wordpress.aztec.HtmlToSpannedConverter.start(Html.java:561)
    at org.wordpress.aztec.HtmlToSpannedConverter.handleStartTag(Html.java:365)
    at org.wordpress.aztec.HtmlToSpannedConverter.startElement(Html.java:725)
    at org.ccil.cowan.tagsoup.Parser.push(Parser.java:795)
    at org.ccil.cowan.tagsoup.Parser.rectify(Parser.java:1062)
    at org.ccil.cowan.tagsoup.Parser.stagc(Parser.java:1017)
    at org.ccil.cowan.tagsoup.HTMLScanner.scan(HTMLScanner.java:624)
    at org.ccil.cowan.tagsoup.Parser.parse(Parser.java:450)
    at org.wordpress.aztec.HtmlToSpannedConverter.convert(Html.java:275)
    at org.wordpress.aztec.Html.fromHtml(Html.java:213)
    at org.wordpress.aztec.AztecParser.parseHtmlForInspection(AztecParser.kt:72)
    at org.wordpress.android.editor.AztecEditorFragment.parseContent(AztecEditorFragment.java:2283)
    at org.wordpress.android.editor.AztecEditorFragment.hasMediaItemsMarkedWithTag(AztecEditorFragment.java:2223)
    at org.wordpress.android.editor.AztecEditorFragment.hasMediaItemsMarkedUploading(AztecEditorFragment.java:2213)
    at org.wordpress.android.ui.posts.EditPostActivity.lambda$resetUploadingMediaToFailedIfPostHasNotMediaInProgressOrQueued$24(EditPostActivity.java:1115)
    at org.wordpress.android.ui.posts.EditPostActivity.$r8$lambda$qRldFcda8u7Rij1yTRgpqS3bbsQ(EditPostActivity.java:0)
    at org.wordpress.android.ui.posts.EditPostActivity$$InternalSyntheticLambda$2$2bcf07e536162aed6911dd000b270a0a75d37367b130082d83fff88c0bad3e8a$0.invoke(R8$$SyntheticClass:0)
    at org.wordpress.android.ui.posts.EditPostRepository$updateAsync$1$isUpdated$1.invokeSuspend(EditPostRepository.kt:124)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.CoroutineContextKt.withContinuationContext
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:90)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
dangermattic commented 3 weeks ago

Thanks for reporting! 👍

sentry-io[bot] commented 3 weeks ago

Sentry Issue: WORDPRESS-ANDROID-2XN6

antonis commented 3 weeks ago

I did an initial investigation of this but wasn't able to reproduce the crash. The crash occurs in EditPostActivity.java:1115 for version 24.6. Note that this file has been converted to Kotlin in 24.7 with https://github.com/wordpress-mobile/WordPress-Android/pull/20543 and there seem to be no occurrences in the current 24.7-beta. The called function in the AztecEditorFragment hasn't changed either. I did not detect any other suspicious change in 24.6 and given that the occurrences of the issue are trending lower on both apps I suspect that a server side configuration change might have triggered this 🤔

Jetpack WordPress
Screenshot 2024-04-22 at 6 21 00 PM Screenshot 2024-04-22 at 6 35 58 PM

I plan to monitor the issue and revisit tomorrow.

sentry-io[bot] commented 2 days ago

Sentry Issue: JETPACK-ANDROID-QAV