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

[Linux] Transparent or Black window. Libsecret provider not installed #553

Closed
1 task done
calm3285 opened this issue Jul 6, 2023 · 36 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@calm3285
Copy link

calm3285 commented Jul 6, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

when i open spotube it opens transparent, this has never happen to me

Expected Behavior

it should open normal

Steps to reproduce

  1. i opened the app

Operating System

arch linux

Spotube version

3.0.0.0

Installation source

Arch User Repository (AUR)

Additional information

package:media_kit_libs_linux registered.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files
#0 DBusClient._callMethod (package:dbus/src/dbus_client.dart:1102)

#1 DBusClient.callMethod (package:dbus/src/dbus_client.dart:608)

#2 DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80)

#3 NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351)

#4 ConnectivityPlusLinuxPlugin.checkConnectivity (package:connectivity_plus/src/connectivity_plus_linux.dart:24)

#5 FlQueryConnectivityPlusAdapter.isConnected (package:fl_query_connectivity_plus_adapter/fl_query_connectivity_plus_adapter.dart:10)

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files
#0 DBusClient._callMethod (package:dbus/src/dbus_client.dart:1102)

#1 DBusClient.callMethod (package:dbus/src/dbus_client.dart:608)

#2 DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80)

#3 NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351)

#4 ConnectivityPlusLinuxPlugin._startListenConnectivity (package:connectivity_plus/src/connectivity_plus_linux.dart:64)

** (spotube:4313): WARNING **: 11:05:14.368: libsecret_error: B\xb3\x96\x91\x9e\u007f
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected extension byte (at offset 1)
#0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747)
#1 Utf8Decoder.convert (dart:convert/utf.dart:351)
#2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:503)
#3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:478)
#4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310)

#6 PersistedStateNotifier.initializeBoxes (package:spotube/utils/persisted_state_notifier.dart:57)

#7 main (package:spotube/main.dart:123)

@calm3285 calm3285 added the bug Something isn't working label Jul 6, 2023
@KRTirtho
Copy link
Owner

KRTirtho commented Jul 6, 2023

You've NetworkManager installed?

@RaptaG
Copy link
Contributor

RaptaG commented Jul 6, 2023

Also could you provide some screenshots?

@calm3285
Copy link
Author

calm3285 commented Jul 6, 2023

You've NetworkManager installed?

no, i use dhcpcd. I installed and ran NM and displays this in the terminal:

package:media_kit_libs_linux registered.

** (spotube:13796): WARNING **: 15:08:35.552: libsecret_error: t\u0007\xfbI\xd8\u007f
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Invalid UTF-8 byte (at offset 2)
#0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747)
#1 Utf8Decoder.convert (dart:convert/utf.dart:351)
#2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:503)
#3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:478)
#4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310)

#6 PersistedStateNotifier.initializeBoxes (package:spotube/utils/persisted_state_notifier.dart:57)

#7 main (package:spotube/main.dart:123)

Also could you provide some screenshots?

its literary transparent, if i run it in the terminal it opens a transparent window

Btw I use plasma with wayland

@RaptaG
Copy link
Contributor

RaptaG commented Jul 6, 2023

Works fine for me on Fedora Kinoite 38 (KDE) with Wayland @calm3285

@KRTirtho
Copy link
Owner

KRTirtho commented Jul 7, 2023

Do you have gnome-keyring or kde-wallet installed and configured?

@calm3285
Copy link
Author

calm3285 commented Jul 7, 2023

Do you have gnome-keyring or kde-wallet installed and configured?

i enabled kwallet an it worked
is kwallet a dependency?
how can i open spotube without it?

@RaptaG
Copy link
Contributor

RaptaG commented Jul 7, 2023

I use Spotube with kwallet disabled

@luminoso
Copy link

luminoso commented Jul 7, 2023

I have kwallet enabled and I have the issue

@calm3285
Copy link
Author

calm3285 commented Jul 7, 2023

when i disable kwallet editing the kwalletrc file, i get this error:

package:media_kit_libs_linux registered.

** (spotube:6170): WARNING **: 11:12:02.180: libsecret_error: \xc3\xf4\xcaV\xab\u007f
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Missing extension byte (at offset 1)
#0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747)
#1 Utf8Decoder.convert (dart:convert/utf.dart:351)
#2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:503)
#3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:478)
#4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310)

#6 PersistedStateNotifier.initializeBoxes (package:spotube/utils/persisted_state_notifier.dart:57)

#7 main (package:spotube/main.dart:123)

@KRTirtho
Copy link
Owner

KRTirtho commented Jul 7, 2023

Spotube needs kwallet or any secret service for storing your login information. Without it, spotube can't start as it will try to check if you've credentials for login

@RaptaG
Copy link
Contributor

RaptaG commented Jul 7, 2023

Spotube needs kwallet or any secret service for storing your login information. Without it, spotube can't start as it will try to check if you've credentials for login

Isn't there any lightweight flutter credential store API or something to build in Spotube without the need of 3rd-parties @KRTirtho ?

@KRTirtho
Copy link
Owner

KRTirtho commented Jul 8, 2023

libsecret is a standard desktop feature in Linux. And it's better to use a standard library than making a custom implementation for the same result. So sorry libsecret needs to be installed + enabled because it's a dependency for encryption of credentials

@pidario
Copy link

pidario commented Jul 8, 2023

I have the same issue. I don't use a keyring... except that I do! KeepassXC configured as a secret service provider is enough for Spotube to open and do its things. But then, another issue arises (which can be found in the same stack trace in the issue description): application needs NetworkManager for some reason (probably some flutter library? I cannot find any reference of it in Spotube repo).
I normally use networkd. Once I install NetworkManager and enable it instead of networkd, Spotube works as expected.
If using a keyring might be useful (KeepassXC is always open in my system anyway), I believe at least the app should warn the user. But about NetworkManager, I don't think that any software should ever make assumptions about how a user configures his/her network devices.

@KRTirtho
Copy link
Owner

KeepassXC is password manager only ig. gnome-keyring or kwallet these are secret managers (key manager)
libsecret is used by applications to store secrets e.g. encryption keys, ssh keys, API keys etc... On the other hand, KeepassXC, Bitwarden etc are password managers used by users (not application at all) to store credentials. The password manager might use libsecret to store their encryption keys. But since most of them are cloud based, nothing is stored locally nowadays

About NetworkManager:
Sorry about this. I didn't know it's a dependency of a plugin. Nothing was mentioned in the plugin README so it's kind of confusion of all parties.

@GiorgosXou
Copy link

GiorgosXou commented Jul 10, 2023

It worked just fine, somehow same issue appeared from nowhere and now I doesn't start

** (spotube:8061): WARNING **: 14:54:12.897: libsecret_error: \xd3_9`D\u007f
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Missing extension byte (at offset 1)
#0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747)
#1      Utf8Decoder.convert (dart:convert/utf.dart:351)
#2      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:503)
#3      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:478)
#4      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#5      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310)
<asynchronous suspension>
#6      PersistedStateNotifier.initializeBoxes (package:spotube/utils/persisted_state_notifier.dart:57)
<asynchronous suspension>
#7      main (package:spotube/main.dart:123)
<asynchronous suspension>

@pidario
Copy link

pidario commented Jul 10, 2023

I figured that was the case about NetworkManager.

Anyway, I mentioned keepassxc just because it implements freedesktop secret service and it basically acts as a keyring.
In my case, where I don't have DE running but just a WM, Keepassxc is a nice alternative. And about not storing anything locally because everything is cloud based: take my piece of advice and don't use a cloud base password manager, even if its self hosted but with this I'm going off-topic.

Thank you for Spotube, I hope this can be fixed soon!

@GiorgosXou
Copy link

GiorgosXou commented Jul 10, 2023

Sorry for spamming, somehow it got fixed for me after an update

@livingsilver94
Copy link

I'm facing this issue with the Flatpak edition. There's nothing I can install to fix the issue since it's sandboxed.

@KRTirtho
Copy link
Owner

I'm facing this issue with the Flatpak edition. There's nothing I can install to fix the issue since it's sandboxed.

You can install gnome-keyring as it implements org.freedesktop.secrets which is used by Spotube to store critical information

@Coburn
Copy link

Coburn commented Jul 18, 2023

This behavior happens for me on my laptop after wake from suspend. It also happens if I close the app but leave it running in the taskbar. I believe I am using a Gnome extension for taskbar controls. Basically, Spotube displays in some sort of minimal way after close or suspend, but will no longer play music. I have to log out or restart.
Screenshot from 2023-07-18 06-51-43

@Coburn
Copy link

Coburn commented Jul 18, 2023

Fascinating. A sudo killall spotube also fixes it. But even though Spotube is closed, it is glomming 40% of my CPU!
Screenshot from 2023-07-18 06-54-47

@KRTirtho KRTirtho changed the title It opens like a transparent window [Linux] Libsecret provider not installed Jul 21, 2023
@KRTirtho KRTirtho pinned this issue Jul 21, 2023
@KRTirtho KRTirtho changed the title [Linux] Libsecret provider not installed [Linux] Transparent or Black window. Libsecret provider not installed Jul 21, 2023
@KRTirtho KRTirtho mentioned this issue Jul 21, 2023
1 task
@KRTirtho
Copy link
Owner

For now, only way to solve it temporarily is to install gnome-keyring as it by default on startup asks to unlock the keyring.
But other libsecret providers doesn't seem do this. As Spotube can't unlock the keyring by it self, it crashes thinking something went wrong

@qxb3
Copy link

qxb3 commented Jul 21, 2023

@KRTirtho hello! sorry for the duplicate issue, i did not see this one. Anyway mine seems to work now but when i close it and put it to a background and try to reopen spotube again the black thing i was talking about appear. Is that normal? its not really an issue but i kinda want to reopen it and it will just use the spotube session that is already open.

@KRTirtho
Copy link
Owner

If it's already running in the background, you can't open a new instance. You've to kill the old instance from the task bar or "Show/Hide" from the task bar icon

@KRTirtho
Copy link
Owner

If you don't want to minimize to system tray on close, you can change that behavior from Settings

@Coburn
Copy link

Coburn commented Jul 21, 2023

Sorry this is not a thorough check but my system does report that gnome-keyring is already the newest version

@ghost
Copy link

ghost commented Jul 24, 2023

KeepassXC is password manager only ig. gnome-keyring or kwallet these are secret managers (key manager) libsecret is used by applications to store secrets e.g. encryption keys, ssh keys, API keys etc... On the other hand, KeepassXC, Bitwarden etc are password managers used by users (not application at all) to store credentials. The password manager might use libsecret to store their encryption keys. But since most of them are cloud based, nothing is stored locally nowadays

KeePassXC can be used as a Secret Service Agent:

image

I had this problem.

In case there is no Secret Service Agent on the dbus, spotube should show an error to the user, not just crash.

@KRTirtho
Copy link
Owner

The problem is it is not a direct dependency of Spotube and it's actually used by a plugin that we use. But that plugin doesn't expose any API to handle that kind of error. I think I've to report that to plugin author(s)

@KRTirtho
Copy link
Owner

Check juliansteenbakker/flutter_secure_storage#545

@KRTirtho KRTirtho moved this to Discussion in Spotube Board Aug 2, 2023
@KRTirtho
Copy link
Owner

KRTirtho commented Aug 2, 2023

Ok until plugin upstream provides any fixes, Spotube will fallback to non encrypted storage. But it will warn the user about the risk

@KRTirtho KRTirtho moved this from Discussion to In progress in Spotube Board Aug 2, 2023
@KRTirtho
Copy link
Owner

KRTirtho commented Aug 2, 2023

The fix is currently running in the pipeline after 10 mins it should be available in the https://spotube.krtirtho.dev/other-downloads/nightly-downloads

@KRTirtho
Copy link
Owner

KRTirtho commented Aug 4, 2023

v3.0.1 provides a temporary fix. Please check if it works for you

@calm3285
Copy link
Author

calm3285 commented Aug 4, 2023

it works now, but the network manager error logs persist

@calm3285 calm3285 closed this as completed Aug 4, 2023
@github-project-automation github-project-automation bot moved this from In progress to Done in Spotube Board Aug 4, 2023
@AgostinoA
Copy link

[Secret Service Agent:](libsecret-1.so.0: undefined symbol: g_task_set_name)
Now it doesn't work for me anymore

@KRTirtho KRTirtho unpinned this issue Aug 7, 2023
@Moilleadoir
Copy link

Moilleadoir commented Aug 19, 2023

libsecret has always been installed, but at some stage Spotube flatpak just started showing a black screen.
Manjaro Linux, Cinnamon desktop.

$ /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=spotube --file-forwarding com.github.KRTirtho.Spotube @@u %u @@
Gtk-Message: 16:38:31.384: Failed to load module "xapp-gtk3-module"
Gtk-Message: 16:38:31.384: Failed to load module "canberra-gtk-module"
package:media_kit_libs_linux registered.
flutter: media_kit: WARNING: package:media_kit_native_event_loop not found.
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /app/spotube/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)

Edit: I’ve installed the AUR version and it works, so this is a problem with the Flatpak version not being able to access the keyring.

@KRTirtho KRTirtho moved this from Done to Deployed in Spotube Board Aug 26, 2023
@m3thm4th
Copy link

m3thm4th commented Nov 4, 2023

As @Moilleadoir noted quite some time ago, this is still an issue on the Flatpak version. Do we need to open a new issue for that @KRTirtho?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Deployed
Development

No branches or pull requests