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

xdg-desktop-portal tries to access non-existing org.freedesktop.impl.portal.Request #1241

Closed
Sodivad opened this issue Dec 18, 2023 · 4 comments · Fixed by #1244
Closed

xdg-desktop-portal tries to access non-existing org.freedesktop.impl.portal.Request #1241

Sodivad opened this issue Dec 18, 2023 · 4 comments · Fixed by #1244
Labels
bug needs diagnosis Root cause of the issue needs to be diagnosed

Comments

@Sodivad
Copy link
Contributor

Sodivad commented Dec 18, 2023

Operating System

Neon 22.04

XDG Desktop Portal version

Git

XDG Desktop Portal version (Other)

main

Desktop Environment

KDE

Desktop Environment (Other)

No response

Expected Behavior

xdg-desktop-portal should not try to access non-existent object/give the impl a chance to create them

Current Behavior

I can see that for requests an app makes xdg-desktop-portal tries to read properties of a non-existing Request. The event flow is as follows with org.freedesktop.portal.FileChooser.OpenFile as an example

  • org.freedesktop.portal.FileChooser.OpenFile is called
  • xdg-desktop-portal makes a call to the impl at /org/freedesktop/portal/desktop/request/connection/token org.freedesktop.DBus.Properties.GetAll('org.freedesktop.impl.portal.Request',)
  • xdg-desktop-portal calls org.freedesktop.impl.portal.FileChooser.OpenFile
  • xdg-desktop-portal send the method return of the original org.freedesktop.portal.FileChooser.OpenFile

Steps to Reproduce

  • Use a flatpaked app or make a call manually

Anything else we should know?

I can see this order of event flows with multiple interfaces. At least FileChooser, Screenshot and Screencast

@Sodivad Sodivad added the bug label Dec 18, 2023
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Dec 18, 2023
@GeorgesStavracas GeorgesStavracas added the needs diagnosis Root cause of the issue needs to be diagnosed label Dec 20, 2023
@GeorgesStavracas
Copy link
Member

Is this causing any problem? GDBusProxy initialization calls org.freedesktop.DBus.Properties.GetAll() on the object during construction, but the org.freedesktop.impl.portal.Request interface does not have any properties, so this ends up never returning nothing of interest.

@GeorgesStavracas GeorgesStavracas moved this from Needs Triage to Triaged in Triage Dec 20, 2023
@Sodivad
Copy link
Contributor Author

Sodivad commented Dec 20, 2023

Is this causing any problem?

Not to my knowledge. I just keep spotting this in bustle

but the org.freedesktop.impl.portal.Request interface does not have any properties, so this ends up never returning nothing of interest.

Even if it it had properties, It would fail as the Request object does not exist yet.

@GeorgesStavracas
Copy link
Member

So it's not a critical issue or anything. Cool. In any case, it would be good to figure it out.

GeorgesStavracas added a commit to GeorgesStavracas/xdg-desktop-portal that referenced this issue Dec 20, 2023
The org.freedesktop.impl.portal.Request interface has no properties,
and is constructed against a different object path. We don't need to
fetch properties for that.

Don't do that.

Closes: flatpak#1241
@GeorgesStavracas
Copy link
Member

Could you please verify if #1244 fixes that for you, without introducing any regressions?

github-merge-queue bot pushed a commit that referenced this issue Dec 21, 2023
The org.freedesktop.impl.portal.Request interface has no properties,
and is constructed against a different object path. We don't need to
fetch properties for that.

Don't do that.

Closes: #1241
GeorgesStavracas added a commit to GeorgesStavracas/xdg-desktop-portal that referenced this issue Apr 3, 2024
The org.freedesktop.impl.portal.Request interface has no properties,
and is constructed against a different object path. We don't need to
fetch properties for that.

Don't do that.

Closes: flatpak#1241
GeorgesStavracas added a commit to GeorgesStavracas/xdg-desktop-portal that referenced this issue Apr 3, 2024
The org.freedesktop.impl.portal.Request interface has no properties,
and is constructed against a different object path. We don't need to
fetch properties for that.

Don't do that.

Closes: flatpak#1241
GeorgesStavracas added a commit that referenced this issue Apr 4, 2024
The org.freedesktop.impl.portal.Request interface has no properties,
and is constructed against a different object path. We don't need to
fetch properties for that.

Don't do that.

Closes: #1241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs diagnosis Root cause of the issue needs to be diagnosed
Projects
No open projects
Status: Triaged
Development

Successfully merging a pull request may close this issue.

2 participants