Android-app: "Connection test failed" when setting up self-hosted Wallabag instance from Android app

Created on 9 Jun 2020  路  6Comments  路  Source: wallabag/android-app

Issue details

When providing the URL of my self-hosted Wallabag instance for the Android app to connect to, the App gives me an error message: "Connection test failed. Wallabag service not found - check URL"

Self-hosted instance is at wallabag.m3l.io, running on Docker (wallabag:latest) behind Traefik (traefik:2.2). Traefik handles redirection of the http entrypoint to https, via a middleware.

Duplicate?

Issue 966 looks similar, except no mention on Traefik being used
Issue 911 describes the problem, but that issue is marked as closed

Actual behaviour

In the Android app:

Settings -> Connection -> enter my self-hosted wallabag URL, plus username and password -> tap Autofill -> error message "Connection test failed. Wallabag service not found - check URL"

This happens no matter whether I use https:// or http:// in the wallabag URL

Expected behaviour

Connection should not fail, since the URL, username and password are correct.

Steps to reproduce the issue

In the Android app:

  1. Enter Settings
  2. Tap Connection
  3. Enter wallabag.m3l.io as the URL
  4. Username "wallabag"
  5. Password "wallabagtest"
  6. Tap autofill

Environment details

  • wallabag app version: Android app version 2.4.0-beta.1 (220)
  • wallabag app installation source GPlay beta programme
  • (Same thing happened with the stable version on the Google App Store too)
  • Android OS version: 10 (QQ2A.200501.001.B2)
  • Android ROM: Stock
  • Android hardware: Pixel 3
  • wallabag server version: wallabag/wallabag:latest via Docker
  • Do you have Two-Factor-Authentication enabled?: no

Logs

wallabag server

docker logs -f <my wallabag container> - nothing is added to logs when attempting to connect from Android app

Web server

Tail of output provided when running docker-compose up is pasted below.

However, my most recent attempts to connect via Android app were around 4am server time, and the most recent log entries are timestamped just before 2am server time.

wallabag       | 2020/06/09 01:59:24 [error] 258#258: *256 FastCGI sent in stderr: "PHP message: PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2636PHP message: PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2665" while reading response header from upstream, client: 172.21.0.2, server: _, request: "GET /api/entries/exists.json?url=https://www.google.com/search?q=wallabag+docker&oq=wallabag+docker&aqs=chrome.0.69i59j69i57j69i59j69i60l5.1396j0j1&sourceid=chrome&ie=UTF-8 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "wallabag.m3l.io"
wallabag       | 172.21.0.2 - - [09/Jun/2020:01:59:24 +0000] "GET /api/entries/exists.json?url=https://www.google.com/search?q=wallabag+docker&oq=wallabag+docker&aqs=chrome.0.69i59j69i57j69i59j69i60l5.1396j0j1&sourceid=chrome&ie=UTF-8 HTTP/1.1" 200 47 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
wallabag       | 2020/06/09 01:59:25 [error] 258#258: *256 FastCGI sent in stderr: "PHP message: PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2636PHP message: PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2665" while reading response header from upstream, client: 172.21.0.2, server: _, request: "GET /api/entries/exists.json?url=https://www.google.com/search?q=wallabag+docker&oq=wallabag+docker&aqs=chrome.0.69i59j69i57j69i59j69i60l5.1396j0j1&sourceid=chrome&ie=UTF-8 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "wallabag.m3l.io"
wallabag       | 172.21.0.2 - - [09/Jun/2020:01:59:25 +0000] "GET /api/entries/exists.json?url=https://www.google.com/search?q=wallabag+docker&oq=wallabag+docker&aqs=chrome.0.69i59j69i57j69i59j69i60l5.1396j0j1&sourceid=chrome&ie=UTF-8 HTTP/1.1" 200 47 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
wallabag       | 172.21.0.2 - - [09/Jun/2020:01:59:26 +0000] "GET /api/entries/exists.json?url=https://github.com/wallabag/docker HTTP/1.1" 200 47 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
wallabag       | 2020/06/09 01:59:26 [error] 258#258: *256 FastCGI sent in stderr: "PHP message: PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2636PHP message: PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2665" while reading response header from upstream, client: 172.21.0.2, server: _, request: "GET /api/entries/exists.json?url=https://github.com/wallabag/docker HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "wallabag.m3l.io"

Your experience with wallabag Android app

No, sorry - first time I installed was to connect to my self-hosted instance

Server configuration issue

All 6 comments

$ curl -I https://wallabag.m3l.io
HTTP/2 302 
cache-control: no-cache, private
content-type: text/html; charset=UTF-8
date: Tue, 09 Jun 2020 07:45:09 GMT
location: http://wallabag.m3l.io/login
server: nginx
set-cookie: PHPSESSID=7a733f8a19cdfc955c7014db100be3da; path=/; HttpOnly

location: http://wallabag.m3l.io/login

It should be https - you need to fix server config.

Thanks. So given I'm using Traefik as my proxy for the Wallabag container, is it going to be the Traefik config that needs fixing?

I know you're not going to be able to support me with my Traefik config, I just want to make sure I'm starting in the right place.

There are two more issues that mention Traefik, maybe there's something useful there: #756, #761.

Thanks - this turned out to be a mistake in the redirection entries in my docker-compose.
The app is connecting to/syncing with my instance just fine now!

what exactly was wrong with the docker-compose. I have the same issue.
I notice that the error on the android app put the ip after the url.
I basically put in something like https://mydomain.com:745 (i used a different port for https).
The error on android shows failed to connect to mydomain.com/91.112.149.79:80 ( changed the ip but interesting thing is also that it adds port 80). By the way .....I use npm (ngnix proxy manager) to redirect as a reverse proxy and https enabler .....it then connects to the http port which is also special since i have multiple services running

what exactly was wrong with the docker-compose. I have the same issue.
I notice that the error on the android app put the ip after the url.
I basically put in something like https://mydomain.com:745 (i used a different port for https).
The error on android shows failed to connect to mydomain.com/91.112.149.79:80 ( changed the ip but interesting thing is also that it adds port 80). By the way .....I use npm (ngnix proxy manager) to redirect as a reverse proxy and https enabler .....it then connects to the http port which is also special since i have multiple services running

I've got the exact same issue. I use the docker container on Synology and the built in reverse proxy. Here i add the needed headers as described. I can login over web, no problem at all but if i try to connect over Android app, i got the same issue as you told. The error message appears with "Failed to connect" and add the ip with a wrong port after a slsah to the original URL.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicosomb picture nicosomb  路  3Comments

msebald picture msebald  路  8Comments

ngosang picture ngosang  路  9Comments

ngosang picture ngosang  路  3Comments

ntnsndr picture ntnsndr  路  8Comments