A user reports that the Discourse Hub Android app cannot find their private server, despite it working on iOS and via browser. pmusaraj explains the app verifies a Discourse server through two specific requests: a HEAD request to serverdomain.com/user-api-key/new and a GET request to serverdomain.com/site/basic-info.json. If either fails, the app won’t recognize the site. happyhappy confirms both requests succeed, but the issue persists. pmusaraj suggests Android might be stricter with SSL or other configurations, referencing a past issue. happyhappy notes the problem occurs on a Pixel 8a with GrapheneOS and a friend’s stock Android. Ultimately, happyhappy discovers the server was blocking crawlers, including the one used by the app. After resetting settings and allowing okhttp, the app connected successfully.
My private Discourse server is working and accessible via browser and iOS mobile app.
However, on android, Discourse Hub cannot find the server. (It can find other servers like meta.discourse.org.)
Any idea why this fails? Could it be that the android mobile app uses a different crawler agent to access the server than the iOS version? Or some other reason?
For what it’s worth, I had a friend test this using a stock android with the same result. My device is a Pixel 8a running latest version of GrapheneOS.
Could this be a new cypher incompatibility similar to what you referenced from 2017?
We checked in on the crawlers. My server blocked many crawlers and it seems one of them was preventing the mobile app from connecting. After resetting to factory settings, the app was able to connect.
Then I added okhttp as the only allowed crawler and the mobile app was still able to connect. Crisis averted.
Thanks to @pmusaraj for checking the android app code and working through this solution.