Timeout in setup prevents the app from working

I’m getting an “error - The request timed out”
while trying to set up the companion app with my local installation.

homeassistant/raspberrypi3-homeassistant   0.108.8             ddbf100d446c        2 days ago          1.25GB
homeassistant/armv7-hassio-supervisor      219                 262d0e5dd234        2 days ago          284MB
homeassistant/armv7-hassio-supervisor      latest              262d0e5dd234        2 days ago          284MB

tailing the docker container’s logs gives:

2020-04-24 18:06:45 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new device_tracker.mobile_app entity: device_tracker.mulberry_3
2020-04-24 18:06:45 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mobile_app
2020-04-24 18:06:45 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mobile_app
2020-04-24 18:06:45 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mobile_app
2020-04-24 18:06:55 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook af7db23da26dbb703dace7bb526515ee1312d7691ccc612a7da876f4860446e5
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 77, in async_handle_webhook
    response = await webhook["handler"](hass, webhook_id, request)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 186, in handle_webhook
    return await WEBHOOK_COMMANDS[webhook_type](hass, config_entry, webhook_payload)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 131, in validate_and_run
    return await func(hass, config_entry, data)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 379, in webhook_register_sensor
    await hass.data[DOMAIN][DATA_STORE].async_save(savable_state(hass))
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 136, in async_save
    await self._async_handle_write_data()
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 197, in _async_handle_write_data
    self._write_data, self.path, data
concurrent.futures._base.CancelledError
2020-04-24 18:06:55 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook af7db23da26dbb703dace7bb526515ee1312d7691ccc612a7da876f4860446e5
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 77, in async_handle_webhook
    response = await webhook["handler"](hass, webhook_id, request)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 186, in handle_webhook
    return await WEBHOOK_COMMANDS[webhook_type](hass, config_entry, webhook_payload)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 131, in validate_and_run
    return await func(hass, config_entry, data)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 379, in webhook_register_sensor
    await hass.data[DOMAIN][DATA_STORE].async_save(savable_state(hass))
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 136, in async_save
    await self._async_handle_write_data()
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 197, in _async_handle_write_data
    self._write_data, self.path, data
concurrent.futures._base.CancelledError
2020-04-24 18:06:55 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook af7db23da26dbb703dace7bb526515ee1312d7691ccc612a7da876f4860446e5
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 77, in async_handle_webhook
    response = await webhook["handler"](hass, webhook_id, request)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 186, in handle_webhook
    return await WEBHOOK_COMMANDS[webhook_type](hass, config_entry, webhook_payload)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 131, in validate_and_run
    return await func(hass, config_entry, data)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 379, in webhook_register_sensor
    await hass.data[DOMAIN][DATA_STORE].async_save(savable_state(hass))
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 136, in async_save
    await self._async_handle_write_data()
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 197, in _async_handle_write_data
    self._write_data, self.path, data
concurrent.futures._base.CancelledError
2020-04-24 18:06:55 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook af7db23da26dbb703dace7bb526515ee1312d7691ccc612a7da876f4860446e5
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 77, in async_handle_webhook
    response = await webhook["handler"](hass, webhook_id, request)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 186, in handle_webhook
    return await WEBHOOK_COMMANDS[webhook_type](hass, config_entry, webhook_payload)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 131, in validate_and_run
    return await func(hass, config_entry, data)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 379, in webhook_register_sensor
    await hass.data[DOMAIN][DATA_STORE].async_save(savable_state(hass))
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 136, in async_save
    await self._async_handle_write_data()
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 197, in _async_handle_write_data
    self._write_data, self.path, data
concurrent.futures._base.CancelledError

I cannot troubleshoot it much further because Error processing webhook af7db23da26dbb703dace7bb526515ee1312d7691ccc612a7da876f4860446e5 doesn’t mean much to me :sweat_smile:

Any suggestion?

Did I perhaps ask in the wrong place? :thinking:

I double checked my network configuration
reset my known_devices.yaml file (as it seems the map can cause troubles)
disable all the addons
and nothing changed, stil unable to link the app to my server.

Any suggestions?

Were you able to solve this issue, i am having the exact same problem.

In my case, it was the media where I was saving all the hassio stuff.
I had a USB stick lying around and just moved everything to that media so I didn’t need to have an HD connected to the PI. Turns out it was a bad idea: too slow of a device and it was causing too much I/O wait.

I moved everything to an HD and the app was able to link fine. :sweat_smile::man_facepalming:
(well I guess “someone” is touching its disk a little too much :joy:)