Skip to content

[Bug] System DBus not available by default on Flatpak install #359

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

Closed
1 task done
ppom0 opened this issue Dec 24, 2022 · 2 comments
Closed
1 task done

[Bug] System DBus not available by default on Flatpak install #359

ppom0 opened this issue Dec 24, 2022 · 2 comments
Assignees
Labels
bug Something isn't working Linux Linux related issue

Comments

@ppom0
Copy link

ppom0 commented Dec 24, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I run the app via Flatpak, there is this error in the logs:

$ flatpak run com.github.KRTirtho.Spotube
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: SocketException: Connection failed (OS Error: No such file or directory, errno = 2), address = /var/run/dbus/system_bus_socket, port = 0
#0      _NativeSocket.startConnect (dart:io-patch/socket_patch.dart:682)
#1      _NativeSocket.connect (dart:io-patch/socket_patch.dart:948)
#2      _RawSocket.connect (dart:io-patch/socket_patch.dart:1815)
#3      RawSocket.connect (dart:io-patch/socket_patch.dart:21)
#4      DBusClient._openSocket (package:dbus/src/dbus_client.dart:767)
#5      DBusClient._connect (package:dbus/src/dbus_client.dart:787)
#6      DBusClient.callMethod (package:dbus/src/dbus_client.dart:607)
#7      DBusClient.getNameOwner (package:dbus/src/dbus_client.dart:448)
#8      DBusClient._findUniqueName (package:dbus/src/dbus_client.dart:624)
#9      DBusSignalStream._onListen (package:dbus/src/dbus_client.dart:131)
[...]

flutter: RangeError (byteOffset): Invalid value: Valid value range is empty: 0

Expected Behavior

I don't know why the system DBus is needed, but it should be made accessible in the Flatpak sandbox.

Steps To Reproduce

  1. With flatpak
  2. flatpak run com.github.KRTirtho.Spotube
  3. See error up here ↑

Spotube Version

v2.6.0

Operating System

Linux

Linux Distribution (if applicable)

NixOS

Operating System Version

NixOS 22.11

Installation Source

Flathub (Flatpak)

Additional information

I could make rid of this error by adding --socket=system-bus to the flatpak command:
flatpak run --socket=system-bus com.github.KRTirtho.Spotube

So I believe this socket should be added to the permissions in the flatpak packaging.

But maybe accessing the system DBus socket is useless, as I don't see which functionnalities are broken without --socket=system-bus. In which case you may remove this session opening in the code? (again, I don't know what it's for)

@ppom0 ppom0 added bug Something isn't working good first issue labels Dec 24, 2022
@KRTirtho KRTirtho moved this from To do to Triaged in Spotube Board Feb 1, 2023
@KRTirtho KRTirtho moved this to Backlog in Spotube Board Feb 1, 2023
@RaptaG RaptaG added UI A suggestion/bug report of a UI element Linux Linux related issue and removed good first issue UI A suggestion/bug report of a UI element labels Mar 8, 2023
@KRTirtho
Copy link
Owner

This has been fixed already. Please check the latest version & close the issue

@KRTirtho KRTirtho moved this from Backlog to Deployed in Spotube Board Aug 28, 2023
@github-project-automation github-project-automation bot moved this from Deployed to Done in Spotube Board Aug 28, 2023
@KRTirtho
Copy link
Owner

Fixed in v3.1.1

@KRTirtho KRTirtho moved this from Done to Deployed in Spotube Board Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Linux Linux related issue
Projects
Status: Deployed
Development

No branches or pull requests

3 participants