GPIO plugin causing Volumio to stop booting

Hey all,

Today I’ve encountered a problem when attempting to upgrade to the latest version of Volumio. I couldn’t get the web ui to display after I presume a failed upgrade so I’ve attempted to flash a new card from scratch.

All is fine until I install the GPIO plugin which installs OK but when I click activate it doesn’t show as active and there are no settings visible in the settings menu.

Rebooting shows the following… Note the failure state that the plugin seems to leave Volumio in.

Has anyone got any advice please?

Jun 17 14:37:15 volumio volumio[5374]: info: ----- Core plugins startup ----
Jun 17 14:37:15 volumio volumio[5374]: info: -------------------------------------------
Jun 17 14:37:15 volumio volumio[5374]: info: Loading plugins from folder /volumio/app/plugins/
Jun 17 14:37:15 volumio volumio[5374]: info: Loading plugins from folder /data/plugins/
Jun 17 14:37:15 volumio volumio[5374]: info: Loading plugin “system”…
Jun 17 14:37:15 volumio volumio[5374]: info: Loading plugin “appearance”…
Jun 17 14:37:17 volumio volumio[5374]: info: Loading plugin “network”…
Jun 17 14:37:17 volumio sudo[5395]: volumio : TTY=pts/0 ; PWD=/data/plugins/system_controller/gpio-buttons ; USER=root ; COMMAND=/bin/journalctl -f
Jun 17 14:37:17 volumio sudo[5395]: pam_unix(sudo:session): session opened for user root by volumio(uid=0)
Jun 17 14:37:17 volumio volumio[5374]: info: Loading plugin “services”…
Jun 17 14:37:17 volumio volumio[5374]: info: Loading plugin “alsa_controller”…
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin “wizard”…
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin “volumio_command_line_client”…
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin “upnp”…
Jun 17 14:37:18 volumio volumio[5374]: info: [1529246238216] Starting Upmpd Daemon
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: system , registerCallback
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin “my_music”…
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin “mpd”…
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin “upnp_browser”…
Jun 17 14:37:19 volumio volumio[5374]: info: Loading plugin “networkfs”…
Jun 17 14:37:19 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: system , registerCallback
Jun 17 14:37:19 volumio volumio[5374]: info: Loading plugin “alarm-clock”…
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin “airplay_emulation”…
Jun 17 14:37:20 volumio volumio[5374]: info: [1529246240194] Starting Shairport Sync
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin “last_100”…
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin “webradio”…
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin “i2s_dacs”…
Jun 17 14:37:20 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin “volumiodiscovery”…
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** The program ‘node’ uses the Apple Bonjour compatibility layer of Avahi.
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** The program ‘node’ uses the Apple Bonjour compatibility layer of Avahi.
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** The program ‘node’ called ‘DNSServiceRegister()’ which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** The program ‘node’ called ‘DNSServiceRegister()’ which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
Jun 17 14:37:20 volumio volumio[5374]: info: Applying required configuration parameters for plugin volumiodiscovery
Jun 17 14:37:20 volumio volumio[5374]: Discovery: StartAdv! undefined
Jun 17 14:37:20 volumio volumio[5374]: Discovery: Started advertising… Volumio - undefined
Jun 17 14:37:20 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: system , registerCallback
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin “gpio-buttons”…
Jun 17 14:37:20 volumio volumio[5374]: /data/plugins/system_controller/gpio-buttons/node_modules/bindings/bindings.js:83
Jun 17 14:37:20 volumio volumio[5374]: throw e
Jun 17 14:37:20 volumio volumio[5374]: ^
Jun 17 14:37:20 volumio volumio[5374]: Error: The module ‘/data/plugins/system_controller/gpio-buttons/node_modules/epoll/build/Release/epoll.node’
Jun 17 14:37:20 volumio volumio[5374]: was compiled against a different Node.js version using
Jun 17 14:37:20 volumio volumio[5374]: NODE_MODULE_VERSION 48. This version of Node.js requires
Jun 17 14:37:20 volumio volumio[5374]: NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
Jun 17 14:37:20 volumio volumio[5374]: the module (for instance, using npm rebuild or npm install).
Jun 17 14:37:20 volumio volumio[5374]: at Object.Module._extensions…node (module.js:681:18)
Jun 17 14:37:20 volumio volumio[5374]: at Module.load (module.js:565:32)
Jun 17 14:37:20 volumio volumio[5374]: at tryModuleLoad (module.js:505:12)
Jun 17 14:37:20 volumio volumio[5374]: at Function.Module._load (module.js:497:3)
Jun 17 14:37:20 volumio volumio[5374]: at Module.require (module.js:596:17)
Jun 17 14:37:20 volumio volumio[5374]: at require (internal/module.js:11:18)
Jun 17 14:37:20 volumio volumio[5374]: at bindings (/data/plugins/system_controller/gpio-buttons/node_modules/bindings/bindings.js:76:44)
Jun 17 14:37:20 volumio volumio[5374]: at Object. (/data/plugins/system_controller/gpio-buttons/node_modules/epoll/epoll.js:1:99)
Jun 17 14:37:20 volumio volumio[5374]: at Module._compile (module.js:652:30)
Jun 17 14:37:20 volumio volumio[5374]: at Object.Module._extensions…js (module.js:663:10)
Jun 17 14:37:20 volumio volumio[5374]: at Module.load (module.js:565:32)
Jun 17 14:37:20 volumio volumio[5374]: at tryModuleLoad (module.js:505:12)
Jun 17 14:37:20 volumio volumio[5374]: at Function.Module._load (module.js:497:3)
Jun 17 14:37:20 volumio volumio[5374]: at Module.require (module.js:596:17)
Jun 17 14:37:20 volumio volumio[5374]: at require (internal/module.js:11:18)
Jun 17 14:37:20 volumio volumio[5374]: at Object. (/data/plugins/system_controller/gpio-buttons/node_modules/onoff/onoff.js:4:11)
Jun 17 14:37:20 volumio systemd[1]: volumio.service: main process exited, code=exited, status=1/FAILURE
Jun 17 14:37:20 volumio systemd[1]: Unit volumio.service entered failed state.
Jun 17 14:37:20 volumio systemd[1]: Starting dynamicswap service…
Jun 17 14:37:20 volumio systemd[1]: Started dynamicswap service.
Jun 17 14:37:21 volumio systemd[1]: volumio.service holdoff time over, scheduling restart.
Jun 17 14:37:21 volumio systemd[1]: Starting dynamicswap service…
Jun 17 14:37:21 volumio systemd[1]: Started dynamicswap service.
Jun 17 14:37:21 volumio systemd[1]: Stopping Volumio Backend Module…
Jun 17 14:37:21 volumio systemd[1]: Starting Volumio Backend Module…
Jun 17 14:37:21 volumio systemd[1]: Started Volumio Backend Module.
volumio@volumio:/data/plugins/system_controller/gpio-buttons$ sudo systemctl restart volumio.service
volumio@volumio:/data/plugins/system_controller/gpio-buttons$ cd…
volumio@volumio:/data/plugins/system_controller$ sudo volumio restart

Hi Jonny G

I confirm - exactly this is the case.
v2.411 is not compatible with the GPIO buttons plugin !!!

I did various tests and found out the following:

1.)
If you have a system where the GPIO plugin has been installed and ever has been activated - the update to v2.411 will crash your system even if you deactivate this plugin and reboot before you do the update to v2.411.
2.)
If you do a fresh v2.411 installation - install the GPIO plugin - try to activate it (which will not work) and then deactivate it - your system will be crashed after the next reboot.
3.)
If you do a fresh v2.411 installation - install the GPIO plugin - but never activate it - the system will keep alive after a reboot (which doesn’t help much if you need this plugin for your project…)

As long as this isn’t fixed i’m not able to update my systems and keep doing with v2.389.

I crashed about 5 systems (backup did help) and did tests with various systems - it does not depend on the RasPI version or DAC that is used - and it is reproducable.

Josef

Thanks for confirming that Josef, I’ve gone back to the previous version tonight. All working fine as expected, plus I’ve also noticed the new backup & restore plugin so hopefully any future meltdowns aren’t going to be this problematic (unless the backup plugin becomes unsupported!!)

I’ve raised an issue on the gpio-plugins github so hopefully it’ll be fixed soon.

Thanks

Jon.

Hi guys,

I got the same problem with GPIO Plugin… the system is completely dead!
I can’t access it anymore, even with SSH connexion.
I hope there will be a fix soon
===> go back to V2.389
RPI:
Download Link : updates.volumio.org/pi/volumio/2 … pi.img.zip
(Thx judydudi)

This will be quite difficult to solve, as it arised a design flaw of the plugin system: we basically need versioning of its node modules based on volumio’s node version.
For those in need of GPIO plugin, do not upgrade while we find a solution (it will take a while).
If the plugin dev can contact me we might find some solutions in the meanwhile

I just realized the same over at AmpSwitch.
In the short term install scripts pulling the right modules might work, but more fields with proper versioning in the plugin.json might be prudent?

Yes, we need more versioning, for modules and other stuff.
In the meanwhile I released a new version which will not crash in those situations.

I however noticed with my great disappointment that the gpio plugin is not hosted as it should on Volumio’s repo, but it’s rather hosted on author’s website… So I will copy it back to Volumio’s one and fix it

Glad you’re making progress with this!

Just to be clear, version 2413 will not crash if a plugin fails, but the issue to stop gpio-buttons failing in the first place still exists, so users of that plugin still should not update. Am I right?

I think the problem only occurs if the plugin packs the node_modules it needs, if they are built/downloaded install-time there shouldn’t be a problem :wink:

Hello @all,

I found out that the version of onoff which is define in package.json.

I set the environment to development a plugin see here: volumio.github.io/docs/Plugin_S … lugin.html

Get the source files from: github.com/tomatpasser/gpio-buttons

Change in package.json

The line

“onoff”: “^1.1.1”,

has to be changed to

“onoff”: “^3.1.0”,
.
create a package and install it.

It worked for me an 2.411 and 2.413

Thanks
Julian

You don’t have to do all that. You can just:

cd /data/plugins/<category >/<plugin_name>
rm -rf node_modules
npm i

But - this is all moot as there is already a fix been pushed :slight_smile:

Is there a fix in Volumio, or do you mean a fix in the plugin itself? Just checking as another topic is about my rotary plugin and keeping the information centralized and in-sync will help in the future :slight_smile:

My update from 2.389 to 2.413 failed somehow, so I’ll have to check what happened tonight (or re-image tonight), so I can’t provide you with intel from my side just yet.

The plugin has just been updated, and it will just work if installed from volumio plugin facility

Soooo, does moving to Volumio 2.413 solve this issue or do you have to update to 2.413 and delete GPIO plugin and download it again !?!

TIA.

Chris

Update, remove and download again

Thanks !! Everything works well now with the new Volumio and the new plugin update. (Don 't worry, the git: github.com/tomatpasser/gpio-buttons have the issue “GPIO Buttons Plugin causes Volumio 2.411 to enter failed state” still open but it works)

How to do it if it doesn’t start?

SSH into the machine and remove the plugin from /data/plugins/system_controller, you can do this over the CLI or WinSCP/Filezilla/any FTPS app.