omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Weather widget disappears when wttr.in has an expired TLS certificate

Open shynekomaid opened this issue 2 months ago • 5 comments

System details

4.0.0-1

What's wrong?

Weather widget disappears when wttr.in has an expired TLS certificate

Environment

  • Omarchy: 4.0.0-1
  • Shell: Quickshell-based Omarchy shell
  • Location: Kyiv, Ukraine
  • Weather location is configured with coordinates
  • omarchy.weather is present in ~/.config/omarchy/shell.json

Problem

The weather widget completely disappears from the bar when wttr.in serves an expired TLS certificate.

The location and network connection are working correctly. Open-Meteo is reachable and returns valid weather data, but the widget becomes invisible because the wttr.in request fails TLS validation.

Current error:

curl: (60) SSL certificate problem: certificate has expired

The certificate currently served by wttr.in has:

notBefore=Jun 17 08:35:02 2026 GMT
notAfter=Sep 15 08:35:01 2026 GMT

There is already a related issue in the wttr.in repository:

https://github.com/chubin/wttr.in/issues/1291

Expected behavior

The weather widget should remain visible, or use a fallback, when the primary weather provider is temporarily unavailable.

For example:

  • keep displaying the last successful weather icon/value;
  • use the existing Open-Meteo response as a fallback for the bar widget;
  • show a small unavailable/error state instead of hiding the entire widget;
  • retry the failed provider periodically.

Possible solutions

The safest option would be to avoid disabling TLS verification and instead add a fallback path.

Possible approaches:

  1. Use Open-Meteo for the bar widget when the wttr.in request fails.
  2. Keep the last known weather state visible until a new response succeeds.
  3. Add a fallback provider or provider preference for configured coordinates.
  4. Show Weather unavailable in the widget or panel instead of making the widget invisible.
  5. Treat TLS errors separately from malformed weather responses and keep the UI alive.

Disabling certificate verification with curl -k would technically work, but it would weaken TLS security and probably should not be the default solution.

Reproduction

  1. Configure a weather location in Omarchy.
  2. Make wttr.in return an expired or otherwise invalid TLS certificate.
  3. Restart the Omarchy shell:
omarchy restart shell
  1. Observe that omarchy.weather disappears from the bar.
  2. Verify that Open-Meteo is still reachable:
curl -fsS \
  'https://api.open-meteo.com/v1/forecast?latitude=50.31911&longitude=30.29728&current=temperature_2m&timezone=auto'
  1. Verify the wttr.in failure:
curl -fsS \
  'https://wttr.in/50.31911,30.29728?format=j1'

Additional context

The issue is especially noticeable because the weather widget is hidden when its label is empty. A temporary outage or certificate-renewal delay therefore looks like the widget was removed from the configuration.

The widget is still present in shell.json; it only becomes invisible after the weather request fails.

shynekomaid avatar Sep 15 '26 19:09 shynekomaid

Independent reproduction on a second machine, plus where it goes wrong in the shell code and a workaround.

Same certificate here

Omarchy 4.0.4-1, ASUS ExpertBook, weather location configured with coordinates, omarchy.weather present in ~/.config/omarchy/shell.json:

$ openssl s_client -connect wttr.in:443 -servername wttr.in </dev/null 2>/dev/null | openssl x509 -noout -dates
notBefore=Jun 17 08:35:02 2026 GMT
notAfter=Sep 15 08:35:01 2026 GMT

$ curl -fsS --max-time 10 'https://wttr.in/<location>?format=j1'
curl: (60) SSL certificate problem: certificate has expired          # both wttr.in endpoints used by the panel, exit 60

$ curl -fsS --max-time 8 'https://api.open-meteo.com/v1/forecast?latitude=…&longitude=…&daily=weather_code,temperature_2m_max,temperature_2m_min&current=weather_code,is_day&forecast_days=4&timezone=auto'
{"current":{"weather_code":0,"is_day":0,…}}                          # HTTP 200 in 0.63 s

Mechanism in the shell code

An empty label hides the widget outright instead of degrading to a placeholder:

  • plugins/panels/weather/BarWidget.qml — visible: panelLoader.item && panelLoader.item.label !== ""
  • Panel.qml assigns label in exactly two places: line 348, from the wttr response — but only while coordinates are not configured — and line 407, from the Open-Meteo response.

So with coordinates configured and wttr failing TLS, Open-Meteo is the only thing that can populate label. Until that fetch returns, the bar entry is absent rather than stale, and refreshMinutes defaults to 15 — an instance that starts with an empty label stays invisible until the next refresh tick.

Measured on the bar

Pixel scan of the widget's slot (x≈212–300 of a 1920-wide bar, full bar height):

State max channel sum in the slot pixels above 150
immediately after the widget is re-instantiated 85 (empty background) 0
after forcing a refresh 540 (glyph) 93

I hit that re-instantiation path by editing the bar: the widget was visible before the edit, invisible after it, and came back only when I opened its panel (which calls refresh()).

Workaround

Click the weather widget once — or omarchy-shell omarchy.weather toggle — to force a refresh; the icon returns immediately. Failing that it comes back on its own at the next refresh tick.

Fixing the visibility rule (keep the last successful label, don't gate visible on it, or fall back to the Open-Meteo response that is already being fetched) covers both this case and the cert-outage case, because the failure mode the bar sees is identical.

alanwcurry-dev avatar Sep 16 '26 02:09 alanwcurry-dev

I'm getting this as well.

the weather icon completely disappears from the panel. When I open it with SUPER + CTRL + W, it's stuck on Fetching Forecast...

If i manually set the location/coordinates in ~/.local/state/omarchy/settings/weather.json, the icon comes back but the weather units are all wrong for my location.

imranZERO avatar Sep 16 '26 06:09 imranZERO

Reviewed against quattro at 9480d1b by Claude Opus 5.5, with Codex Medium as a second opinion.

Why the widget disappears. shell/plugins/panels/weather/BarWidget.qml:49 shows the widget only while the panel's label is non-empty. label starts empty on every new panel (Panel.qml:130) and is set in only two places: from a wttr.in response when no coordinates are saved (Panel.qml:348), and from an Open-Meteo response (Panel.qml:408). A failed fetch never clears it. That leaves two cases:

  • No saved location (auto-detect, the default) or a name-only location: Open-Meteo's coordinates come from wttr.in's nearest_area (Panel.qml:173). When wttr.in fails, neither request sets label and Open-Meteo is never called. The bar entry stays hidden, and the panel stays on "Fetching forecast…". This matches the third report here, where writing coordinates into weather.json by hand brought the icon back.
  • Coordinates saved in ~/.local/state/omarchy/settings/weather.json: Open-Meteo is fetched straight from them (Panel.qml:164, 170), and a successful response sets the icon whatever wttr.in does. A new panel (shell restart, bar edit) still has no icon until that response arrives. Neither review found a path where the icon stays hidden after Open-Meteo answers, so the original report remains unexplained from source. Coordinates set some other way, for example only in shell.json, would leave the panel in auto-detect mode and fit the first case.

The fix is already open as #12183, which closes this issue. It keeps the slot visible whenever the panel is loaded and shows — while there is no icon. On an Omarchy worker, with wttr.in failing TLS the same way and no saved location, quattro showed nothing in the weather slot and #12183 showed —. That PR's review is on #12183. It stops the widget from disappearing in both modes. It does not give auto-detect mode any weather while wttr.in is down: that still needs a location source other than wttr.in.

Codex Medium agrees with this reading, and its independence is not guaranteed. It also points out that the panel keeps a wttr.in area from an earlier successful fetch, so an outage that starts while the shell is running does not hide an icon already shown. Nothing was pushed for this issue. It waits on #12183, which is waiting on its author for small changes and on the maintainer to decide whether a — beside the clock is wanted when weather is unavailable.

omarchybot avatar Oct 12 '26 02:10 omarchybot

I noticed that the weather plugin disappeared from the Omarchy screen bar after I performed an Omarchy update, the widget simply vanished. To resolve this, I ran the following command:

omarchy plugin add https://github.com/megga-ernesto/omaweather.git --enable

If you're interested, feel free to browse and choose one for yourself at https://plugins.omarchy.org/?q=weather&category=Widgets

If you would like to keep using the weather widget from omarchy, do this to the weather widget will reappear on the bar 👍:

            rm ~/.local/state/omarchy/settings/weather.json

show in video tutorial https://youtu.be/tabui_G1TqE

rjohan-dev avatar Nov 25 '26 15:11 rjohan-dev

Rechecked quattro at d4512a7559. #16240, included in v4.5.0, removed the automatic-location dependency on wttr.in by obtaining coordinates from geo.omarchy.org. On a disposable Omarchy worker, wttr.in requests failed TLS validation with curl exit 60 while geo and Open-Meteo succeeded. After restarting the shell, the weather icon appeared with both automatic location and saved Kyiv coordinates. The test used a certificate hostname mismatch, rather than an expired certificate; TLS verification remained enabled.

Current quattro, automatic location: weather icon while wttr.in fails TLS Current quattro, saved coordinates: weather icon while wttr.in fails TLS

This does not cover every disappearance: a saved location containing only a name still needs wttr.in for coordinates, and automatic lookup falls back to wttr.in if geo cannot answer. Valid saved coordinates already allowed Open-Meteo to run independently in the earlier code, so the original saved-coordinate report remains unexplained.

There is also a separate Open-Meteo HTTP 403 failure tracked in #19820. #19133 corrected it on quattro; that correction is absent from the 4.5 release branch and has an open backport, #19357. Removing saved coordinates can mask that failure by allowing wttr.in to supply the bar icon. The latest comment does not establish which failure occurred. If still affected, please include the exact Omarchy version, whether weather.json contains both coordinates or only a name, and the errors/exit statuses from the widget's full Open-Meteo forecast request and wttr.in request.

Checked by GPT-6 in Codex (reasoning effort not exposed), with source review by Opus 5.5 High and muse-wonder via pi, thinking high. The second reviews confirmed the remaining name-only and provider-failure paths; independence of their agreement with the supplied observations is not guaranteed. No source was changed or automated suite run. This remains open for the maintainer to decide what to close and whether unavailable weather should show a placeholder, as proposed in #12183.

omarchybot avatar Nov 25 '26 18:11 omarchybot