UnstoppableSwap / unstoppableswap-gui

Graphical User Interface (GUI) For Trustless Cross-Chain XMR<>BTC Atomic Swaps
https://unstoppableswap.net/
MIT License
278 stars 15 forks source link

Daemon not starting on Tails Linux using AppImage (v0.6.4) #225

Open symb10sis opened 1 month ago

symb10sis commented 1 month ago

Expected Behavior

When starting the AppImage (v0.6.4) on Tails Linux the daemon should start normally.

Current Behavior

When starting the AppImage (v0.6.4) it fails to connect to the UnstoppableSwap Socket API and fails to initialize the Bitcoin wallet which then results in not starting the swap daemon at all.

Steps to Reproduce

  1. Run Tails Linux 6.7

  2. Let Tails connect to the Tor network using the builtin "Tor Connection" assisstant (https://tails.net/doc/anonymous_internet/tor/index.en.html)

  3. Run the UnstoppableSwap-0.6.4.AppImage

    [1728069540972] DEBUG (14037 on amnesia): Connecting to UnstoppableSwap Socket API
        host: "api.unstoppableswap.net"
        path: "/api/socket.io"
        agent: false
    [1728069541015] ERROR (14037 on amnesia): Failed to make swap binary executable
        binary: {
          "dirPath": "/tmp/.mount_Unstopsp6v5g/resources/bin",
          "fileName": "0_13_4_swap"
        }
        err: {
          "type": "Error",
          "message": "EROFS: read-only file system, chmod '/tmp/.mount_Unstopsp6v5g/resources/bin/0_13_4_swap'",
          "stack":
              Error: EROFS: read-only file system, chmod '/tmp/.mount_Unstopsp6v5g/resources/bin/0_13_4_swap'
          "errno": -30,
          "code": "EROFS",
          "syscall": "chmod",
          "path": "/tmp/.mount_Unstopsp6v5g/resources/bin/0_13_4_swap"
        }
    [1728069541093] ERROR (14037 on amnesia): Attempted monero-wallet-rpc kill using command failed
        e: {
          "code": 123,
          "killed": false,
          "signal": null,
          "cmd": "ps aux | grep 'monero-wallet-rpc' | grep -v 'grep' | awk '{print $2}' | xargs kill -9",
          "stdout": "",
          "stderr": "\nUsage:\n kill [options] <pid> [...]\n\nOptions:\n <pid> [...]            send signal to every <pid> listed\n -<signal>, -s, --signal <signal>\n                        specify the <signal> to be sent\n -q, --queue <value>    integer value to be sent with the signal\n -l, --list=[<signal>]  list all signal names, or convert one to a name\n -L, --table            list all signal names in a nice table\n\n -h, --help     display this help and exit\n -V, --version  output version information and exit\n\nFor more details see kill(1).\n"
        }
    [1728069541107] INFO (14139 on amnesia): Spawned CLI process
        args: [
          "./0_13_4_swap",
          "--json",
          "--debug",
          "--data-base-dir",
          "/home/amnesia/.local/share/xmr-btc-swap/cli",
          "start-daemon",
          "--server-address",
          "0.0.0.0:1234",
          "--electrum-rpc",
          "tcp://blockstream.info:110"
        ]
        cwd: "/tmp/.mount_Unstopsp6v5g/resources/bin"
        subCommand: "start-daemon"
    [1728069541112] ERROR (14037 on amnesia): Failed to make tor binary executable
        torBinary: {
          "dirPath": "/tmp/.mount_Unstopsp6v5g/resources/bin",
          "fileName": "tor"
        }
        err: {
          "type": "Error",
          "message": "EROFS: read-only file system, chmod '/tmp/.mount_Unstopsp6v5g/resources/bin/tor'",
          "stack":
              Error: EROFS: read-only file system, chmod '/tmp/.mount_Unstopsp6v5g/resources/bin/tor'
          "errno": -30,
          "code": "EROFS",
          "syscall": "chmod",
          "path": "/tmp/.mount_Unstopsp6v5g/resources/bin/tor"
        }
    [1728069541125] ERROR (14037 on amnesia): Failed to spawn tor
        torBinary: {
          "dirPath": "/tmp/.mount_Unstopsp6v5g/resources/bin",
          "fileName": "tor"
        }
        err: {
          "type": "Error",
          "message": "spawn ./tor ENOENT",
          "stack":
              Error: spawn ./tor ENOENT
                  at Process.onexit (node:internal/child_process:283:19)
                  at onErrorNT (node:internal/child_process:476:16)
                  at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
          "errno": -2,
          "code": "ENOENT",
          "syscall": "spawn ./tor",
          "path": "./tor",
          "spawnargs": []
        }
    [1728069541125] ERROR (14037 on amnesia): Failed to fully initiate app
        error: "Error: spawn ./tor ENOENT"
    [1728069541261] DEBUG (14037 on amnesia): CLI stdout
        subCommand: "start-daemon"
        data: "{\"timestamp\":\"2024-10-04T19:19:01.258882764Z\",\"level\":\"INFO\",\"fields\":{\"message\":\"Logging initialized to /home/amnesia/.local/share/xmr-btc-swap/cli/mainnet/logs\"}}\n"
    [1728069541267] DEBUG (14037 on amnesia): CLI stdout
        subCommand: "start-daemon"
        data: "{\"timestamp\":\"2024-10-04T19:19:01.267446629Z\",\"level\":\"DEBUG\",\"fields\":{\"message\":\"Reading in seed from /home/amnesia/.local/share/xmr-btc-swap/cli/mainnet/seed.pem\"}}\n"
    [1728069541291] ERROR (14037 on amnesia): Failed to connect to UnstoppableSwap Socket API
        host: "api.unstoppableswap.net"
        path: "/api/socket.io"
        err: {
          "type": "l",
          "message": "xhr poll error",
          "stack":
              Error: xhr poll error
                  at g.onError (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1156753)
                  at m.<anonymous> (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1160567)
                  at n.emit (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1235451)
                  at m.onError (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1162123)
                  at Timeout._onTimeout (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1161854)
                  at listOnTimeout (node:internal/timers:569:17)
                  at process.processTimers (node:internal/timers:512:7)
          "description": 0,
          "context": {
            "UNSENT": 0,
            "OPENED": 1,
            "HEADERS_RECEIVED": 2,
            "LOADING": 3,
            "DONE": 4,
            "readyState": 4,
            "responseText": "Error: connect ECONNREFUSED 213.199.56.68:443\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)",
            "responseXML": "",
            "status": 0,
            "statusText": {
              "errno": -111,
              "code": "ECONNREFUSED",
              "syscall": "connect",
              "address": "213.199.56.68",
              "port": 443
            }
          }
        }
    [1728069541291] DEBUG (14037 on amnesia): Attempting to send snackbar alert to renderer
        message: "Failed to connect to public registry (xhr poll error)"
        variant: "error"
        autoHideDuration: 10000
        key: "xhr poll error"
    [1728069541291] DEBUG (14037 on amnesia): Main window is loading, waiting for it to finish before sending snackbar alert
    [14077:1004/191902.402913:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
    [14077:1004/191902.404977:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
    [1728069542697] DEBUG (14037 on amnesia): CLI stdout
        subCommand: "start-daemon"
        data: "Error: Failed to initialize Bitcoin wallet"
    [1728069542699] DEBUG (14037 on amnesia): CLI stdout
        subCommand: "start-daemon"
        data: "\n\nCaused by:\n    0: "
    [1728069542699] DEBUG (14037 on amnesia): CLI stdout
        subCommand: "start-daemon"
        data: "Failed to initialize Electrum RPC client"
    [1728069542700] DEBUG (14037 on amnesia): CLI stdout
        subCommand: "start-daemon"
        data: "\n    1: Connection refused (os error 111)\n"
    [1728069542710] INFO (14037 on amnesia): CLI excited
        subCommand: "start-daemon"
        code: 1
        signal: null
    [1728069542755] ERROR (14037 on amnesia): Attempted monero-wallet-rpc kill using command failed
        e: {
          "code": 123,
          "killed": false,
          "signal": null,
          "cmd": "ps aux | grep 'monero-wallet-rpc' | grep -v 'grep' | awk '{print $2}' | xargs kill -9",
          "stdout": "",
          "stderr": "\nUsage:\n kill [options] <pid> [...]\n\nOptions:\n <pid> [...]            send signal to every <pid> listed\n -<signal>, -s, --signal <signal>\n                        specify the <signal> to be sent\n -q, --queue <value>    integer value to be sent with the signal\n -l, --list=[<signal>]  list all signal names, or convert one to a name\n -L, --table            list all signal names in a nice table\n\n -h, --help     display this help and exit\n -V, --version  output version information and exit\n\nFor more details see kill(1).\n"
        }
    [1728069542756] WARN (14037 on amnesia): swapProcessExited called on a swap that is not running
    [1728069542756] ERROR (14037 on amnesia): RPC server has stopped with code 1
    [1728069542913] ERROR (14037 on amnesia): Failed to connect to UnstoppableSwap Socket API
        host: "api.unstoppableswap.net"
        path: "/api/socket.io"
        err: {
          "type": "l",
          "message": "xhr poll error",
          "stack":
              Error: xhr poll error
                  at g.onError (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1156753)
                  at m.<anonymous> (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1160567)
                  at n.emit (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1235451)
                  at m.onError (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1162123)
                  at Timeout._onTimeout (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1161854)
                  at listOnTimeout (node:internal/timers:569:17)
                  at process.processTimers (node:internal/timers:512:7)
          "description": 0,
          "context": {
            "UNSENT": 0,
            "OPENED": 1,
            "HEADERS_RECEIVED": 2,
            "LOADING": 3,
            "DONE": 4,
            "readyState": 4,
            "responseText": "Error: connect ECONNREFUSED 213.199.56.68:443\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)",
            "responseXML": "",
            "status": 0,
            "statusText": {
              "errno": -111,
              "code": "ECONNREFUSED",
              "syscall": "connect",
              "address": "213.199.56.68",
              "port": 443
            }
          }
        }
    [14077:1004/191905.011848:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
    [1728069545246] ERROR (14037 on amnesia): Failed to connect to UnstoppableSwap Socket API
        host: "api.unstoppableswap.net"
        path: "/api/socket.io"
        err: {
          "type": "l",
          "message": "xhr poll error",
          "stack":
              Error: xhr poll error
                  at g.onError (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1156753)
                  at m.<anonymous> (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1160567)
                  at n.emit (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1235451)
                  at m.onError (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1162123)
                  at Timeout._onTimeout (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1161854)
                  at listOnTimeout (node:internal/timers:569:17)
                  at process.processTimers (node:internal/timers:512:7)
          "description": 0,
          "context": {
            "UNSENT": 0,
            "OPENED": 1,
            "HEADERS_RECEIVED": 2,
            "LOADING": 3,
            "DONE": 4,
            "readyState": 4,
            "responseText": "Error: connect ECONNREFUSED 213.199.56.68:443\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)",
            "responseXML": "",
            "status": 0,
            "statusText": {
              "errno": -111,
              "code": "ECONNREFUSED",
              "syscall": "connect",
              "address": "213.199.56.68",
              "port": 443
            }
          }
        }
    [1728069547306] DEBUG (14037 on amnesia): Attempting to send snackbar alert to renderer
        message: "Failed to connect to public registry (xhr poll error)"
        variant: "error"
        autoHideDuration: 10000
        key: "xhr poll error"
    [1728069547306] DEBUG (14037 on amnesia): Sending snackbar alert to renderer
        message: "Failed to connect to public registry (xhr poll error)"
        variant: "error"
        autoHideDuration: 10000
        key: "xhr poll error"
    [1728069549053] ERROR (14037 on amnesia): Failed to connect to UnstoppableSwap Socket API
        host: "api.unstoppableswap.net"
        path: "/api/socket.io"
        err: {
          "type": "l",
          "message": "xhr poll error",
          "stack":
              Error: xhr poll error
                  at g.onError (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1156753)
                  at m.<anonymous> (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1160567)
                  at n.emit (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1235451)
                  at m.onError (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1162123)
                  at Timeout._onTimeout (/tmp/.mount_Unstopsp6v5g/resources/app.asar/dist/main/main.js:2:1161854)
                  at listOnTimeout (node:internal/timers:569:17)
                  at process.processTimers (node:internal/timers:512:7)
          "description": 0,
          "context": {
            "UNSENT": 0,
            "OPENED": 1,
            "HEADERS_RECEIVED": 2,
            "LOADING": 3,
            "DONE": 4,
            "readyState": 4,
            "responseText": "Error: connect ECONNREFUSED 213.199.56.68:443\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)",
            "responseXML": "",
            "status": 0,
            "statusText": {
              "errno": -111,
              "code": "ECONNREFUSED",
              "syscall": "connect",
              "address": "213.199.56.68",
              "port": 443
            }
          }
        }
    [1728069553062] DEBUG (14037 on amnesia): Preventing Electron from quitting, stopping CLI, Tor and their child processes first
    [1728069553062] INFO (14037 on amnesia): Letting Electron quit, there are no running child processes

Your Environment

Tails Linux 6.7 (which is connected to Tor using the Tails built in Tor connection - not using the one in UnstoppableSwap GUI)

binarybaron commented 4 days ago

Hey, sorry for the late reply. We are working on a new version of the GUI which will have support for Tails and Whonix.