Xpra-org / xpra-html5

HTML5 client for Xpra
Mozilla Public License 2.0
209 stars 55 forks source link

Type mismatch rencode.js #290

Closed iDmple closed 6 months ago

iDmple commented 7 months ago

Previously, I was using commit cd0de67 with keycloak authentication without issue. On v11.0, I'm hitting this bug which prevents opening xpra on the browser:

Screenshot 2024-02-20 at 14 02 48

The value of u8a in https://github.com/Xpra-org/xpra-html5/blob/edf32fa2aafe4e697e110da23e2cf93985642288/html5/js/lib/rencode.js#L303-L310

is equal to

https://xxx/realms/xxx/protocol/openid-connect/auth?response_type=code&client_id=xxx&redirect_uri=https%3A%2F%2Fxxx%2Fsession%2F45111&scope=openid+email+profile+group+roles+team

which corresponds to packet in the screenshot and isn't a uint8.

Previously, in cd0de67, the authentication didn't go through this piece of code.

Do you have any idea what's wrong?

Edit: fixed links

totaam commented 7 months ago

Please clarify what has changed. Was it a server version update or an HTML5 client update?

iDmple commented 7 months ago

It was both.

Previously when it was working, these commits were used: xpra-html5: cd0de67 xpra: 6c103fc

This combination isn't working and provokes the issue described above: xpra-html5: v11.0 xpra: 83dc43b

We also tried updating xpra but with the old version of xpra-html5. This combination also works fine. xpra-html5: cd0de67 xpra: 83dc43b

So to the best of what I understand the issue would be with xpra-html5?

totaam commented 7 months ago

Working: cd0de67 is https://github.com/Xpra-org/xpra-html5/blob/cd0de67cbf9dbb13cf7dfbf2a23945c1c4ea6b10/html5/js/Utilities.js#L15 https://github.com/Xpra-org/xpra/commit/6c103fc is version 5.0!? https://github.com/Xpra-org/xpra/blob/6c103fc59a6d1da078389d30a6667717634c313b/xpra/__init__.py#L7

Not working: xpra v6.0 - which is beta... https://github.com/Xpra-org/xpra/blob/83dc43bd22b3252c10a80b3908dbafa53f8fcea6/xpra/__init__.py#L7

Can you try to narrow the version that broke? Assuming that the problem is the xpra-html5 version. There aren't too many commits, or even releases, between xpra-html5 v7 and v11. Could be 7ddf66abd23b08fbac31c28ea2f2c2224cf00f7c, or maybe: 7832796ec7dbd7e8c593b8f9df744d3a76b385d6, ce852e483cd5867a25c375b027b10cf56286a2bd, 47026f7410de1664fed3fa4045e695bb435e0b93 - unlikely to be 5747b6f223ce445be1802e89d8fb24154052c65e.

iDmple commented 7 months ago

Perfect, I will test these commits and report back!! Thanks.

iDmple commented 7 months ago

Report:

Screenshot 2024-02-21 at 22 57 55

In summary: https://github.com/Xpra-org/xpra-html5/commit/6f6295c55937d4508b8c6ae5af67f843f75c3d28 which is the commit right before https://github.com/Xpra-org/xpra-html5/commit/7ddf66abd23b08fbac31c28ea2f2c2224cf00f7c works, so the problem seems to come from https://github.com/Xpra-org/xpra-html5/commit/7ddf66abd23b08fbac31c28ea2f2c2224cf00f7c.

I'm trying upgrade to the latest beta commits because I want to make a pull request for more keycloak functionality (long overdue), it will be much easier to merge then.

iDmple commented 6 months ago

Is there any way to fix this issue without @oskarbraten ?

After updating the whole stack (OS, dependencies), I'm currently having issues with the commits that previously worked. It makes the windows "jumpy" when screen sharing. I don't think we can debug anything on these old commits, so the only way is forward.

totaam commented 6 months ago

@iDmple I have no time for the html5 client at the moment. Not even fixing glaring bugs...

iDmple commented 6 months ago

Ok, I can try looking into it. Is the html5 going to continue to be supported?

totaam commented 6 months ago

Sure, why not.