[GH-ISSUE #3238] Android client: "failed to decode response - unexpected JSON" when using OIDC authentication #27959

Open
opened 2026-06-10 23:33:50 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jcrawfordor on GitHub (Jun 10, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/3238

Describe the Bug

I have been using Pangolin for over a year now without trouble, but recently tried setting up the Android client for the first time. When I go through the login flow using my OIDC IdP, the Android app shows a toast "failed to decode response - unexpected JSON token" (there might be more but it's cut off) and makes it no further. It sticks at the login screen with a spinner until you force quit and restart, at which point you will be prompted for login and run into the exact same problem.

As far as I can tell this problem is unique to the Android client - both web interface and Linux and MacOS clients work fine. I don't have an iOS device to test the iOS client.

Environment

  • OS Type & Version: Android 16, latest Pangolin client
  • Pangolin Version: 1.18.4 (same problem was present in at least 1.18.0)
  • Edition (Community or Enterprise): community
  • Gerbil Version: 1.4.1
  • Traefik Version: 3.7.5
  • Newt Version: n/a
  • Client Version: 0.1.12

To Reproduce

  • You'll need Pangolin set up against an OIDC IdP. I am using kanidm, but https://github.com/fosrl/pangolin/issues/2969 (closed for nonresponse) reports the exact same problem with pocketID
  • Install the Android client, select custom server, enter server URL
  • Android client pops open a webview for the login process, click the SSO button and go through the IdP login flow
  • Once logged in in the webview, click Authorize in Pangolin to authenticate the App
  • the webview closes and you are returned to an app, where you get a "checking login status" toast
  • A few seconds later you get a "failed to decode response - unexpected JSON tok..." toast. The spinner will keep spinning, but from this point nothing else will happen until you FQ the app.

Expected Behavior

I would expect logging in to work, of course---it seems like it's very close, especially since other pangolin clients are working. Unfortunately I am not sure how to get any additional debugging out of the Android app.

Originally created by @jcrawfordor on GitHub (Jun 10, 2026). Original GitHub issue: https://github.com/fosrl/pangolin/issues/3238 ### Describe the Bug I have been using Pangolin for over a year now without trouble, but recently tried setting up the Android client for the first time. When I go through the login flow using my OIDC IdP, the Android app shows a toast "failed to decode response - unexpected JSON token" (there might be more but it's cut off) and makes it no further. It sticks at the login screen with a spinner until you force quit and restart, at which point you will be prompted for login and run into the exact same problem. As far as I can tell this problem is **unique to the Android client** - both web interface and Linux and MacOS clients work fine. I don't have an iOS device to test the iOS client. ### Environment - OS Type & Version: Android 16, latest Pangolin client - Pangolin Version: 1.18.4 (same problem was present in at least 1.18.0) - Edition (Community or Enterprise): community - Gerbil Version: 1.4.1 - Traefik Version: 3.7.5 - Newt Version: n/a - Client Version: 0.1.12 ### To Reproduce - You'll need Pangolin set up against an OIDC IdP. I am using kanidm, but https://github.com/fosrl/pangolin/issues/2969 (closed for nonresponse) reports the exact same problem with pocketID - Install the Android client, select custom server, enter server URL - Android client pops open a webview for the login process, click the SSO button and go through the IdP login flow - Once logged in in the webview, click Authorize in Pangolin to authenticate the App - the webview closes and you are returned to an app, where you get a "checking login status" toast - A few seconds later you get a "failed to decode response - unexpected JSON tok..." toast. The spinner will keep spinning, but from this point nothing else will happen until you FQ the app. ### Expected Behavior I would expect logging in to work, of course---it seems like it's very close, especially since other pangolin clients are working. Unfortunately I am not sure how to get any additional debugging out of the Android app.
Author
Owner

@jcrawfordor commented on GitHub (Jun 10, 2026):

Setting the server to debug logging and trying again didn't reveal anything interesting. The most relevant section would seem to be this:

pangolin[930922]: 2026-06-10T23:35:06+00:00 [debug]: POST /api/v1/device-web-auth/verify
pangolin[930922]: 2026-06-10T23:35:06+00:00 [debug]: Verifying device web auth code: {"code":"(snip)"}
pangolin[930922]: 2026-06-10T23:35:06+00:00 [debug]: Device code lookup result: {"codeId":7,"code":"(snip)","ip":"(snip)","city":null,"deviceName":"(snip)","applicationName":"Pangolin Android","expiresAt":1781134801197,"createdAt":1781134501197,"verified":false,"userId":null}
pangolin[930922]: 2026-06-10T23:35:07+00:00 [debug]: GET /api/v1/auth/device-web-auth/poll/(snip)
pangolin[930922]: 2026-06-10T23:35:07+00:00 [debug]: GET /api/v1/user
<!-- gh-comment-id:4675734811 --> @jcrawfordor commented on GitHub (Jun 10, 2026): Setting the server to debug logging and trying again didn't reveal anything interesting. The most relevant section would seem to be this: ``` pangolin[930922]: 2026-06-10T23:35:06+00:00 [debug]: POST /api/v1/device-web-auth/verify pangolin[930922]: 2026-06-10T23:35:06+00:00 [debug]: Verifying device web auth code: {"code":"(snip)"} pangolin[930922]: 2026-06-10T23:35:06+00:00 [debug]: Device code lookup result: {"codeId":7,"code":"(snip)","ip":"(snip)","city":null,"deviceName":"(snip)","applicationName":"Pangolin Android","expiresAt":1781134801197,"createdAt":1781134501197,"verified":false,"userId":null} pangolin[930922]: 2026-06-10T23:35:07+00:00 [debug]: GET /api/v1/auth/device-web-auth/poll/(snip) pangolin[930922]: 2026-06-10T23:35:07+00:00 [debug]: GET /api/v1/user ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#27959