question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] MSAL storage doesn't work on Linux system with XFCE desktop

See original GitHub issue

Logs and network traces Without logs or traces, it is unlikely that the team can investigate your issue. Capturing logs and network traces is described in Logging wiki.

Which version of MSAL.NET are you using?

<PackageReference Include="Microsoft.Identity.Client" Version="4.46.2" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="2.23.0" />

Platform

PS /home/Friday> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.7
PSEdition                      Core
GitCommitId                    7.2.7
OS                             Linux 5.4.0-1095-azure #101~18.04.1-Ubuntu SMP Wed Oct 26 21:14:54 UTC 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS /home/Friday> dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.402
 Commit:    6862418796

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/6.0.402/

global.json file:
  Not found

Host:
  Version:      6.0.10
  Architecture: x64
  Commit:       5a400c212a

.NET SDKs installed:
  2.1.818 [/usr/share/dotnet/sdk]
  3.1.424 [/usr/share/dotnet/sdk]
  5.0.408 [/usr/share/dotnet/sdk]
  6.0.402 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.30 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.30 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.30 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.17 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.30 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.30 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.17 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.10 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Download .NET:
  https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
  https://aka.ms/dotnet/runtimes-sdk-info

What authentication flow has the issue? All the flows use token cache

Other?

Is this a new or existing app? b. The app is in production, I haven’t upgraded MSAL, but started seeing this issue.

Repro

  • Login a Linux machine via VNC with keyring installed
gnome-keyring is already the newest version (3.28.0.2-1ubuntu1.18.04.1).
  • and XFCE desktop configured
$ echo $XDG_CURRENT_DESKTOP 
XFCE
  • In powershell, run
Import-Module Az.Account

Expected behavior Import-Module Az.Accounts sucessfully

Actual behavior Error message ** Message: 05:05:09.096: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface ‘org.freedesktop.Secret.Collection’ on object at path /org/freedesktop/secrets/collection/login

Possible solution

Additional context / logs / screenshots / links to code

Add any other context about the problem here, such as logs and screenshots, and even links to code.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
msJinLeicommented, Nov 28, 2022

@rayluo @bgavrilMS Its works! Thanks. Shall I close the bug?

1reaction
msJinLeicommented, Nov 23, 2022

Actual behavior Error message ** Message: 05:05:09.096: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface ‘org.freedesktop.Secret.Collection’ on object at path /org/freedesktop/secrets/collection/login

Hi @msJinLei - do you know Azure CLI supports this? I wonder if MSAL py has the same issue or not?

If it failed with a DBus error, the keyring service is likely not up and running. And then AzureCLI/MsalPython would likely also fail with the same error. It doesn’t harm if @msJinLei can try Azure CLI and confirm it. (Alternatively, if you do not have Azure CLI readily available, you can try pip install msal-extensions and then download and run this sample.)

The cause might be that @msJinLei was using that Linux box remotely via VNC. Remote session tends to have the keyring disabled. There might be a way to manually start the keyring in a headless session, by your mileage may vary.

@rayluo Thanks, I will try the method you propose!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] CIFS-related issues in XFCE
Hello, first post from a long time XFCE fan and user. I have an old network attached storage device that is managed by...
Read more >
xfdesktop seems to be broken / Applications & Desktop ...
I've just done a full upgrade, rebooted, and my desktop has lost wallpaper (at least) and compositing appears to be restricted to window...
Read more >
Does anyone here cross compile for arm64 musl? do you ...
I'm not using musl, but I am cross-compiling for an ARM64 system on an AMD64. In general I would say that cross-compilation works...
Read more >
Desktop environment wasn't detected (i3 with x11) #186792
Linux: An OS keyring couldn't be identified for storing the encryption related data in your current desktop environment #187338. Open.
Read more >
XFCE running but core features not working
This is a well-known bug in Xfce 4.10 and it happens when for some reason xfwm4 exits and isn't being automatically restarted.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found