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

Response deserialization broken on master branch #208

Closed
kb-1000 opened this issue May 19, 2024 · 2 comments
Closed

Response deserialization broken on master branch #208

kb-1000 opened this issue May 19, 2024 · 2 comments

Comments

@kb-1000
Copy link

kb-1000 commented May 19, 2024

I've been trying out the master branch because of #201, but unfortunately deserializing the Response signal contents is broken there:

◀ method_call: CreateSession [serial = 20]
  path = /org/freedesktop/portal/desktop
  sender = :1.393
  destination = org.freedesktop.portal.Desktop
  interface = org.freedesktop.portal.RemoteDesktop
  Data (a{sv}): (
       {'handle_token': ('s', 'ashpd_I0STYhaO0z'),
        'session_handle_token': ('s', 'ashpd_qvxZHxJk6z')},,
    )

▷ method_return:  [serial = 12403]
  Flags: 1 (no_reply_expected)
  destination = :1.393
  reply_serial = 20
  sender = :1.16
  Data (o): ('/org/freedesktop/portal/desktop/request/1_393/ashpd_I0STYhaO0z',)

▷ signal: Response [serial = 12404]
  Flags: 1 (no_reply_expected)
  path = /org/freedesktop/portal/desktop/request/1_393/ashpd_I0STYhaO0z
  interface = org.freedesktop.portal.Request
  destination = :1.393
  sender = :1.16
  Data (ua{sv}): (
       0,
       {'session_handle': ('s',
                           '/org/freedesktop/portal/desktop/session/1_393/ashpd_qvxZHxJk6z')},
    )

2024-05-19T18:44:59.575343Z  INFO ashpd::desktop::request: Received signal 'Response' on 'org.freedesktop.portal.Request'
Error: ZBus Error: invalid type: character `u`, expected `v`, `a` or `(`

It was apparently broken by 7e754fb, if I revert it locally, everything works fine.

@hfiguiere hfiguiere mentioned this issue May 20, 2024
@bilelmoussaoui
Copy link
Owner

Seems like a zbus bug to me to be honest as the signature is ua{sv} and not (ua{sv})

The funny thing is that

        assert_eq!(
            <(ResponseType, HashMap<&str, Value<'_>>)>::signature(),
            Response::<()>::signature(),
        );

Passes, so the changes mentioned in the commit shouldn't affect things that much but somehow it does...

bilelmoussaoui added a commit that referenced this issue May 24, 2024
@bilelmoussaoui
Copy link
Owner

See 595a965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants