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

swa [login|deploy] fails with Cannot spawn a message bus without a machine-id in devcontainer #820

Open
FelixZY opened this issue Mar 28, 2024 · 0 comments

Comments

@FelixZY
Copy link

FelixZY commented Mar 28, 2024

Describe the bug

SWA CLI commands fail with Cannot spawn a message bus without a machine-id when executing in a debian (mcr.microsoft.com/devcontainers/base:bullseye) devcontainer.

$ npx swa login

Welcome to Azure Static Web Apps CLI (1.1.7)

Checking Azure session...
✖ Failed to setup project: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file “/var/lib/dbus/machine-id”: No such file or directory

✖ If you believe this behavior is unexpected, please raise a GitHub issue at:
  https://github.com/Azure/static-web-apps-cli/issues/new/choose
$ npx swa deploy

Welcome to Azure Static Web Apps CLI (1.1.7)

Deploying front-end files from folder:
  /workspace/out

Consider providing api-language and version using --api-language and --api-version flags,
    otherwise default values apiLanguage: node and apiVersion: 16 will apply
Checking Azure session...
✖ Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file “/var/lib/dbus/machine-id”: No such file or directory

To Reproduce
Steps to reproduce the behavior:

  1. Set up a devcontainer based on mcr.microsoft.com/devcontainers/base:bullseye
  2. Install swa cli from npm
  3. run swa login or swa deploy (note: you may need to install libsecret-1-dev)

Expected behavior
Successful operation; no error.

Desktop (please complete the following information):

  • Host
    • OS: Ubuntu 20.04.6 LTS (focal) (64-bit)
    • Docker: Docker version 25.0.4, build 1a576c5
  • Devcontainer
    • OS: Debian 11
    • Node: v18.19.1
    • NPM: 10.2.4
    • SWA: 1.1.7

Additional context

Some solutions suggest exposing the host computer's /var/lib/dbus/machine-id to the devcontainer. I would prefer not doing so as that does not seem like a cross-platform solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant