Socketcan Error after latest Update
Hi everyone. After installing the latest Update unfortunately our SignalK-Server crashed and we had to restore an older backup.
After getting the backup working again, we succesfully could install the update but now don't get anymore data over the Canbus from the Raspberry Pi.
There is an error printed out, saying the "socketcan" module can't be found.
It seems weird, as we didn't work anything on this packages.
I tried to install the package separately with npm on the raspberry, as I was guessing that the package somehow went missing after the update, but the installation is getting canceled with a couple of errors.
I assume, that the problem must be somewhere else then.
Anyone else had this problem after the latest update, or experienced something like this after a backup already?
I'm gonna attach the error from the signalk-server.
Thanks in advance for your help!
28 Replies
Something went wrong when installing the server. socketcan failed to build.
Run the command to install the server and grab the output of that.
Tried that already. Some warnings but I think thats part of SignalK.
Tried to delete the old installation, stopped the server and sockets and updated npm & signalk.
Error still persists. :/
Can you try: npm install -g @canboat/canboatjs
And then “candumpjs can0”
When I execute candumpjs, I get following error that socketcan is not installed:
candump-error (image)
I'm not able to install socketcan separetely, as following error shows
socketcan-error (image)
I wonder if it’s the python version
Looks like it’s 3, which should be fine
I'm not sure if it is a direct problem with the socketcan packet, or if there are any permissions missing on the backup, after the update crashed the server.
I checked if user pi is missing some permissions, but it seems like he has root permissions, as normally.
I also found this discussions on the forum, who had the same error in 2023. Didn't finish the discussion though and moved on to slack. Any way to access the old chats there?
Nope. One of the reasons we moved to Discord
Yes, I think Python Version should be fine.
As I mentioned, when doing the backup everything was working fine actually. Only in combination with the newest signalk update it started being faulty.
How old was the backup?
Probably before I moved to socketcan 4.0. That was April of last year.
About three weeks old.
But it was running an old version of sk? Do you know which version?
I also get an DBAuthorizationException, that the Bluetooth Service is not working, which is also new after the Backup. That's why I saw the probability that there are some permissions missing now.
For now I couldn't figure out, what would be the error though.
I think it was running on 2.8.2 and just wanted to upgrade on the newest 2.8.3
Where’s that discussion?
Sorry forgot to attach the link.
https://groups.google.com/g/signalk/c/7I1kfinv6zE
Not much info there. Maybe it will ring a bell for @Teppo Kurki
And you might want to post an issue at the socketcan repo and search there.
Actually,looks like it is the python version
That error is complaining about := , which was introduced in python 3.8
Well....Running Python Version 2.7.16. I'll try to update it quickly. Is there a recommendated version?
I don’t know. I think this is related to npm. Did you update npm?
yes. got latest version 10.8.2. Tried to update it before with no effects
My pi’s are all running python 3.9, I’ve never touched it.
You must be on an old raspian
Raspi 4. I'm surprised it's running python 2 still, now that you say it.
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
Yeah. Ancient.
Unfortunately updating Python to version 3.9 didn't fix the error neither.
Same error?
You’re not going to be able to keep that old OS working. I would go back to the original backup, when things were working. Don’t update anything.
And work on getting a modern setup.
My thoughts exactly
Yeah same error. Restored the old backup now with signalk server version 2.8.2. Working again.
Will skip the current update then for now.
Thanks for your help!
@Teppo Kurki interesting new thing here, seems as though npm no longer shows compilation errors for optional packages