A project entry point for the Extension Manager [Wiki]

Version 5.x is the minimum node version for the Roon API and for that reason the lower limit for all extensions. I can add a note that the minimum version for individual extensions can deviate from this. The version installed by the Windows installer is 6.x and this would be a sensible choice for future packages as well.

It would be good to make the minimum node version for an extension explicit, especially when it is higher than that of the Roon API as in your case. There is a facility for this in the package.json file by means of the engines keyword. If you can add this to your package.json file then I will check if I can detect a version mismatch and report this to the user.

Unfortunately not as its back to not working, it just keeps bombing out all the time. No idea why!

 Loaded: loaded (/etc/systemd/system/roon-extension-manager.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Tue 2017-09-12 08:03:08 BST; 9s ago
  Process: 1534 ExecStart=/root/.RoonExtensions/lib/roon-extension-manager.sh (code=exited, status=0/SUCCESS)
 Main PID: 1534 (code=exited, status=0/SUCCESS)

Sep 12 08:03:08 vortexbox systemd[1]: roon-extension-manager.service: Service hold-off time over, scheduling restart.
Sep 12 08:03:08 vortexbox systemd[1]: roon-extension-manager.service: Start request repeated too quickly.
Sep 12 08:03:08 vortexbox systemd[1]: Failed to start Roon Extension Manager.
Sep 12 08:03:08 vortexbox systemd[1]: roon-extension-manager.service: Unit entered failed state.
Sep 12 08:03:08 vortexbox systemd[1]: roon-extension-manager.service: Failed with result 'start-limit'.

service file contents

[Unit]
Description=Roon Extension Manager
After=network.target

[Service]
User=root
Restart=always
WorkingDirectory=/root/.RoonExtensions/lib
ExecStart=/root/.RoonExtensions/lib/roon-extension-manager.sh
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/bin/node"

[Install]
WantedBy=multi-user.target

What is the output if you run the script manually?

cd /root/.RoonExtensions/lib
./roon-extension-manager.sh

I found the issue it was having some problems with the Harmony extension. I checked the journalctl and it had loads of errors for that extension. So I did a full uninstall of all the extension packages and reinstalled the manager and updater. This now runs as a service. I have reinstalled the harmony extension and all seems ok. Will keep an eye on it and report back any more issues.

One thing you instructions missed is making sure the roon-extension-manager.sh and service has the correct permissions to run. So I needed to chmod +x the .sh and copied permissions from other services to the service file.

1 Like

I noticed that after the automatic update of today my systemd service was down as well, it was also having an issue with the Harmony extension. If the problem returns tomorrow I have to check if a change in one of its dependencies is causing a problem.

Thanks for bringing this up. I will update the instructions.

Ok Harmony Extension has killed it again.

roon-extension-manager.service - Roon Extension Manager
   Loaded: loaded (/etc/systemd/system/roon-extension-manager.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-09-20 02:00:20 BST; 5h 39min ago
 Main PID: 22611 (roon-extension-)
   CGroup: /system.slice/roon-extension-manager.service
           ├─22611 /bin/sh /root/.RoonExtensions/lib/roon-extension-manager.sh
           └─22612 node . ignore service

Sep 20 02:00:20 vortexbox systemd[1]: Started Roon Extension Manager.
Sep 20 02:00:20 vortexbox systemd[1]: Starting Roon Extension Manager...
Sep 20 02:00:21 vortexbox roon-extension-manager.sh[22611]: Err: Extension query failed
Sep 20 02:00:21 vortexbox roon-extension-manager.sh[22611]: npm ERR! extraneous: fast-deep-equal@1.0.0 /root/.RoonExtensions/lib/node_modules/roon-extension-harmony/node_modules/fast-deep-equal
Sep 20 02:00:21 vortexbox roon-extension-manager.sh[22611]: npm ERR! extraneous: json-schema-traverse@0.3.1 /root/.RoonExtensions/lib/node_modules/roon-extension-harmony/node_modules/json-schema-traverse
Sep 20 02:00:21 vortexbox roon-extension-manager.sh[22611]: npm ERR! invalid: boom@5.2.0 /root/.RoonExtensions/lib/node_modules/roon-extension-harmony/node_modules/cryptiles/node_modules/boom
Sep 20 02:00:21 vortexbox roon-extension-manager.sh[22611]: npm ERR! missing: hoek@4.x.x, required by boom@5.2.0
[root@vortexbox ~]#

Tried a manual update and not luck so then removed the extension with npm uninstall and it still wont run I guess the extension manager still thinks it installed in its settings somewhere as I cant run it I could not use its uninstaller.

 roon-extension-manager.service - Roon Extension Manager
   Loaded: loaded (/etc/systemd/system/roon-extension-manager.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-09-20 07:43:40 BST; 5min ago
 Main PID: 11858 (roon-extension-)
   CGroup: /system.slice/roon-extension-manager.service
           ├─11858 /bin/sh /root/.RoonExtensions/lib/roon-extension-manager.sh
           └─11859 node . ignore service

Sep 20 07:43:40 vortexbox systemd[1]: Started Roon Extension Manager.
Sep 20 07:43:40 vortexbox systemd[1]: Starting Roon Extension Manager...
Sep 20 07:43:41 vortexbox roon-extension-manager.sh[11858]: Err: Extension query failed
Sep 20 07:43:41 vortexbox roon-extension-manager.sh[11858]: npm ERR! extraneous: fast-deep-equal@1.0.0 /root/.RoonExtensions/lib/node_modules/roon-extension-harmony/node_modules/fast-deep-equal
Sep 20 07:43:41 vortexbox roon-extension-manager.sh[11858]: npm ERR! extraneous: json-schema-traverse@0.3.1 /root/.RoonExtensions/lib/node_modules/roon-extension-harmony/node_modules/json-schema-traverse
Sep 20 07:45:57 vortexbox systemd[1]: Started Roon Extension Manager.

Was there any indication that the uninstall was successful? Please check if the directory of the extension was completely removed, /root/.RoonExtensions/lib/node_modules/roon-extension-harmony shouldn’t exist anymore. If it is still there you can delete it manually.

Next you start the service again. If it still doesn’t work it may be best to stop the service and delete the complete /root/.RoonExtensions directory. After this you have to manually install the extension manager and updater again.

I don’t know what is causing this problem. The Harmony extension somehow gets corrupted during the auto update process. It can be the termination of the extension or the update itself.

Is your Harmony Hub permanently online and connected with the extension?
I wonder if it makes a difference if there is a connection or not.

Yes it uninstalled fully. I had to remove all the extensions and delete the directory last time so this is only a temp fix and it will break again so I am going to leave it and run the Harmony extension as a service on its own for now. until you find a solution. My harmony hub is on 24/7 and is always connected when the extension is running.

Just reinstalling the extension manually in to the same location the extension manager puts it seemed to fix it. At least until it updates again.

As a workaround, you can disable the auto update of the extension manager by clearing the update time field in the Settings screen.

1 Like

I’ll do that then/

@Jan_Koudijs any update on getting the updates working?

Hi @CrystalGipsy,

What I’m working on at the moment is to better keep track of the running extensions, if e.g. an extension is killed outside the control of the Extension Manager it will be detected and the state administration will be updated.

Also in the termination of running extensions improvements are in progress, when a terminate signal is sent to an extension a feedback from it is expected before work continues. Especially this last part should help in getting a more robust system. I hope that it also helps in solving the update issue you are encountering. It should at least give more information about what is going on, this can then be helpful in tracking the issue down.

It shouldn’t take too long till the above is ready for release…

1 Like

Took me a while to get to this, but I have just added the engine field to the package.json in my dev branch.

I plan on working a few bug fix type things with roon-web-controller over the next few weeks, so it will be in master soon.

Thanks @Jan_Koudijs

1 Like

@Jan_Koudijs Jan I had some issues after some widows updates I think and tried to reinstall from https://github.com/TheAppgineer/roon-extension-manager-packaging/releases/tag/v0.1.1

After several failed attempts I ended up removing the roon extensions folder from AppData location and managed to get the service to disappear… and tried a reinstall again but the service cant start - sits there as Automatic and doesnt appear in the extensions list :frowning:

Any ideas? I tried Run as admin. no firewalls are on and server and client on the same PC (win10pro 1709 as far as I can tell.

Did you get any error message while running the installer?

You could try a full cleanup by taking the steps described in the Wiki, maybe that helps.

The installer ran clean each time I think… ill look at the full clean up and see how that goes.

Update… that did the trick… I think it must have been the npm cache tripping things up.

Don’t think I ever updated from the original beta testing we did :blush: anyway for those having issues do the full cleanup and that should get things back on track

Thanks @Jan_Koudijs

1 Like