Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error trying to login (auth or quickconnect) due to client exception #3347

Closed
fungos opened this issue Feb 4, 2024 · 17 comments
Closed

Error trying to login (auth or quickconnect) due to client exception #3347

fungos opened this issue Feb 4, 2024 · 17 comments
Labels
bug Something isn't working

Comments

@fungos
Copy link

fungos commented Feb 4, 2024

Describe the bug

I'm trying to use Jellyfin Android TV with a generic Android TV box but trying to connect to my server always fails on this device. On the issue #2503 there is a Debug version of jellyfin which I tried while monitoring logs on both sides, then the following exception was triggered on the client:

02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse: Deserialization failed
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse: kotlinx.serialization.MissingFieldException: Fields [SupportsContentUploading, SupportsSync] are required for type with serial name 'org.jellyfin.sdk.model.api.ClientCapabilities', but they were missing at path: $.SessionInfo.Capabilities at path: $.SessionInfo.Capabilities at path: $.SessionInfo.Capabilities
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.json.Json.decodeFromString(Json.kt:95)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.api.operations.UserApi.authenticateWithQuickConnect(UserApi.kt:332)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.api.operations.UserApi$authenticateWithQuickConnect$1.invokeSuspend(Unknown Source:15)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at android.os.Handler.handleCallback(Handler.java:942)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at android.os.Handler.dispatchMessage(Handler.java:99)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at android.os.Looper.loopOnce(Looper.java:201)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at android.os.Looper.loop(Looper.java:288)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at android.app.ActivityThread.main(ActivityThread.java:7884)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at java.lang.reflect.Method.invoke(Native Method)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse: Caused by: kotlinx.serialization.MissingFieldException: Fields [SupportsContentUploading, SupportsSync] are required for type with serial name 'org.jellyfin.sdk.model.api.ClientCapabilities', but they were missing at path: $.SessionInfo.Capabilities at path: $.SessionInfo.Capabilities
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.model.api.AuthenticationResult$$serializer.deserialize(AuthenticationResult.kt:12)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.model.api.AuthenticationResult$$serializer.deserialize(AuthenticationResult.kt:12)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       ... 13 more
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse: Caused by: kotlinx.serialization.MissingFieldException: Fields [SupportsContentUploading, SupportsSync] are required for type with serial name 'org.jellyfin.sdk.model.api.ClientCapabilities', but they were missing at path: $.SessionInfo.Capabilities
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.model.api.SessionInfo$$serializer.deserialize(SessionInfo.kt:27)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.model.api.SessionInfo$$serializer.deserialize(SessionInfo.kt:27)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       ... 18 more
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse: Caused by: kotlinx.serialization.MissingFieldException: Fields [SupportsContentUploading, SupportsSync] are required for type with serial name 'org.jellyfin.sdk.model.api.ClientCapabilities', but they were missing
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.model.api.ClientCapabilities.<init>(ClientCapabilities.kt:14)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.model.api.ClientCapabilities$$serializer.deserialize(ClientCapabilities.kt:14)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at org.jellyfin.sdk.model.api.ClientCapabilities$$serializer.deserialize(ClientCapabilities.kt:14)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
02-04 11:45:24.962  2951  2951 E org.jellyfin.sdk.api.client.RawResponse:       ... 23 more
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect: Unable to sign in with Quick Connect secret
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect: org.jellyfin.sdk.api.client.exception.InvalidContentException: Deserialization failed
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.api.operations.UserApi.authenticateWithQuickConnect(UserApi.kt:338)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.api.operations.UserApi$authenticateWithQuickConnect$1.invokeSuspend(Unknown Source:15)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at android.os.Handler.handleCallback(Handler.java:942)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at android.os.Handler.dispatchMessage(Handler.java:99)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at android.os.Looper.loopOnce(Looper.java:201)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at android.os.Looper.loop(Looper.java:288)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at android.app.ActivityThread.main(ActivityThread.java:7884)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at java.lang.reflect.Method.invoke(Native Method)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
02-04 11:45:24.967  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect: Caused by: kotlinx.serialization.MissingFieldException: Fields [SupportsContentUploading, SupportsSync] are required for type with serial name 'org.jellyfin.sdk.model.api.ClientCapabilities', but they were missing at path: $.SessionInfo.Capabilities at path: $.SessionInfo.Capabilities at path: $.SessionInfo.Capabilities
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.json.Json.decodeFromString(Json.kt:95)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.api.operations.UserApi.authenticateWithQuickConnect(UserApi.kt:332)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         ... 11 more
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect: Caused by: kotlinx.serialization.MissingFieldException: Fields [SupportsContentUploading, SupportsSync] are required for type with serial name 'org.jellyfin.sdk.model.api.ClientCapabilities', but they were missing at path: $.SessionInfo.Capabilities at path: $.SessionInfo.Capabilities
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.model.api.AuthenticationResult$$serializer.deserialize(AuthenticationResult.kt:12)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.model.api.AuthenticationResult$$serializer.deserialize(AuthenticationResult.kt:12)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         ... 13 more
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect: Caused by: kotlinx.serialization.MissingFieldException: Fields [SupportsContentUploading, SupportsSync] are required for type with serial name 'org.jellyfin.sdk.model.api.ClientCapabilities', but they were missing at path: $.SessionInfo.Capabilities
02-04 11:45:24.968  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.model.api.SessionInfo$$serializer.deserialize(SessionInfo.kt:27)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.model.api.SessionInfo$$serializer.deserialize(SessionInfo.kt:27)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         ... 18 more
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect: Caused by: kotlinx.serialization.MissingFieldException: Fields [SupportsContentUploading, SupportsSync] are required for type with serial name 'org.jellyfin.sdk.model.api.ClientCapabilities', but they were missing
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.model.api.ClientCapabilities.<init>(ClientCapabilities.kt:14)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.model.api.ClientCapabilities$$serializer.deserialize(ClientCapabilities.kt:14)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at org.jellyfin.sdk.model.api.ClientCapabilities$$serializer.deserialize(ClientCapabilities.kt:14)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
02-04 11:45:24.969  2951  2951 E AuthenticationRepositoryImpl$authenticateQuickConnect:         ... 23 more

The normal Android client do work.

Server: 10.9.0 (arch git)
Android TV Client (Debug): 0.15.10 debug (Not Working)
Android TV Client (Normal): 0.16.4 release (Not Working)
Android Client: 2.6.0 (Working)
Web Client working
Device: RockChip H96_Max_RK3528

Logs

No response

Application version

0.16.4

Where did you install the app from?

Google Play

Device information

RockChip H96_Max_RK3528

Android version

Android TV 13

Jellyfin server version

10.9.0

@fungos fungos added the bug Something isn't working label Feb 4, 2024
@nielsvanvelzen
Copy link
Member

The app does not support Jellyfin 10.9 yet. We will start on compatibility once the first release candidate for it is available.

@nielsvanvelzen nielsvanvelzen closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2024
@fungos
Copy link
Author

fungos commented Feb 4, 2024

I understand, but this can at least require some better handling of exceptions on the app and giving meaningful messages to users?

@MichaelRUSF
Copy link
Contributor

Neils addressed this #3309, but did not implement it. So far, this is only the second time I've seen this issue come up.

@nielsvanvelzen
Copy link
Member

We do catch network issues, but in this specific case the app knows it is working with a Jellyfin server but it receives responses with missing fields which it can't work with. This should normally not happen as we're aiming for backwards compatibility, for that reason the "fix" will likely be made on the server side after the first release candidate.

@fungos
Copy link
Author

fungos commented Feb 5, 2024

It all makes sense, maybe a good middle ground would be to have any kind of exception being globally caught and shown to the user in the app itself only for debug releases of the app? This can make a lot easier to help users identify the issue without going trough steps to see adb logcat.

@nielsvanvelzen
Copy link
Member

When the app crashes it will already upload the crash logs to the last known Jellyfin server so there is no need to use logcat.

@fungos
Copy link
Author

fungos commented Feb 5, 2024

Interesting, I was unable to find this. Normally, where that goes? direct into the servers log? it that is the case, mine isn't showing it.

@nielsvanvelzen
Copy link
Member

The file will be named something like upload_org.jellyfin.androidtv.debug_0.0.0-dev.1_20240204193026_6fbd647909d84d059977eb224b086812.log. But looking at the QuickConnect code from the app we do catch exceptions so the app shouldn't have crashed.

@fungos
Copy link
Author

fungos commented Feb 6, 2024

Sorry, bad wording. The app doesn't crash, so yes the exception is being caught, but from the user perspective, the only information that exists is an error message (can't remember exactly the wording) saying "unable to connect to server". so trying to use the app gives no hint on what is not working.

Also, I can't find any upload .log file in my computer, so unless I need to enable this somewhere in the server, it doesn't seem to be working at least for me.

@nielsvanvelzen
Copy link
Member

The app should now work with 10.9 again as we just merged some fixes to the API. We're not going to add additional checks to the login code for this specific case.

@MaxiHafer
Copy link

For reference: #3383

@Oni
Copy link

Oni commented Mar 29, 2024

The app should now work with 10.9 again as we just merged some fixes to the API. We're not going to add additional checks to the login code for this specific case.

Now that 10.9 is in beta, I'm commenting this issue.

The login from my fireTV is still failing with an "unable to connect to the server" error message.

My server is the docker image "jellyfin/jellyfin:2024032505" and my client is "jellyfin-androidtv 0.16.7 release".

I would gladly downgrade the server, but I'm unable to find 10.8 docker images.

@nielsvanvelzen
Copy link
Member

nielsvanvelzen commented Mar 29, 2024

You can find everything there is to know about 10.9 in this issue: #3467. The login issue is already solved and will be in the next unstable release.

Also, it is not possible to downgrade the server from 10.9 to 10.8 without resetting all your data.

@Oni
Copy link

Oni commented Mar 30, 2024

I can confirm: version 'jellyfin/jellyfin:2024032802' fixes the issue.

@bonswouar
Copy link

Does this mean anybody that wants to keep using stable releases, and the android tv app as a client, will have to wait months before being able to login?

@nielsvanvelzen
Copy link
Member

This issue was closed 3 months ago, the linked issue (#3467) states that support for 10.9 was added weeks ago.

@bonswouar
Copy link

bonswouar commented May 15, 2024

My bad, reading the following comments on the linked issue (without paying attention to the dates) it looked like it was fixed only on unstable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants