gurrrrrrett3 / vrchat-jellyfin

a Jellyfin client designed for VRChat
6 stars 2 forks source link

Running from docker, jellyfin auth response with correct domain and user and pass #6

Closed heavygee closed 2 days ago

heavygee commented 4 days ago

Full log is below (redacted), but I have checked access to the jellyfin instance with the domain (it's a reverse proxied jellyfin, works in browser at the domain and credentials) to be working, but I do note that the path it's attempting to post against has a double backslash: https://jellyfin.mydomain.com//Users/AuthenticateByName - which gives a 404, vs https://jellyfin.mydomain.com/Users/AuthenticateByName (one backslash) that gives a 410.

helpful?

user@Server:~$ docker logs vrchat-jellyfin

> vrchat-jellyfin@1.0.0 start:docker
> nodemon dist/index.js

[nodemon] 3.1.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node dist/index.js`
(node:30) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Webserver listening on port 4000
Failed to authenticate with Jellyfin, check your username and password AxiosError: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:218:20) {
  syscall: 'read',
  code: 'ECONNRESET',
  errno: -104,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function] },
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/json',
      Authorization: 'MediaBrowser Client="Jellyfin VRChat Proxy (jellyfin-vrchat)", Device="Jellyfin VRChat Proxy (jellyfin-vrchat) 1.0.0 | linux | x64", DeviceId="jellyfin-vrchat", Version="1.0.0", Token=""',
      'User-Agent': 'axios/0.27.2',
      'Content-Length': 37
    },
    method: 'post',
    data: '{"Username":"jellfinuser","Pw":"jellyfinpass"}',
    url: 'https://jellyfin.mydomain.com//Users/AuthenticateByName'
  },
  request: <ref *1> Writable {
    _events: {
      close: undefined,
      error: [Function: handleRequestError],
      prefinish: undefined,
      finish: undefined,
      drain: undefined,
      response: [Function: handleResponse],
      socket: [Function: handleRequestSocket]
    },
    _writableState: WritableState {
      highWaterMark: 65536,
      length: 0,
      corked: 0,
      onwrite: [Function: bound onwrite],
      writelen: 0,
      bufferedIndex: 0,
      pendingcb: 0,
      [Symbol(kState)]: 17580812,
      [Symbol(kBufferedValue)]: null
    },
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'https:',
      path: '//Users/AuthenticateByName',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'jellyfin.mydomain.com',
      port: null,
      nativeProtocols: [Object],
      pathname: '//Users/AuthenticateByName'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 37,
    _requestBodyBuffers: [ [Object] ],
    _eventsCount: 3,
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: false,
      chunkedEncoding: false,
      shouldKeepAlive: true,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 37,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      _header: 'POST //Users/AuthenticateByName HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/json\r\n' +
        'Authorization: MediaBrowser Client="Jellyfin VRChat Proxy (jellyfin-vrchat)", Device="Jellyfin VRChat Proxy (jellyfin-vrchat) 1.0.0 | linux | x64", DeviceId="jellyfin-vrchat", Version="1.0.0", Token=""\r\n' +
        'User-Agent: axios/0.27.2\r\n' +
        'Content-Length: 37\r\n' +
        'Host: jellyfin.mydomain.com\r\n' +
        'Connection: keep-alive\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '//Users/AuthenticateByName',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: [Function: emitRequestTimeout],
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'jellyfin.mydomain.com',
      protocol: 'https:',
      _redirectable: [Circular *1],
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kChunkedBuffer)]: [],
      [Symbol(kChunkedLength)]: 0,
      [Symbol(kSocket)]: [TLSSocket],
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 65536,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'https://jellyfin.mydomain.com//Users/AuthenticateByName',
    [Symbol(shapeMode)]: true,
    [Symbol(kCapture)]: false
  }
}
[nodemon] app crashed - waiting for file changes before starting...
noideaman commented 3 days ago

for JELLYFIN_HOST does it end in a /? mine does not

gurrrrrrett3 commented 2 days ago

make sure JELLYFIN_HOST doesn't end in a slash, I'll add some url parsing next update

heavygee commented 2 days ago

That was it, running now, checking it out!