bitwarden / clients

Bitwarden client apps (web, browser extension, desktop, and cli).
https://bitwarden.com
Other
8.97k stars 1.17k forks source link

Run Bitwarden Desktop from VMWare Fusion on M1 Mac #8807

Open wake-0 opened 4 months ago

wake-0 commented 4 months ago

Steps To Reproduce

  1. Install VMWare Fusion on a Mac (M1)
  2. Create an Ubuntu VM with version: Ubuntu Noble Numbat (development branch)
  3. Follow the instructions: https://contributing.bitwarden.com/getting-started/clients/
  4. Follow the instructions: https://contributing.bitwarden.com/getting-started/clients/desktop/
  5. In the file apps/desktop/desktop_native/index.js change the case 'arm64' from 'musl' to 'gnu':
    case 'arm64':
         localFileExisted = existsSync(
    // old:  join(__dirname, 'desktop_native.linux-arm64-musl.node')
             join(__dirname, 'desktop_native.linux-arm64-gnu.node')
         )
         try {
           if (localFileExisted) {
    // old:   nativeBinding = require('./desktop_native.linux-arm64-musl.node')
              nativeBinding = require('./desktop_native.linux-arm64-gnu.node')
           } else {
    // old:    nativeBinding = require('@bitwarden/desktop-native-linux-arm64-musl')
               nativeBinding = require('@bitwarden/desktop-native-linux-arm64-gnu')
           }
         } ...
  6. Build the native client with npm run build in the desktop_native folder
  7. Try to run the application from the desktop folder with npm run electron

When dependencies are needed - download them.

Expected Result

A running Bitwarden desktop client.

Actual Result

image

I run the npx wait-on ./build/main.js separate. This worked. But running the npx electron --inspect=5858 ./build or the /home/wake/projects/clients/node_modules/electron/dist/electron ./build leads to a segmentation fault.

image

Screenshots or Videos

No response

Additional Context

I tried to attach a tracing by using:

sudo strace -f -o /tmp/electron-sudo.strace /home/wake/projects/clients/node_modules/electron/dist/electron ./build --no-sandbox

But the strace is quite hard to understand. Do you have any advice or solution for the problem? Thanks in advance.

Operating System

Linux

Operating System Version

Ubuntu 24.04 (VMWare on Mac M1)

Installation method

Other

Build Version

Commit: 83b3fd83e48d0fa

Issue Tracking Info

Greenderella commented 1 month ago

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!