Skip to content

public IP silently disappears when ipv4.corecoding.com is unreachable (add fallback) #561

@dsalgadox

Description

@dsalgadox

Has this issue been covered in the Wiki?

  • I have read the Wiki and my issue is not covered.

Is there an existing issue reported already?

  • I have searched the existing issues, it does not exist.

What is the unexpected behavior?

Problem

_refreshIPAddress fetches the public IP from a single host
(https://ipv4.corecoding.com). When that host is down/unreachable, the
.catch(err => {}) swallows the error and the panel shows nothing — no value,
no flag, no hint. Several users reported the Public IP (WAN) disappearing on
Ubuntu 26.04 / GNOME Shell 50 over the last few days (the host has been
intermittent).

Steps to reproduce the unexpected behavior.

Fix

Try the project host first, then fall back to api.myip.com ({ip, cc},
keeps the country flag) and finally api.ipify.org (IP only). Behaviour is
unchanged when the primary host is up.

  • Preserves ipv4.corecoding.com as the primary source and its response shape.
  • Sources are tried in order; an empty IP / bad JSON / network error advances
    to the next provider.
  • No new settings; no change to the panel/flag logic.

Relevant log output

### Testing
Verified each endpoint returns a usable response via the same Gio mechanism
the extension uses:

- `https://ipv4.corecoding.com` -> `{"IPv4":"...","countryCode":"BR"}`
- `https://api.myip.com`        -> `{"ip":"...","cc":"BR"}`
- `https://api.ipify.org?format=json` -> `{"ip":"..."}`

Confirmed the flag still resolves (type `network-br` -> `icon-br`).

What distribution and version of Linux are you using?

Distro: Ubuntu 26.04 — Kernel 7.0.0-22-generic

What version of Gnome are you using?

50.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions