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

Can't see poll results after voting from android #21368

Closed
HarHarLinks opened this issue Mar 9, 2022 · 8 comments
Closed

Can't see poll results after voting from android #21368

HarHarLinks opened this issue Mar 9, 2022 · 8 comments
Labels
A-Polls O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Regression

Comments

@HarHarLinks
Copy link
Contributor

HarHarLinks commented Mar 9, 2022

Steps to reproduce

  1. Create poll using schildi android beta 1.4.2.sc49.test10
  2. answer poll using the same
  3. view on E desktop

Outcome

What did you expect?

see all votes, including my own: e.g. on android it says there are 4 votes, and the results are shown because I voted

What happened instead?

can only see others votes: per the same example, desktop only says there were 3 votes, despite my own vote showing up on the timeline when enabling hidden events. the results are not shown, since it thinks i didn't vote yet

A diff of my own and someone else's event sources shows nothing significant.

Operating system

arch

Application version

Element Nightly version: 2022030801 Olm version: 3.2.8

How did you install the app?

aur nightly

Homeserver

1.53

Will you send logs?

No

@HarHarLinks
Copy link
Contributor Author

Looking at the same poll from E desktop W10 Element version: 1.10.6 Olm version: 3.2.8, there are only "2 votes cast" instead of 5 on android. As before it does not show my own vote.

@germain-gg germain-gg added A-Polls O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist X-Regression labels Mar 10, 2022
@andybalaam
Copy link
Member

@HarHarLinks please can you post the full event source of the events that are not showing up?

@HarHarLinks
Copy link
Contributor Author

The poll in question is now shown correctly on arch Element Nightly version: 2022031201 Olm version: 3.2.8.
Can't repro successfully at this time (note: android has also updated in the meantime).

src of my own event that formerly didn't show up:

{
    "decrypted": {
        "content": {
            "body": "b6b52c67-6421-462f-bffe-7cac286e4d92",
            "org.matrix.msc3381.poll.response": {
                "answers": [
                    "b6b52c67-6421-462f-bffe-7cac286e4d92"
                ]
            },
            "m.relates_to": {
                "event_id": "$VYXKJqQ6KeP8y2Gowrtq7cmQgkugeoTmLQ4skgpf6_I",
                "rel_type": "m.reference"
            }
        },
        "origin_server_ts": 1646846469679,
        "room_id": "!myroom",
        "sender": "@me",
        "type": "org.matrix.msc3381.poll.response",
        "unsigned": {
            "age": 416900124
        },
        "event_id": "$NwHpC8X3hjYSeifD8l6rY2yDgGuQTs_ulw4dyDKir3U",
        "user_id": "@me",
        "age": 416900124
    },
    "encrypted": {
        "content": {
            "algorithm": "m.megolm.v1.aes-sha2",
            "ciphertext": "-",
            "device_id": "???",
            "m.relates_to": {
                "event_id": "$VYXKJqQ6KeP8y2Gowrtq7cmQgkugeoTmLQ4skgpf6_I",
                "rel_type": "m.reference"
            },
            "sender_key": "-",
            "session_id": "-"
        },
        "origin_server_ts": 1646846469679,
        "room_id": "!myroom",
        "sender": "@me",
        "type": "m.room.encrypted",
        "unsigned": {
            "age": 416900124
        },
        "event_id": "$NwHpC8X3hjYSeifD8l6rY2yDgGuQTs_ulw4dyDKir3U",
        "user_id": "@me",
        "age": 416900124
    }
}

the poll being Event ID: $VYXKJqQ6KeP8y2Gowrtq7cmQgkugeoTmLQ4skgpf6_I with possible answers "id": "b6b52c67-6421-462f-bffe-7cac286e4d92" and "id": "ddf00840-187a-4d1e-9983-12ac3043f0e2".

@andybalaam
Copy link
Member

OK, it sounds like this is fixed - please don't hesitate to re-open, or create a new issue if you see this again.

Thank you!

@waclaw66
Copy link
Contributor

waclaw66 commented May 2, 2022

Still a problem in Element Web 1.10.11. Encrypted room, 4 members, poll with 3 answers created by creator of that room, 3 votes so far, Element Android shows them, but Element Web shows no votes. Once voted from Web, counter increased to 1, the other votes still not visible. Vote changed from Element Android, vote dissapers on Web. Needs more testing, bugs are on both sides Web-Android.

@andybalaam andybalaam reopened this May 3, 2022
@G2G2G2G
Copy link

G2G2G2G commented Oct 17, 2022

we have this too at my office
element-web is displaying all of them fine
element-android is displaying some votes, some not. Some of those votes are from other phones, some are from desktops

if the users re-vote again on the same item (switch vote to a different one and back) while the phone is open on that page, it'll usually update to show the vote correctly

Does the server not save the results to send to the clients? Is it client sending the results to other clients?

I can't figure out why it does this, sometimes it does sometimes it doesn't for different devices at different times.. however element-web seems to always have the full set of votes correctly

@HarHarLinks
Copy link
Contributor Author

Does the server not save the results to send to the clients?

A design issue with polls is that the whole timeline after the poll must be synced, loaded, and considered in order to figure out replies as those are timeline events. Afaik a fix is underway at the spec level that allows clients to query reverse relations, i.e. in this case load all vote events that relate to a poll based on a given poll event without loading the whole timeline. There was a dedicated issue for that, which has been moved to element-hq/element-meta#733.

While that can be one cause of the effect described in this issue, it isn't necessarily that.

@kerryarchibald
Copy link
Contributor

Fixed by matrix-org/matrix-react-sdk#9877
(Polls now use /relations API to fetch all votes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Polls O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Regression
Projects
None yet
Development

No branches or pull requests

6 participants