Pi Headless Install Stuck on "METRICS: Creating controller"

Hi.

I’m trying to install Plexamp 4.8.2 on a Raspberry Pi4 for a friend. I’m using the following guide:

I have used the guide to setup two of my own Pi’s without any issues.

After I’ve claimed the token, I “cd plexamp” and then “node js/index.js”
I then get the following:
“This browser doesn’t support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills
This browser doesn’t support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills
Starting Plexamp 4.8.2
METRICS: Creating controller.”

The cursor just sits underneath without a new prompt line appearing. I’ve left it for 30 mins.
I can only get a new prompt line if I press ctrl+any key.
I don’t remember having to wait so long in my previous installs.

I’m assuming this is why if I carry on with the instructions I cannot reach Plexamp from a web browser?

TIA

when you start headless (or other apps) manually from the terminal, it will usually continue to run without returning to the terminal prompt until you stop it (ctrl-C)

(i think an initial run on a previously-unclaimed Pi might sometimes return you to the terminal without ctrl-C, but i don’t recall if that’s always the case for every headless version, OS, etc.)

if you’ve already set up and enabled the systemd service (plexamp.service) as described in the guide, headless should auto-start after rebooting the Pi

1 Like

That’s a new one. I have not encountered that in my other setups. Try tgp-2’s suggestions and get back with us if it doesn’t work.

I have also created a new guide that is pretty much the same guide except incorporates a script. It uses a script created by @odinb1 to do a lot of the heavy lifting. Raspberry Pi Easy Guide

I’m getting the same issues on a fresh headless pi. When I ctl+c the terminal, it terminates the plexamp. I run mine as the default user ‘pi’.

when you manually start headless from the terminal (which should only be necessary for the initial token claiming), you can generally ignore anything that shows after Starting Plexamp x.y.z … just ctrl-C to exit and move on :slight_smile:

if you used one of the many useful install scripts or guides out there, you should have a systemd service that will automatically start headless in the background after a reboot

When I control+C, it kills the process. I can’t ‘move on’.

Second, the current Plexamp certificate is invalid, therefore none of the scripts work. I have to -k after a manually typed curl /w the address to ignore the invalid cert.

Third, the script from @odinb1 doesn’t install Node v16 properly because when I perform a node -v it returns v12.22.12. This is on the latest version of 64-bit OS.

I have to manually install NVM and type in 16.20.2 in order to get a working node v16.

the script you’re using should install node 16 … @odinb1 is usually quick to assist here

nvm install is an option, but it has to be specified in the systemd service file

Maybe that is the trick. Does node need to be located or associated with the lib/systemd/system folder? If so, how do I get it there?

I had to piece together instructions from How-to HiFi’s guide because it’s curl command needs the -k and its bash for node 16 also doesn’t install correctly.

Well, then you probably do not have a clean/freshly installed system. Please check the current lines 439-453 in the script, there you will see that it clearly points to v16 (“curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -”)(“apt-get install -y nodejs=16.*-1nodesource1”).

Please try and re-run the script, and choose to upgrade the NodeJS, reply back with the printout of the execution script for that part if it is not upgrading, and I will see if I can figure out what happens on your system. If you want to, you can open it as a bug on github, and we can do the troubleshooting there.

I have run it on a clean install, and it installs NodeJS 16 when I do it.

I did another fresh install but I had to run your bash 3 times before it finally installed all of the components, including node v16. I guess you have some internal dependency checks that prevent a package or update being performed.

As a suggestion, could you amend part of your instruction to include a disclaimer stating as such?

Have been unable to re-create this! On a fresh image of Raspbefrry Pi OS Lite 64-bit, it installs NodeJS 16 for me everytime!

How exactly are you imaging? I use Raspberry Pi imager v1.7.5, choosing Raspberry pi OS Lite (64-bit), and install a user.

What do you do after you image it, what changes do you make?
What SSH-client are you using to login?
Do you change to root using “sudo -i” before executing script with “bash <(wget -qO- https://raw.githubusercontent.com/odinb/bash-plexamp-installer/main/install_Plexamp_pi.sh)”?
I make no changes other than logging in with the user created by the imager, change to root, and then run the script. The SSH-client I use is either terminal from Linux Mint (Debian based) or from MacOS iTerm2. Works with both!

If this was a common issue, I believe I would have seen more complaints here in the forum, or bugs on git, but who knows…

Do you want to install/upgrade and configure Node.v16? Needed on Plexamp 4.5.3 install/upgrade or later! [y/N]: y
grep: /etc/apt/sources.list.d/nodesource.list: No such file or directory

--== Install node.v16 ==--

## Installing the NodeSource Node.js 16.x repo...


## Populating apt-get cache...

+ apt-get update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:3 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:4 http://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]
Get:5 http://deb.debian.org/debian bullseye-updates/main armhf Packages [14.9 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [14.9 kB]
Get:7 http://deb.debian.org/debian bullseye-updates/main Translation-en [10.1 kB]
Get:8 http://security.debian.org/debian-security bullseye-security/main armhf Packages [242 kB]
Get:9 http://security.debian.org/debian-security bullseye-security/main arm64 Packages [240 kB]
Get:10 http://security.debian.org/debian-security bullseye-security/main Translation-en [158 kB]
Get:11 http://security.debian.org/debian-security bullseye-security/non-free Translation-en [464 B]
Get:12 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [314 kB]
Get:13 http://archive.raspberrypi.org/debian bullseye/main arm64 Packages [308 kB]
Fetched 1,535 kB in 3s (557 kB/s)
Reading package lists... Done
N: Repository 'http://deb.debian.org/debian bullseye InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: Repository 'http://deb.debian.org/debian bullseye-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: Repository 'http://security.debian.org/debian-security bullseye-security InRelease' changed its 'Suite' value from 'stable-security' to 'oldstable-security'

## Confirming "bullseye" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_16.x/dists/bullseye/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null

## Creating apt sources list file for the NodeSource Node.js 16.x repo...

+ echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Get:4 https://deb.nodesource.com/node_16.x bullseye InRelease [4,586 B]
Hit:5 http://archive.raspberrypi.org/debian bullseye InRelease
Get:6 https://deb.nodesource.com/node_16.x bullseye/main armhf Packages [782 B]
Get:7 https://deb.nodesource.com/node_16.x bullseye/main arm64 Packages [778 B]
Fetched 6,146 B in 1s (4,322 B/s)
Reading package lists... Done

## Run `sudo apt-get install -y nodejs` to install Node.js 16.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
     echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn


Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '16.20.2-deb-1nodesource1' (Node Source:deb.nodesource.com [arm64]) for 'nodejs'
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
Need to get 26.6 MB of archives.
After this operation, 128 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_16.x bullseye/main arm64 nodejs arm64 16.20.2-deb-1nodesource1 [26.6 MB]
Fetched 26.6 MB in 2s (17.7 MB/s)
Selecting previously unselected package nodejs.
(Reading database ... 39610 files and directories currently installed.)
Preparing to unpack .../nodejs_16.20.2-deb-1nodesource1_arm64.deb ...
Unpacking nodejs (16.20.2-deb-1nodesource1) ...
Setting up nodejs (16.20.2-deb-1nodesource1) ...
Processing triggers for man-db (2.9.4-2) ...
nodejs set on hold.

--== Verify that node.v16 is set to hold ==--
nodejs

--== Verify node.v16 and npm versions, should be v16.20.* and 8.19.*  ==--
v16.20.2
8.19.4

Do you want to install and configure Plexamp-Linux-headless-v4.8.2 [y/N]:
1 Like

Before you replied, I made a post with the exact output from the first failed install. I should’ve kept it for reference.

I’m using the Raspberry imager and used root sudo -i to install. Formatted with pi user and I don’t make any changes to the config. I’m using Mac Terminal.

I was imaging a full 64-bit OS but switched to the Lite, thinking that may be the problem. The Lite image is the only successful image I’ve had luck with. This pi only runs PlexAmp, so I could go back to replicate the problem.

Give me a couple of days to try and replicate.

Ah, there we go! You were using the full image, not the Lite! I only use the Lite image! This is a headless after all!
The full image probably has NodeJS installed for something else!

Guess we solved this one!

The GIT page has been updated clarifying to use Lite version of image!

Thanks for reporting and troubleshooting this!

1 Like

I’ll try this image difference a couple of times to verify results and report back. Give me a few days.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.