akarazniewicz / stremio-jellyfin

Stremio Jellyfin Addon
Apache License 2.0
43 stars 4 forks source link

when step docker run it error ... #1

Open ericvlog opened 10 months ago

ericvlog commented 10 months ago

I install the requirement on jellyfin without problem , but when i run docker run ghcr.io/akarazniewicz/stremio-jellyfin -p 60421:60421 -e JELLYFIN_USER=plsharevme -e JELLYFIN_PASSWORD=1234567 -e JELLYFIN_SERVER=http://192.168.1.100:8096

the log files :

          at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1602:16) {
        errno: -111,
        code: 'ECONNREFUSED',
        syscall: 'connect',
        address: '127.0.0.1',
        port: 80
      }
    },
    allowHalfOpen: false,
    _maxListeners: undefined,
    _eventsCount: 8,
    _sockname: null,
    _pendingData: [
      {
        chunk: 'POST /Users/authenticatebyname HTTP/1.1\r\n' +
          'Accept: application/json, text/plain, */*\r\n' +
          'Content-Type: application/json\r\n' +
          'X-Emby-Authorization: MediaBrowser Client="Jellyfin Stremio Addon", Device="4f21e3b91aed", DeviceId="4f21e3b91aed", Version="1.0.0.0""\r\n' +
          'User-Agent: axios/1.6.6\r\n' +
          'Content-Length: 39\r\n' +
          'Accept-Encoding: gzip, compress, deflate, br\r\n' +
          'Host: localhost\r\n' +
          'Connection: keep-alive\r\n' +
          '\r\n',
        encoding: 'latin1',
        callback: [Function: nop]

 }, { chunk: [Buffer [Uint8Array]], encoding: 'buffer', callback: [Function (anonymous)]  }, allBuffers: false ], _pendingEncoding: '', server: null, _server: null, timeout: 5000, parser: null, _httpMessage: [Circular *2],

    [Symbol(kHandle)]: null,
    [Symbol(lastWriteQueueSize)]: 0,
    [Symbol(timeout)]: Timeout {
      _idleTimeout: -1,
      _idlePrev: null,
      _idleNext: null,
      _idleStart: 395,
      _onTimeout: null,
      _timerArgs: undefined,
      _repeat: null,
      _destroyed: true,
      [Symbol(refed)]: false,
      [Symbol(kHasPrimitive)]: false,
      [Symbol(asyncId)]: 274,
      [Symbol(triggerId)]: 0
    },
    [Symbol(kBuffer)]: null,
    [Symbol(kBufferCb)]: null,
    [Symbol(kBufferGen)]: null,
    [Symbol(shapeMode)]: true,
    [Symbol(kCapture)]: false,
    [Symbol(kSetNoDelay)]: true,
    [Symbol(kSetKeepAlive)]: true,
    [Symbol(kSetKeepAliveInitialDelay)]: 60,
    [Symbol(kBytesRead)]: 0,
    [Symbol(kBytesWritten)]: 0
  },
  [Symbol(kOutHeaders)]: [Object: null prototype] {
    accept: [ 'Accept', 'application/json, text/plain, */*' ],
    'content-type': [ 'Content-Type', 'application/json' ],
    'x-emby-authorization': [
      'X-Emby-Authorization',
      'MediaBrowser Client="Jellyfin Stremio Addon", Device="4f21e3b91aed", DeviceId="4f21e3b91aed", Version="1.0.0.0""'
    ],
    'user-agent': [ 'User-Agent', 'axios/1.6.6' ],
    'content-length': [ 'Content-Length', '39' ],
    'accept-encoding': [ 'Accept-Encoding', 'gzip, compress, deflate, br' ],
    host: [ 'Host', 'localhost' ]
  },
  [Symbol(errored)]: null,
  [Symbol(kHighWaterMark)]: 16384,
  [Symbol(kRejectNonStandardBodyWrites)]: false,
  [Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://localhost/Users/authenticatebyname',
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false

}, cause: Error: connect ECONNREFUSED 127.0.0.1:80 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1602:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1',  port: 80 } } Node.js v21.6.0

Thanks regard , if have docker-compose more easy.

akarazniewicz commented 10 months ago

Can You please reorder arguments? i.e. put image name at the end?

Also - pushed fixed image with better, graceful logging. You may want to pull new one.

docker run -p 60421:60421 -e JELLYFIN_USER=plsharevme -e JELLYFIN_PASSWORD=1234567 -e JELLYFIN_SERVER=http://192.168.1.100:8096/ ghcr.io/akarazniewicz/stremio-jellyfin

ericvlog commented 10 months ago

ohh....thanks i redo it came :

Connecting to Jellyfin server: http://192.168.1.100:8096/ with username: plsharevme and password: 123456 (node:1) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use nodejs --trace-deprecation ... to show where the warning was created) Error caught while Jellyfin authentication, server response: '404' and data: '' (server: 'http://192.168.1.100:8096/' with username: 'plsharevme' and password: ' 123456') Exiting. Please check your configuration and Jellyfin connection.

akarazniewicz commented 10 months ago

Yeah, now looks like You have wrong password (space at the beginning? ' 123456'). 404 means wrong username/password, but it's connectable.

ericvlog commented 10 months ago

it weird , i double checked password username is okay,......i even sign out and login back in jellyfin without problem.

(node:1) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use nodejs --trace-deprecation ... to show where the warning was created)

above message is effect?

akarazniewicz commented 10 months ago

No, thats jus warning from nodejs.

Can You put Your password in braces when starting addon? JELLYFIN_PASSWORD="1234567"

ericvlog commented 10 months ago

ohhh......i know what cause the problem , is my JELLYFIN_SERVER="http://192.168.1.100:8096/" ,.....cannot have "/" at end of url ...

but now new problem is

Connecting to Jellyfin server: http://192.168.1.100:8096 with username: plsharevme and password: 123456 (node:1) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use nodejs --trace-deprecation ... to show where the warning was created) Successfully connected to Jellyfin server: http://192.168.1.100:8096. Happy streaming. HTTP addon accessible at: http://127.0.0.1:60421/manifest.json

http://127.0.0.1:60421/manifest.json i copy and change to my host ip paste at stremio search addon, it say cannot find addon/collection from this URL , but i paste at browser url it does come out some language code .

some people say stremio addon need access from https if that true ?

akarazniewicz commented 10 months ago

This is internal docker address. You need to access IP of Your machine where You're running docker container. Port stays the same. So something like:

http://your_docker_host_ip:60421/manifest.json

ericvlog commented 10 months ago

yup ........my docker of ip is http://192.168.1.100:60421/manifest.json

i open at browser :

{ "id": "community.stremiojellyfin", "version": "1.0.0", "catalogs": [ { "type": "movie", "id": "all", "extra": [ { "name": "skip", "isRequired": true }, { "name": "search", "isRequired": false } ] }, { "type": "series", "id": "all", "extra": [ { "name": "skip", "isRequired": true }, { "name": "search", "isRequired": false } ] } ], "resources": [ "catalog", "stream", "meta" ], "types": [ "movie", "series" ], "name": "Jellyfin", "description": "Stremio Jellyfin integration"

but i paste it to stremio addon it say cannot find addon/collection from this URL

CaptainMihawk commented 10 months ago

I have the same error, the message i got is "failed to fetch" and the server url http://192.168.1.110:60421/manifest.json is accessible in the browser

akarazniewicz commented 10 months ago

Can You install it from browser app? web.stremio.com

ericvlog commented 10 months ago

image

image

image

failed

akarazniewicz commented 10 months ago

Ah interesting. This may be somehow connected to cors. Will need to test it. In my case I have everything proxied with SSL - so this may be it. But unfortunately this is way, way more complicated setup.

CaptainMihawk commented 10 months ago

Can You install it from browser app? web.stremio.com

it worked for me

akarazniewicz commented 10 months ago

You may have different network configuration (not sure if in @ericvlog case his browser and his addon IP are on the same subnet). Worked for me withouth SSL too, but again, I have everything on the same network.

Second thing is - I use Firefox, that may play some role here, too.

ericvlog commented 10 months ago

yup ......couse i hear before the addon(http) need access from local stremio "http" stremio , maybe i host own stremio server later for try.....anyway thanks for your help.

ericvlog commented 9 months ago

hello, i managed to installed by nginx proxy manager (https) and tested run well on Android TV Stremio.

but catalog no appear on android stremio ( only android tv stremio), and i tested on windows stremio also no catalog.

1 more suggestion, can we split the catalog by library jellyfin?

Anyway I do tested play on Android TV Stremio without any problem.! thanks

alanmilinovic commented 8 months ago

Ah interesting. This may be somehow connected to cors. Will need to test it. In my case I have everything proxied with SSL - so this may be it. But unfortunately this is way, way more complicated setup.

I as well have everything proxied with SSL and am getting failed to fetch error 500.

Do I need to have jellyfin as well proxied and with SSL for this to work, or just stremio? So far I tried with proxied jellyfin with and without SSL.

This is how I proxied:

<VirtualHost *:20537>
    <Location "/jellyfin-stremio-addon/">
        ProxyPass http://localhost:60421/
        ProxyPassReverse http://localhost:60421/
    </Location>
</VirtualHost>

The URL looks like this: https://subdomain.domain.com:20537/jellyfin-stremio-addon/manifest.json

The error message in docker: HTTP addon accessible at: http://127.0.0.1:60421/manifest.json request for catalogs: movie all TypeError: Cannot read properties of undefined (reading 'Id') at JellyfinApi.searchItems (file:///home/node/app/jellyfin.js:47:68) at file:///home/node/app/addon.js:32:49 at AddonInterface.get (/home/node/app/node_modules/stremio-addon-sdk/src/builder.js:90:10) at /home/node/app/node_modules/stremio-addon-sdk/src/getRouter.js:23:3 at Layer.handle [as handle_request] (/home/node/app/node_modules/router/lib/layer.js:93:5) at next (/home/node/app/node_modules/router/lib/route.js:161:13) at Route.dispatch (/home/node/app/node_modules/router/lib/route.js:121:3) at handle (/home/node/app/node_modules/router/index.js:532:11) at Layer.handle [as handle_request] (/home/node/app/node_modules/router/lib/layer.js:93:5) at /home/node/app/node_modules/router/index.js:300:15 request for catalogs: series all TypeError: Cannot read properties of undefined (reading 'Id') at JellyfinApi.searchItems (file:///home/node/app/jellyfin.js:47:68) at file:///home/node/app/addon.js:32:49 at AddonInterface.get (/home/node/app/node_modules/stremio-addon-sdk/src/builder.js:90:10) at /home/node/app/node_modules/stremio-addon-sdk/src/getRouter.js:23:3 at Layer.handle [as handle_request] (/home/node/app/node_modules/router/lib/layer.js:93:5) at next (/home/node/app/node_modules/router/lib/route.js:161:13) at Route.dispatch (/home/node/app/node_modules/router/lib/route.js:121:3) at handle (/home/node/app/node_modules/router/index.js:532:11) at Layer.handle [as handle_request] (/home/node/app/node_modules/router/lib/layer.js:93:5) at /home/node/app/node_modules/router/index.js:300:15

alanmilinovic commented 8 months ago

Just tested with proxing on top level, like this:

<VirtualHost *:20538>
    ServerName subdomain.domain.com

    SSLEngine on

    SSLCertificateFile      xxx
    SSLCertificateKeyFile   yyy

    ProxyPass / http://localhost:60421/
    ProxyPassReverse / http://localhost:60421/
</VirtualHost>

The URL in this case is: https://subdomain.domain.com:20538/manifest.json

Same result unfortunately. Not sure why it is not working.

Maybe manifest URL must be without port? @akarazniewicz, can you please test it with port and SSL? I cannot test it as I have limitation in ports and 443 port is taken.

ericvlog commented 8 months ago

Just tested with proxing on top level, like this:

<VirtualHost *:20538>
    ServerName subdomain.domain.com

    SSLEngine on

    SSLCertificateFile      xxx
    SSLCertificateKeyFile   yyy

    ProxyPass / http://localhost:60421/
    ProxyPassReverse / http://localhost:60421/
</VirtualHost>

The URL in this case is: https://subdomain.domain.com:20538/manifest.json

Same result unfortunately. Not sure why it is not working.

Maybe manifest URL must be without port? @akarazniewicz, can you please test it with port and SSL? I cannot test it as I have limitation in ports and 443 port is taken.

I use nginx proxy manager, It very easy to setup,.....my domain of addon https://stremio-jellyfin.mydomain.org .......it working quite well on android tv stremio.

alanmilinovic commented 8 months ago

Just tested with proxing on top level, like this:

<VirtualHost *:20538>
    ServerName subdomain.domain.com

    SSLEngine on

    SSLCertificateFile      xxx
    SSLCertificateKeyFile   yyy

    ProxyPass / http://localhost:60421/
    ProxyPassReverse / http://localhost:60421/
</VirtualHost>

The URL in this case is: https://subdomain.domain.com:20538/manifest.json Same result unfortunately. Not sure why it is not working. Maybe manifest URL must be without port? @akarazniewicz, can you please test it with port and SSL? I cannot test it as I have limitation in ports and 443 port is taken.

I use nginx proxy manager, It very easy to setup,.....my domain of addon https://stremio-jellyfin.mydomain.org .......it working quite well on android tv stremio.

Yes, but I am limited with ports and my addon is https://subdomain.domain.com:20538/manifest.json, I think that stremio when accessing with SSL is not handling ports very good in general. I had some issues when streaming server URL is with port also, then video player is not working.

@ericvlog can you try to configure your addon with port and test please?

ericvlog commented 8 months ago

Why do u include port in your SSL ?.......

Local-ip:port forwarding to SSL

Should be https://stremio-jellyfin.domain.org

Without port.

ericvlog commented 8 months ago

Just tested with proxing on top level, like this:

<VirtualHost *:20538>
    ServerName subdomain.domain.com

    SSLEngine on

    SSLCertificateFile      xxx
    SSLCertificateKeyFile   yyy

    ProxyPass / http://localhost:60421/
    ProxyPassReverse / http://localhost:60421/
</VirtualHost>

The URL in this case is: https://subdomain.domain.com:20538/manifest.json Same result unfortunately. Not sure why it is not working. Maybe manifest URL must be without port? @akarazniewicz, can you please test it with port and SSL? I cannot test it as I have limitation in ports and 443 port is taken.

I use nginx proxy manager, It very easy to setup,.....my domain of addon https://stremio-jellyfin.mydomain.org .......it working quite well on android tv stremio.

Yes, but I am limited with ports and my addon is https://subdomain.domain.com:20538/manifest.json, I think that stremio when accessing with SSL is not handling ports very good in general. I had some issues when streaming server URL is with port also, then video player is not working.

@ericvlog can you try to configure your addon with port and test please?

IMG_20240313_165734.jpg

alanmilinovic commented 8 months ago

Why do u include port in your SSL ?.......

Local-ip:port forwarding to SSL

Should be https://stremio-jellyfin.domain.org

Without port.

Because I have VPN on entire machine and use remote port forwarding on VPN backend where other subscribers are using ports as well and ports 80 or 443 are reserved. I didn't managed to forward port from tunnel to lan to be able to regularly forward in my router publicly.

alanmilinovic commented 8 months ago

I have an update, I managed to get rid of the port, but still same issue.

alanmilinovic commented 8 months ago

Last update from my side, I gave up on this plugin it is not working for me. So, I put Jellyfin on SSL public link without port and used it in docker compose file still not working.

ericvlog commented 8 months ago

Last update from my side, I gave up on this plugin it is not working for me. So, I put Jellyfin on SSL public link without port and used it in docker compose file still not working.

U need SSL on add-ons configuration page no jellyfin.

alanmilinovic commented 8 months ago

Bro, tried all possible combinations, it is not working.

alanmilinovic commented 8 months ago

Screenshot_20240316_123800_Chrome

ericvlog commented 8 months ago

Screenshot_20240316_123800_Chrome

U have try on android TV(stremio) ?

No phone & windows stremio

alanmilinovic commented 8 months ago

Screenshot_20240316_123800_Chrome

U have try on android TV(stremio) ?

No phone & windows stremio

Yes, I did.

drizzt09 commented 7 months ago

any update on this?

In webversion i get error menioned above: image

yes it is http but I do not want to start going down the https route if it isnt going to solve the issue. looks like its tried above but never solved.

i did install Nginx proxy manager but i do not know how to set it up and as mentioned, above it didnt really help.

alanmilinovic commented 7 months ago

It is not working with https or http.

ericvlog commented 7 months ago

It is not working with https or http.

Now it is working well, sorry no feedback here, but if I can manually add library as catalog it more better...now it mixes all library into movies catalog

drizzt09 commented 7 months ago

It is not working with https or http.

Now it is working well, sorry no feedback here, but if I can manually add library as catalog it more better...now it mixes all library into movies catalog

So what steps you performed to get it working? Beyond where I'm stuck?

And the images show it split by library. TV and movie.

drizzt09 commented 5 months ago

It is not working with https or http.

Now it is working well, sorry no feedback here, but if I can manually add library as catalog it more better...now it mixes all library into movies catalog

@ericvlog what did you do to get it working? I am stuck on no manifest

ericvlog commented 5 months ago

It is not working with https or http.

Now it is working well, sorry no feedback here, but if I can manually add library as catalog it more better...now it mixes all library into movies catalog

@ericvlog what did you do to get it working? I am stuck on no manifest

The most important step is "Https" ssl.....

alanmilinovic commented 5 months ago

People it doesn't work. I tried everything.

drizzt09 commented 5 months ago

It is not working with https or http.

Now it is working well, sorry no feedback here, but if I can manually add library as catalog it more better...now it mixes all library into movies catalog

@ericvlog what did you do to get it working? I am stuck on no manifest

The most important step is "Https" ssl.....

I have https ssl. The problem is no manifest.json like gets created. When I manually crested one it still doesn't work as I don't know if it is made correctly. The dev has just disappeared.

alanmilinovic commented 5 months ago

Yes, just forget it and move on.