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

2024.7.2 Cannot start due to Uncaught Exception. 2024.7.2 Requirements pointing to older version of Awesomeversion #121855

Closed
thickconfusion opened this issue Jul 12, 2024 · 16 comments

Comments

@thickconfusion
Copy link

thickconfusion commented Jul 12, 2024

The problem

homeassistant | awesomeversion.exceptions.AwesomeVersionCompareException: Can't compare <unknown > and <SimpleVer 0.50>

Awesomeversion as being built by the container is grabbing 24.2.0 due to the version associated with the tagged release of 2024.7.2 is 24.2.0 https://github.com/home-assistant/core/blob/2024.7.2/requirements.txt#L16

Awesomeversion 24.6.0 addresses this issue.

What version of Home Assistant Core has the issue?

2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@joostlek
Copy link
Member

I have no clue what the actual issue is you are describing

@thickconfusion
Copy link
Author

thickconfusion commented Jul 12, 2024

homeassistant  | Traceback (most recent call last):
homeassistant  |   File "<frozen runpy>", line 198, in _run_module_as_main
homeassistant  |   File "<frozen runpy>", line 88, in _run_code
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/homeassistant/__main__.py", line 223, in <module>
homeassistant  |     sys.exit(main())
homeassistant  |              ^^^^^^

Home Assistant is not starting due to uncaught exception. The last error is the one included in the issue writeup regarding AwesomeVersion.

@joostlek
Copy link
Member

Right, but I am still not getting what the problem is. A broken version check should not block HA from working so there probably is an uncaught error somewhere.

@thickconfusion
Copy link
Author

Here is the entire error log:

homeassistant  | Traceback (most recent call last):
homeassistant  |   File "<frozen runpy>", line 198, in _run_module_as_main
homeassistant  |   File "<frozen runpy>", line 88, in _run_code
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/homeassistant/__main__.py", line 223, in <module>
homeassistant  |     sys.exit(main())
homeassistant  |              ^^^^^^
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/homeassistant/__main__.py", line 209, in main
homeassistant  |     exit_code = runner.run(runtime_conf)
homeassistant  |                 ^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/homeassistant/runner.py", line 190, in run
homeassistant  |     return loop.run_until_complete(setup_and_run_hass(runtime_config))
homeassistant  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
homeassistant  |     return future.result()
homeassistant  |            ^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/homeassistant/runner.py", line 158, in setup_and_run_hass
homeassistant  |     hass = await bootstrap.async_setup_hass(runtime_config)
homeassistant  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/homeassistant/bootstrap.py", line 309, in async_setup_hass
homeassistant  |     await hass.async_add_executor_job(conf_util.process_ha_config_upgrade, hass)
homeassistant  |   File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
homeassistant  |     result = self.fn(*self.args, **self.kwargs)
homeassistant  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/homeassistant/config.py", line 547, in process_ha_config_upgrade
homeassistant  |     if version_obj < AwesomeVersion("0.50"):
homeassistant  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/awesomeversion/awesomeversion.py", line 172, in __lt__
homeassistant  |     raise AwesomeVersionCompareException(
homeassistant  | awesomeversion.exceptions.AwesomeVersionCompareException: Can't compare <unknown > and <SimpleVer 0.50>

@thickconfusion thickconfusion changed the title Bump Awesomeversion dependency version 2024.7.2 to match updates due to Awesomeversion error 2024.7.2 Cannot start due to Uncaught Exception. 2024.7.2 Requirements pointing to older version of Awesomeversion Jul 12, 2024
@joostlek
Copy link
Member

What's in your .storage/.HA_VERSION file?

@thickconfusion
Copy link
Author

That file does not exist

@joostlek
Copy link
Member

I doubt that, looking at the code it would do something different

@thickconfusion
Copy link
Author

Here you go:

user@host:~/homeassistant/config/.storage$ ls -a

.                                   core.area_registry                                   homeassistant.exposed_entities  onboarding
..                                  core.config                                          http                            person
application_credentials             core.config_entries                                  http.auth                       repairs.issue_registry
assist_pipeline.pipelines           core.device_registry                                 input_boolean                   schedule
auth                                core.entity_registry                                 input_button                    trace.saved_traces
auth.session                        core.logger                                          lovelace.map                    unifi_data
auth_module.totp                    core.restore_state                                   lovelace.temp_graphing          zone
auth_provider.homeassistant         core.uuid                                            lovelace_dashboards
bluetooth.passive_update_processor  frontend.user_data_b4562164541b428b8308cf5f5640c027  map
core.analytics                      google.5db57fb925e9b4e9d041bd243a49c11d              mobile_app

Please note, this was from migrating from 2024.6.4

@joostlek
Copy link
Member

Oh whoops, I'm sorry, it's in /config

@thickconfusion
Copy link
Author

thickconfusion commented Jul 12, 2024

user@host: ~/homeassistant/config$ cat .HA_VERSION
user@host: ~/homeassistant/config$

@joostlek
Copy link
Member

So that means its empty. It should not be empty. I am not sure why it didn't update or anything. Add the version you were running to that and it should work again

@thickconfusion
Copy link
Author

Placed "2024.6.4" in this file, restarted container which is a 2024.7.2 image. It updated the file text to 2024.7.2, and it looks like HA is up. I'm getting some other errors in the log

user@host:~/homeassistant/config$ tail -f -n 200 home-assistant.log

2024-07-12 11:55:10.949 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=126 from 2024-07-12 15:54:34.576706)
2024-07-12 11:55:18.837 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('tzdata.zoneinfo',) inside the event loop by integration 'google' at homeassistant/components/google/coordinator.py, line 75: timeline = await self.sync.store_service.async_get_timeline( (offender: /usr/local/lib/python3.12/importlib/resources/_common.py, line 82: return importlib.import_module(cand)), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+google%22
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.12/site-packages/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.12/site-packages/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/local/lib/python3.12/site-packages/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 288, in async_refresh
    await self._async_refresh(log_failures=True)
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/google/coordinator.py", line 75, in _async_update_data
    timeline = await self.sync.store_service.async_get_timeline(

2024-07-12 11:55:49.070 WARNING (Recorder) [homeassistant.components.recorder.migration] Rebuilding SQLite table states; This will take a while; Please be patient!
2024-07-12 11:55:50.860 WARNING (Recorder) [homeassistant.components.recorder.migration] Rebuilding SQLite table states finished
2024-07-12 11:55:50.862 WARNING (Recorder) [homeassistant.components.recorder.migration] Dropping index `ix_states_event_id` from table `states`. Note: this can take several minutes on large databases and slow computers. Please be patient!

Anyway, I don't suspect any of those errors are related. If you have any thoughts as to why this file got wiped out, or why their is an uncaught exception for when no .HA_VERSION information is present, maybe there is cause for leaving this open.

@joostlek
Copy link
Member

I haven't heard this before and I am not sure what happened exactly. I don't see any direct reason to how this can happen so I think we can close this issue for now. If there are more reports we can look back at this issue again.

Can you create an issue for the

2024-07-12 11:55:18.837 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('tzdata.zoneinfo',) inside the event loop by integration 'google' at homeassistant/components/google/coordinator.py, line 75: timeline = await self.sync.store_service.async_get_timeline( (offender: /usr/local/lib/python3.12/importlib/resources/_common.py, line 82: return importlib.import_module(cand)), please create a bug report at [https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+google%22](https://github.com/home-assistant/core/issues?q=sort%3Aupdated-desc+is%3Aopen+is%3Aissue+label%3A%22integration%3A+google%22)

?

@thickconfusion
Copy link
Author

@joostlek Agree. I did create #121868

@joostlek
Copy link
Member

Will close this one then

@regnighc
Copy link

regnighc commented Aug 6, 2024

Just wanted to add feedback that the exact same issue occured for me too when upgrading from 2024.7.3 to 2024.7.4. Adding the old version to the empty .HA_VERSION fixed the issue.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants