---
title: Troubleshooting
toc_max_heading_level: 2
description: Fix the common failures of Volumio plugins, by symptom. Each entry gives the exact message from volumio-plugin check, deploy or the device log, its cause and its fix.
---

Fix the common failures of a plugin, by symptom. Each entry starts with the exact message you see, from `volumio-plugin check`, the CI, `deploy` or the device log. Find your message with your browser's search.

A `check` finding has this shape: the severity, the rule id, the file and line, the message, and a `fix:` line.

```txt
  error   G2.js.console-log  index.js:82  console.log bypasses the Volumio logger
        fix: Log through this.logger
```

## Code

### console.log bypasses the Volumio logger

Rule `G2.js.console-log`. The plugin writes with `console.log`, which skips Volumio's log.

Replace each `console.log` with `this.logger.info`, `warn`, `error` or `debug`. See [Log from a plugin](/plugins/how-to/logging).

### exec runs the command through a shell

Rule `G2.js.shell`. The plugin runs a command with `exec`, or with `shell: true`. A value from the settings can then run as shell code.

Pass the program and its arguments as a list to `execFile` or `spawn`:

```js
const { execFile } = require('child_process');
execFile('/usr/bin/amixer', ['sset', 'Master', `${volume}%`], (error) => {
  if (error) this.logger.error(`my_plugin: amixer failed: ${error.message}`);
});
```

### execSync blocks the backend while the command runs

Rule `G2.js.sync-exec`. The plugin calls `execSync`, `execFileSync` or `spawnSync`. Volumio's backend stops until the command ends, so playback and the web UI freeze.

Use `execFile` or `spawn` and act on the result in their callback.

### process.exit stops the whole backend

Rule `G2.js.process-exit`. A plugin runs inside Volumio's backend, so `process.exit` stops the whole player.

Throw an error, or reject the promise the method returns. Volumio then reports the failure.

### process.on('uncaughtException') changes how the whole backend fails

Rule `G2.js.global-handler`. The plugin adds a process-wide handler for `uncaughtException` or `unhandledRejection`. It changes error handling for every plugin.

Handle each error where it happens: in a callback, in `.fail` of a kew promise, or in `try` and `catch`.

### replacing commandRouter.pushState changes Volumio for every plugin

Rule `G2.js.command-router-override`. The plugin assigns a new function to a command router method.

Remove the assignment. If the plugin needs something the command router does not offer, ask in the [Plugins forum](https://community.volumio.com/c/plugins/53).

### an AWS access key in the package

Rule `G2.secret`. A file of the plugin holds a private key or a service token. The message names the kind of secret.

Remove the secret and revoke it: once pushed, it is public. Let the user type the key in the plugin's settings page, or read it from the device at runtime.

## install.sh

### install.sh does not stop on the first error

Rule `G2.shell.set-e`. `install.sh` does not start with `set -e`. Volumio runs the script with `sh`, so a `-e` on the shebang line does not count.

Add `set -eu` as the first command after the shebang line.

### pipefail stops install.sh: Volumio runs it with sh (dash), which has no pipefail

Rule `G2.shell.pipefail`. Volumio runs `install.sh` with dash, and dash stops at `set -o pipefail`.

Remove `pipefail` and use `set -eu`.

### install.sh installs libfoo, not declared in system.apt

Rule `G2.shell.package-manager`. `install.sh` installs a Debian package that `volumio-plugin.json` does not list.

Add the package to `system.apt`:

```json title="volumio-plugin.json"
"system": { "apt": ["libfoo"] }
```

### install.sh runs a package manager

Rule `G2.shell.package-manager`. `install.sh` runs npm, yarn, pnpm, pip or `dpkg -i`.

List npm packages in `package.json`: the build puts them in the package. Install Debian packages with `apt-get install -y <package>`, listed in `system.apt`.

### a download with no checksum check

Rule `G2.shell.download`. `install.sh` downloads a file with `wget` or `curl` and never checks it.

Check the file with `sha256sum -c` before you use it:

```sh
wget -O /tmp/tool.tar.gz https://example.com/tool-1.2.0.tar.gz
echo "<sha256>  /tmp/tool.tar.gz" | sha256sum -c
```

### || true hides a failure

Rule `G2.shell.or-true`. A command ends with `|| true`, so `install.sh` goes on after it fails.

Let the command fail. When a failure is expected, test for it with `if`.

### install.sh writes sudoers rules

Rule `G2.shell.sudoers`. `install.sh` writes under `/etc/sudoers`.

Remove it. If the plugin needs a privilege Volumio does not give, ask in the [Plugins forum](https://community.volumio.com/c/plugins/53).

## Manifest and files

### id must match pattern

```txt
id must match pattern "^[A-Za-z0-9][A-Za-z0-9_]{1,63}$"
```

Rule `G1.schema`. The plugin's `id` has a hyphen or another character the build cannot use.

Use 2 to 64 letters, digits and underscores, such as `my_plugin`.

### function "my-new-thing" is not in the registry

Rule `G1.function`, a warning. `function` in `volumio-plugin.json` is not in the [function registry](https://github.com/volumio/volumio-plugin-sdk/blob/main/registry/functions.json). The warning does not block the plugin.

Use a function from the registry when one fits. Otherwise keep yours, and name it in the [Plugins forum](https://community.volumio.com/c/plugins/53) so a moderator adds it.

### engines.volumio "four" is not a semver range

Rule `G1.engines`. `engines.volumio` is not a version range.

Use a range such as `>=4.0.0 <5.0.0`.

### package.json sets name, which is generated from volumio-plugin.json

Rule `G1.package-json`. `package.json` sets `name`, `version` or `volumio_info`. The build writes them from `volumio-plugin.json`.

Remove the field from `package.json`, and set its value in `volumio-plugin.json`.

### README is missing, LICENSE is missing

Rules `G1.file.readme` and `G1.file.license`. The plugin folder has no README or no LICENSE file.

Add a `README.md` that says what the plugin does and how to set it up. Add a `LICENSE` that matches the `license` field.

## Build

### no package-lock.json: the dependencies are not reproducible

Rule `G3.lockfile`. The plugin has no `package-lock.json`, so each build can install different versions.

Run `npm install` in the plugin folder and commit `package-lock.json`.

### native module built for amd64, not armhf

Rule `G3.native-arch`. A dependency ships a compiled `.node` module for another processor.

Let the CI build the plugin: it builds inside a container for each architecture. To test on a device, build the same way with `scripts/build.sh`. See [Test on a Volumio device](/plugins/how-to/test-on-a-device#plugins-with-native-modules).

### A dependency with a `high` or `critical` advisory

Rule `G2.audit`. `npm audit` finds a high or critical advisory in a production dependency. The message names the package, the affected versions and the advisory.

Run `npm audit fix`, or update the package. When no fixed version exists, replace the package.

### A dependency with no licence

Rule `G2.licence.missing`. A production dependency has no licence, so it cannot be redistributed.

Replace the dependency. GPL-family and unknown licences give the warnings `G2.licence.copyleft` and `G2.licence.unknown`, which do not block.

## Deploy

### Talking to a device needs Node 22 or later

`deploy` and `logs` use the WebSocket built into Node.js 22.

Install Node.js 22 or later. Check your version with `node --version`.

### Cannot connect to volumio.local

Your computer cannot reach the device at that address.

Check that the device is on and on the same network. Try its IP address instead of `volumio.local`: you find it in the Volumio web UI, under **Settings** › **Network**.

### Cannot connect to 192.168.1.20 (no answer within 10s)

The device accepted the connection but its backend did not answer. It may still be booting.

Wait a minute and run the command again.

### The device could not install my_plugin

The device downloaded the package but its install failed. The lines after the message come from the device: most often `install.sh` failed.

Read those lines and fix `install.sh`. If the device could not download the package, allow Node.js to accept incoming connections in your computer's firewall.

### my_plugin did not start on 192.168.1.20: the log above says why

The plugin installed but `onStart` failed or did not resolve within 30 seconds.

Read the device log printed above the message. The next two entries cover the most common causes.

## Device log

### does not return adequate promise

A method Volumio calls is `async` or returns a native `Promise`. Volumio accepts only kew promises. When `onStart` fails this check, the plugin stays failed.

Make the method a plain function that returns a kew promise. See [How a plugin runs](/plugins/concepts/how-a-plugin-runs#kew-promises).

### The plugin starts at boot only sometimes

At boot Volumio waits at most 30 seconds for all plugins' `onStart`, then goes on without the slow ones. A plugin that waits for the network or a login in `onStart` misses that time.

Resolve `onStart` at once and do the slow work afterwards. Retry a login when the network comes back.

## Still stuck?

Ask in the [Plugins forum](https://community.volumio.com/c/plugins/53). Include:

- The plugin's repository or pull request.
- The full output of `volumio-plugin check .` or `deploy`.
- The device log while the problem happens: `npx --package=@volumio/plugin-sdk volumio-plugin logs <device> --seconds 60`.
- The Volumio version, from **Settings** › **System**.
