Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element Android can't render messages #4733

Closed
Linerly opened this issue Dec 16, 2021 · 8 comments · Fixed by #4748
Closed

Element Android can't render messages #4733

Linerly opened this issue Dec 16, 2021 · 8 comments · Fixed by #4748
Assignees
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@Linerly
Copy link
Contributor

Linerly commented Dec 16, 2021

Steps to reproduce

I'm not sure how to reproduce, but I remember disabling Google Play Services, then open Element, then it can't render messages whatsoever (except for images)

I tried re-enabling Google Play Services as well, but that didn't work, clearing cache didn't work as well, even logging out and logging in again doesn't make the message rendering work normally again

then

I updated Google Play Services once I re-enabled it, and that seems to fix the message rendering issue

Outcome

What did you expect?

Messages to be rendered normally

What happened instead?

Element Android cannot render the messages, I sent a rageshake about this

Your phone model

Samsung Galaxy J1 ace

Operating system version

Android 5.1.1

Application version and app store

1.3.10 [40103101] (G-b4948)

Homeserver

matrix.org

Will you send logs?

Yes

@Linerly Linerly added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Dec 16, 2021
@RiotRobot RiotRobot added this to Incoming in Issue triage Dec 16, 2021
@losuler
Copy link

losuler commented Dec 16, 2021

Is this referring to the error Element encountered an issue when rendering content of event with id ...? If so, it's the same issue I've encountered immediately after updating to version 1.3.10 [40103102] (G-b4948). It's effecting every message in every room for me currently.

@Linerly
Copy link
Contributor Author

Linerly commented Dec 16, 2021

Yep, it is...

@Linerly
Copy link
Contributor Author

Linerly commented Dec 16, 2021

I tried selecting the messages that couldn't be rendered, and it crashed

@Elsie19
Copy link

Elsie19 commented Dec 16, 2021

I'm having the same issue, after updating

@ouchadam ouchadam self-assigned this Dec 16, 2021
@ouchadam ouchadam added O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround A-Timeline labels Dec 16, 2021
@ouchadam ouchadam moved this from P1 to In progress in Android App Team Dec 16, 2021
@Linerly
Copy link
Contributor Author

Linerly commented Dec 17, 2021

I updated Google Play Services once I re-enabled it, and that seems to fix the message rendering issue

@ouchadam
Copy link
Contributor

ouchadam commented Dec 17, 2021

thanks for the update and the logs! I can confirm this is related to the emoji library upgrade.

The library seems to rely on google play services in order to initialise itself

2021-12-15T17:56:13*898GMT+00:00Z 1976 E/ /Tag: failed to create message item
java.lang.IllegalStateException: Not initialized yet
	at androidx.core.util.Preconditions.checkState(Preconditions.java:1)
	at androidx.emoji2.text.EmojiCompat.process(EmojiCompat.java:3)
	at androidx.emoji2.text.EmojiCompat.process(EmojiCompat.java:2)
	at im.vector.app.features.html.SpanUtils.getBindingOptions(SpanUtils.kt:1)
	at im.vector.app.features.home.room.detail.timeline.factory.MessageItemFactory.buildMessageTextItem(MessageItemFactory.kt:1)
	at im.vector.app.features.home.room.detail.timeline.factory.MessageItemFactory.buildItemForTextContent(MessageItemFactory.kt:18)
	at im.vector.app.features.home.room.detail.timeline.factory.MessageItemFactory.create(MessageItemFactory.kt:33)
	at im.vector.app.features.home.room.detail.timeline.factory.TimelineItemFactory.create(TimelineItemFactory.kt:15)
	at im.vector.app.features.home.room.detail.timeline.TimelineEventController.buildCacheItem(TimelineEventController.kt:9)
	at im.vector.app.features.home.room.detail.timeline.TimelineEventController.buildCacheItemsIfNeeded(TimelineEventController.kt:27)
	at im.vector.app.features.home.room.detail.timeline.TimelineEventController.getModels(TimelineEventController.kt:1)
	at im.vector.app.features.home.room.detail.timeline.TimelineEventController.buildModels(TimelineEventController.kt:9)
	at com.airbnb.epoxy.EpoxyController$1.run(EpoxyController.java:6)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:145)
	at android.os.HandlerThread.run(HandlerThread.java:61)

we should probably avoid breaking the entire timeline in this case and let the emojis fail instead, will have a play around.

Issue triage automation moved this from Incoming to Closed Dec 17, 2021
Android App Team automation moved this from In progress to Merged Dec 17, 2021
@ouchadam
Copy link
Contributor

will be fixed in 1.3.11

@k4r4b3y
Copy link

k4r4b3y commented May 24, 2023

I just got bitten by this bug on my element android version 1.5.32 and now my message UI is littered with "Element encountered an issue when redering content of event with id..."

I don't know what triggered it, but I changed the WiFi from my mobile phone to home network and casually checked my element android client only to be greeted by this bug.

Most of these messages are simple text messages, so I am not sure how it can have issues with rendering these.

I tried cleaning the cache and re-syncing my account to element android a few times yet the bug doesn't go away.

Quite ugly and annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
Development

Successfully merging a pull request may close this issue.

5 participants