core: FortiOS broken after version 2021.12.0
The problem
Integration does not work any more. Errors in the logs , no presence detection.
What version of Home Assistant Core has the issue?
core-2021.12.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
fortios
Link to integration documentation on our website
https://www.home-assistant.io/integrations/fortios/
Example YAML snippet
device_tracker:
- platform: fortios
host: XXXX
token: XXX
new_device_defaults:
track_new_devices: false
Anything in the logs that might be useful for us?
This broke after update to newest Core 2021.12.0 from the last 20.21.11.X
2021-12-12 13:40:31 WARNING (SyncWorker_5) [fortiosapi] in formatresponse res.content does not exist, should not occur
2021-12-12 13:40:40 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 352, in async_device_tracker_scan
found_devices = await scanner.async_scan_devices()
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 826, in async_scan_devices
return await self.hass.async_add_executor_job(self.scan_devices)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/fortios/device_tracker.py", line 96, in scan_devices
self.update()
File "/usr/src/homeassistant/homeassistant/components/fortios/device_tracker.py", line 90, in update
for client in clients_json["results"]:
TypeError: 'Response' object is not subscriptable
Additional information
.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 28 (12 by maintainers)
Hey there @kimfrellsen, mind taking a look at this issue as it has been labeled with an integration (
fortios) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)fortios documentation fortios source (message by IssueLinks)
Hi.
It is a FortiOS bug. A bug report is filed and accepted and a fix is in progress. A reboot will fix the issue temporarily for about 12 hours. I can update you when there is a FortiOS update which resolves the issue.
BR Kim
Hi, It is committed to the dev branch so you can pull it from there and install it as a custom component. If so remember to set a version in the manifest file to override the build in component. My PR has been accepted so I guess it will be included in the next HA release in January. Enjoy and merry Christmas /Kim
Thanks for your comments and feedback. The device_tracker uses two different FortiGate api’s one for 7.0.x and another one for 6.4.x and earlier. I’ll spin up some containers and FortiGates to update the device tracker both for 6.4.x and 7.0.x. I’ve noticed there is something new on FortiOS about token timeouts which may be relevant to check up on as well. I don’t have time today, but I’ll have a look during the week.
Again thanks for you feedback. /Kim
For the record.
The FortiOS device tracker works fine for me running on a FortiGate 60F with FortiOS 7.0 on HASS core-2021.12.0 😃
Hi,
Sorry for the basic questions, but have you tried to restart the FortiGate of create a new token?
Next, which version of FortiOS are you running?
/Kim