Can not connect the App when using Docker but works when using pip install

I’m trying to connect my Home assistant to the App.
When using the pip install method I can connect.

When using docker I get the following Error in the logfile:

2020-01-28 14:53:43 ERROR (MainThread) [homeassistant.components.auth.indieauth] Timeout while looking up redirect_uri https://home-assistant.io/android
2020-01-28 14:53:43 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 192.168.2.104

The App says: "Invalid client id or redirect uri

My config.yaml looks pretty much the same on both instances:


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
 - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

tplink:
websocket_api:

mobile_app:
discovery:

The docker-compose.yml is:

version: '3'
services:
  homeassistant:
    container_name: home-assistant
    image: homeassistant/home-assistant:stable
    restart: always
    volumes:
      - ./homeassistant:/config
    environment:
      - TZ=Europe/Berlin
    network_mode: host
    
  nodered:
    container_name: node-red-hass
    image: nodered/node-red
    restart: always
    ports:
      - 1880:1880
      - 9229:9229
    environment:
      - TZ=Europe/Berlin
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./nodered:/data
    network_mode: host

  rhasspy:
    container_name: rhasspy-hass
    image: "synesthesiam/rhasspy-server:latest"
    restart: unless-stopped
    volumes:
        - ./rhasspy/profiles:/profiles"
    ports:
        - "12101:12101"
    devices:
        - "/dev/snd:/dev/snd"
    command: --user-profiles /profiles --profile de
    network_mode: host

  marytts:
    container_name: marytts-hass
    image: synesthesiam/marytts:5.2
    restart: unless-stopped
    ports:
      - "59125:59125"
    network_mode: host

??

Have you thought about trying this?

Thanks for your answer.
I have tied what you suggested:

http:
  base_url: http://192.168.2.145:8123

It did not help.
I still get the error.

BTW: The Ariela App works fine. With and without the above settings.

Can your host resolve DNS?

By the way, in your compose file, passing ports and network_mode is redundant. Pick one or the other. Home Assistant needs network_mode, but the others may not.

Make sure your IP is not in the ip_bans yaml also.

What do you mean with: “Can your host resolve DNS”?
I’m writing this from my host that runs docker. So there should be a valid DNS resolve mechanism avtive.
Or do you mean that my host should be a DNS server?
Or shall I check whether my Docker container can resolve DNS?

For now I only want to test it locally without external access.
BTW: When using the scan button in the App it does not find my Home Assistance instance. I have to enter the IP manually.

I have no ip_bans.yaml file yet.

I was asking if your docker host could resolve DNS. If you are using it to browse the internet and post here, then that question is answered.

This is a known problem. It hasn’t worked since the app was released AFAIK.

Then the answer is yes.

Is there any way to debug this?
Can I obtain more informative log messages from my Home Assistant and from the Phone?