Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

owntracks_http JSON Errors When Client Attempts to Update #11019

Closed
tyler-8 opened this issue Dec 8, 2017 · 6 comments
Closed

owntracks_http JSON Errors When Client Attempts to Update #11019

tyler-8 opened this issue Dec 8, 2017 · 6 comments

Comments

@tyler-8
Copy link

tyler-8 commented Dec 8, 2017

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.59.2 (Running in Docker container "homeassistant/home-assistant:latest")

Python release (python3 --version):
3.6

Component/platform:
owntracks_http

Description of problem:
Configured Owntracks IOS client with all relevant info.
user: homeassistant
password: mypassword
url: https://example.duckdns.org/api/owntracks/me/phone

In the Owntracks IOS client I get:

error The operation couldn't be completed. (HTTP Response error 500.) { }

Expected:
Successful owntracks update

Problem-relevant configuration.yaml entries and steps to reproduce:

device_tracker:
  - platform: owntracks_http
    max_gps_accuracy: 200

Traceback (if applicable):

2017-12-07 23:22:54 ERROR (MainThread) [aiohttp.server] Error handling request
 Traceback (most recent call last):
   File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 410, in start
     resp = yield from self._request_handler(request)
   File "/usr/local/lib/python3.6/site-packages/aiohttp/web.py", line 326, in _handle
     resp = yield from handler(request)
   File "/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 93, in impl
     return (yield from handler(request))
   File "/usr/src/app/homeassistant/components/http/ban.py", line 58, in ban_middleware
     return (yield from handler(request))
   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 213, in coro
     res = yield from res
   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 213, in coro
     res = yield from res
   File "/usr/src/app/homeassistant/components/http/__init__.py", line 430, in handle
     result = yield from result
   File "/usr/src/app/homeassistant/components/device_tracker/owntracks_http.py", line 46, in post
     message = yield from request.json()
   File "/usr/local/lib/python3.6/site-packages/aiohttp/web_request.py", line 511, in json
     return loads(body)
   File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads
     return _default_decoder.decode(s)
   File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
   File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode
     raise JSONDecodeError("Expecting value", s, err.value) from None
 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Additional info:
HASS is working fine otherwise. My DuckDNS with Let's Encrypt docker container reverse proxy is working and the HASS iOS app connects successfully.

@mar-schmidt
Copy link
Contributor

I am also getting this error

@adamaze
Copy link

adamaze commented Jan 14, 2018

I'm also having the same issue

1/14/18 - just a quick update, I upgraded to 0.61.1, and im still having the same issue
1//27/18 - upgraded to 0.62 and still having the issue

@CWGSM3V0
Copy link

CWGSM3V0 commented Feb 3, 2018

On 0.62.1 using iOS w/Ontracks HTTP v9.8.4 - was working then started throwing errors. There's a link to this thread here: https://community.home-assistant.io/t/owntracks-http/28986/2 which may be relevant. I flipped to Public MQTT and back to Private HTTP and it started working. At first thought it was due to having a Region configured but was happening even when deleted all Regions. Now added Regions since flipping between modes, seems to be working again (idle instead of http500; exact same error as posted above.)

@adamaze
Copy link

adamaze commented Feb 4, 2018

thanks @CWGSM3V0 that worked for me on 0.62 !!

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@balloobbot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@home-assistant home-assistant locked and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants