Android app does not handle 302 redirects from proxy (Failed to ping server) #549

Closed
opened 2026-04-24 23:28:31 +02:00 by adam · 1 comment
Owner

Originally created by @davidedpg10 on GitHub (May 6, 2023).

Steps to reproduce

  1. Setup and configure Traefik as a reverse proxy in Docker (with LetsEncrypt valid certificates)
  2. Setup AudiobookShelf using docker compose and add Traefik labels so it's proxied through Traefik
    • Made sure it's reachable and usable using Firefox on PC
    • Made sure could be reached and used using Firefox on Mobile (Android - Samsung Galaxy S20)
  3. Using the android app, try to connect to the newly stood up AudiobookShelf Server through the FQDN proxied address https://shelf.<domain>.com

Expected behaviour

  • App should be able to connect to server

Actual behaviour

  • it produces the following error:
Failed to ping server

Additionally, when I look at the access logs in Traefik, I only see 302 status codes, leading me to believe the application gives up as soon as a non 2xx code is received? I'm unsure:

10.0.0.134 - - [06/May/2023:05:20:14 +0000] "GET /ping HTTP/2.0" 302 301 "-" "-" 9281 "shelf@docker" "-" 6ms
10.0.0.134 - - [06/May/2023:05:20:14 +0000] "GET /ping HTTP/2.0" 302 304 "-" "-" 9282 "shelf@docker" "-" 4ms
10.0.0.134 - - [06/May/2023:05:20:15 +0000] "GET /ping HTTP/2.0" 302 302 "-" "-" 9283 "shelf@docker" "-" 5ms
10.0.0.134 - - [06/May/2023:05:20:15 +0000] "GET /ping HTTP/2.0" 302 301 "-" "-" 9284 "shelf@docker" "-" 3ms
10.0.0.134 - - [06/May/2023:05:20:16 +0000] "GET /ping HTTP/2.0" 302 301 "-" "-" 9285 "shelf@docker" "-" 3ms
10.0.0.134 - - [06/May/2023:05:20:16 +0000] "GET /ping HTTP/2.0" 302 302 "-" "-" 9286 "shelf@docker" "-" 3ms
10.0.0.134 - - [06/May/2023:05:20:17 +0000] "GET /ping HTTP/2.0" 302 302 "-" "-" 9287 "shelf@docker" "-" 4ms
10.0.0.134 - - [06/May/2023:05:20:18 +0000] "GET /ping HTTP/2.0" 302 303 "-" "-" 9288 "shelf@docker" "-" 6ms
10.0.0.134 - - [06/May/2023:05:20:18 +0000] "GET /ping HTTP/2.0" 302 302 "-" "-" 9289 "shelf@docker" "-" 3ms

Environment data

Audiobookshelf Version:

  • Android App?
  • iOS App?

Android Issue

Android version: 13

Device model: SM-G981U1

Stock or customized system: STOCK

Originally created by @davidedpg10 on GitHub (May 6, 2023). ### Steps to reproduce 1. Setup and configure Traefik as a reverse proxy in Docker (with LetsEncrypt valid certificates) 2. Setup AudiobookShelf using docker compose and add Traefik labels so it's proxied through Traefik - Made sure it's reachable and usable using Firefox on PC - Made sure could be reached and used using Firefox on Mobile (Android - Samsung Galaxy S20) 3. Using the [android app](https://play.google.com/store/apps/details?id=com.audiobookshelf.app&hl=en_US&gl=US), try to connect to the newly stood up AudiobookShelf Server through the FQDN proxied address `https://shelf.<domain>.com` ### Expected behaviour - App should be able to connect to server ### Actual behaviour - it produces the following error: ``` Failed to ping server ``` Additionally, when I look at the access logs in Traefik, I only see `302` status codes, leading me to believe the application gives up as soon as a non 2xx code is received? I'm unsure: ``` 10.0.0.134 - - [06/May/2023:05:20:14 +0000] "GET /ping HTTP/2.0" 302 301 "-" "-" 9281 "shelf@docker" "-" 6ms 10.0.0.134 - - [06/May/2023:05:20:14 +0000] "GET /ping HTTP/2.0" 302 304 "-" "-" 9282 "shelf@docker" "-" 4ms 10.0.0.134 - - [06/May/2023:05:20:15 +0000] "GET /ping HTTP/2.0" 302 302 "-" "-" 9283 "shelf@docker" "-" 5ms 10.0.0.134 - - [06/May/2023:05:20:15 +0000] "GET /ping HTTP/2.0" 302 301 "-" "-" 9284 "shelf@docker" "-" 3ms 10.0.0.134 - - [06/May/2023:05:20:16 +0000] "GET /ping HTTP/2.0" 302 301 "-" "-" 9285 "shelf@docker" "-" 3ms 10.0.0.134 - - [06/May/2023:05:20:16 +0000] "GET /ping HTTP/2.0" 302 302 "-" "-" 9286 "shelf@docker" "-" 3ms 10.0.0.134 - - [06/May/2023:05:20:17 +0000] "GET /ping HTTP/2.0" 302 302 "-" "-" 9287 "shelf@docker" "-" 4ms 10.0.0.134 - - [06/May/2023:05:20:18 +0000] "GET /ping HTTP/2.0" 302 303 "-" "-" 9288 "shelf@docker" "-" 6ms 10.0.0.134 - - [06/May/2023:05:20:18 +0000] "GET /ping HTTP/2.0" 302 302 "-" "-" 9289 "shelf@docker" "-" 3ms ``` ### Environment data Audiobookshelf Version: - [X] Android App? - [ ] iOS App? #### Android Issue Android version: `13` Device model: `SM-G981U1` Stock or customized system: `STOCK`
adam added the bug label 2026-04-24 23:28:31 +02:00
adam closed this issue 2026-04-24 23:28:32 +02:00
Author
Owner

@davidedpg10 commented on GitHub (May 6, 2023):

Disregard. I had accidentally added ForwardAuth and not noticed (since I was already authorized I had not seen the login screen when visiting it)

@davidedpg10 commented on GitHub (May 6, 2023): Disregard. I had accidentally added ForwardAuth and not noticed (since I was already authorized I had not seen the login screen when visiting it)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#549