Open al-cheb opened 3 years ago
We will report this question to owner of MSAL extension.
Hi @al-cheb - what Ubuntu distro should I install to reproduce this? The desktop image or the server image or some other image?
Hi @al-cheb - what Ubuntu distro should I install to reproduce this? The desktop image or the server image or some other image?
Hi, @bgavrilMS. We use an image template from Azure marketplace:
"imageReference": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "18.04-LTS",
"version": "latest"
}
Ok, so I think what's happening here is that the internal secret storage library MsalCacheExtension is unable to write to the dbus due to the error above. The root cause of the error is related to the fact that dbus
requires X11, so the error it expected on a CI machine.
AzureCLI and PowerShell normally detect this kind of error (via the ValidatePersistence
call), and will fallback to storing secrets in a plaintext file, as far as I know. @erich-wang can keep me honest here.
What happens here though is that Import-Module Az.Accounts
outputs some messages on stderr, via standard tracing mechanism. And then pwsh -command
thinks Import-Module
has failed because it logged messages to stderr. I am not a pwsh expert, but there should be a way to ignore stderr?
For anyone else looking into this, try installing the following packages
sudo apt install gnupg2 pass
We're seeing the same issue. @odero 's workaround did not work for us.
This just started showing up in our AzurePowerShell@4
tasks in Azure pipelines, running on Ubuntu 18.04. It occurs as part of the task setup, before any user powershell code is run. Since it's written to stdout, all builds using Powershell tasks are failing.
/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command . '/home/vsts/work/_temp/1703e74e-73cf-49f0-ac09-b80b429464eb.ps1'
Saved!
Import-Module -Name /usr/share/az_7.5.0/Az.Accounts/2.9.0/Az.Accounts.psd1 -Global
** Message: 15:52:37.608: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
** Message: 15:52:37.615: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
** Message: 15:52:37.618: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue
Clear-AzContext -Scope Process
...
We're seeing the same issue.
Any updates on a resolution or workarounds other than @odero's?
@johncrim and @mtwelve , I am reading this issue https://github.com/Foundry376/Mailspring/issues/681. Could you try whether sudo apt install gnome-keyring
can solve this issue?
We are currently experiencing this issue in our pipeline since this week. After investigation we found out that the only difference between a successful and a failed wrong is the vm image version.
Successful run, Environment: ubuntu-18.04, Version: 20220626.1 Failed run, Environment: ubuntu-18.04, Version: 20220710.1
@dingmeng-xue - thank you for the possible patch. It's not convenient to test that out right now, but I can confirm that switching to ubuntu 20.04 makes the error go away.
Description
After installing
dbus-user-session
package on Ubuntu 18.04 ,Import-Module Az.Accounts
has returned** Message: 17:43:58.624: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
which has broken our CI due to writing to the stderr. This issue doesn't reproduce on Ubuntu 20.04 where thedbus-user-session
package is pre-installed by default or using sudo.Steps to reproduce
Environment data
Module versions
Error output