Stremio has an error when it launches the stream server

Today I have found that Stremio also has an error when it launches the stream server. It worked very well before this upgrade.

Stremio streaming server has thrown an error 
QProcess::ProcessError code: 1

(node:9594) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/opt/stremio/server.js:135945
      details.family = details.family.toLowerCase();
                                      ^

TypeError: details.family.toLowerCase is not a function
    at /opt/stremio/server.js:135945:39
    at Array.filter (<anonymous>)
    at /opt/stremio/server.js:135944:37
    at Array.map (<anonymous>)
    at Object.address (/opt/stremio/server.js:135939:37)
    at Server.<anonymous> (/opt/stremio/server.js:135075:37)
    at Server.emit (node:events:527:28)
    at Server.emit (node:domain:475:12)
    at emitListeningNT (node:net:1414:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21)

Node.js v18.1.0

1 Like

Hi there!

This issue just blew up on me. Here’s a “hack” to solve it! I’m assuming you’re not a developer, but you’re at least a bit savvy.

If you choose to make this change, it will probably be overwritten in the next app update, but hopefully this problem will be solved in the next AUR release.

First off, backup the file “/opt/stremio/server.js” wherever you feel like it. Changes will be made to this file.

Open up “/opt/stremio/server.js” with your text editor of choice, and with root (admin) privileges. You will need those to save your changes.

Search for the line that reads

“details.family = details.family.toLowerCase();”

As the error says, it is line 135945. Replace it for

“details.family = details.family.toString().toLowerCase();”

Notice that the difference is just the text “.toString()”. Save your changes.

If you edit the file correctly, Stremio should open without errors.

If not, restore your backup and wait for the upstream fix.

Good luck!

1 Like

I found this solution on reddit and it worked great for me. Changing nodejs version in /opt/stremio/

Currently Stremio uses the system’s node version. It is symlinked to /opt/stremio where the application looks for the executable.Our Flatpak package uses node v15.14.0.As a temporary workaround until we fix this issue, you can either download that exact version of NodeJS https://nodejs.org/dist/latest-v15.x/node-v15.14.0-linux-x64.tar.xz with sha256: f40a52c77a5a98203d24d6e5213c1a189bfc9736d0d9f667c and replace the node executable in /opt/stremio or install the Flatpak package. This will make the application operational and will not affect the system update.

I have tried your solution and it seems to work, but I have found that string to that function in 3 places. I have replaced all of them. I hope your solution will also help other people. 10x!

1 Like

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