Custom widget "URL" tap action shows "<host> is not a valid path" instead of opening the web address
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- ios, swift
- Ambito
- backend-api-design, mobile
Direzione di ricerca
Inizia con IncomingURLHandler.handle(url:) e confronta la gestione degli URL del widget con il caso esistente della scorciatoia .url(urlString). L’issue identifica MagicItem.urlIntent(_:) come origine degli URL del widget e URLOpener.shared.open come percorso esistente per i link esterni. Aggiorna la gestione degli URL HTTP e HTTPS esterni, quindi verifica che toccando un URL personalizzato del widget si apra l’indirizzo senza mostrare l’avviso di percorso non valido.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Does the issue also happen in Safari?
No
The problem
In a custom home screen widget, setting "Tap behavior" (or "Icon tap behavior") to URL with an external web address does not open the address. Instead the app opens and shows an error alert: "www.example.com is not a valid path" (German UI: "www.hausgross.de ist kein gültiger Pfad"). The docs say: "URL: Opens a web address."
Analysis (main, commit 3ae70df):
MagicItem.urlIntent(_:)(Sources/Shared/MagicItem/MagicItem.swift) returns.widgetURL(url)for any URL.- iOS delivers a widget's
widgetURLto the containing app, never directly to Safari. IncomingURLHandler.handle(url:)only routes knownhomeassistant://hosts (IncomingURLAction); any other host ends inshowAlert(... L10n.UrlHandler.NoService.message(url.host!)).- The app icon shortcut path already handles this (
case let .url(urlString)in IncomingURLHandler passes non-deeplink schemes toURLOpener.shared.open). The widget path lacks this branch.
Suggested fix: in handle(url:), open http/https URLs that are not app deep links via URLOpener.shared.open(url, ...) instead of showing the error.
Which platform has the issue?
iOS
Which device model are you using?
18 pro
Which OS version is the device running?
27.0
What version of the app has the issue?
2026.10.1 (2026.3213
What was the last working version of the app?
No response
What version of Home Assistant Core are you running?
2026.9.3
Steps to reproduce
- Settings → Companion App → Widgets → create a custom widget
- Add an item, set Tap behavior = URL, URL = https://www.example.com
- Add the custom widget to the home screen and tap the item
→ The HA app opens and shows "www.example.com is not a valid path". Same with http:// URLs to local hosts.
Expected behavior
The web address opens in Safari (or the default browser).
Did you upload your companion app logs through the form above?
No
- Lingua principale
- Swift
- Stelle
- 2.4k
- Fork
- 583
- Merge medio
- 1g 10h
- PR unite (30g)
- 82
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di home-assistant/iOS
-
bug mac
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
home-assistant/iOS#6328 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
The label displayed in Control Center appears to be inverted relative to the current cover state.Apertabug ios
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
home-assistant/iOS#5989 ·
I maintainer di solito rispondono entro 1 giorno
-
bug ios
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
home-assistant/iOS#5844 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
home-assistant/iOS#5570 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
home-assistant/iOS#6327 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di home-assistant/iOS
Issue simili
-
bug p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rothgar/rabble.radio#283 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
robinebers/openusage#1744 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ZingerLittleBee/Heeler#919 ·
I maintainer di solito rispondono entro 1 giorno
-
platform: android
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ionic-team/capacitor-plugins#2647 ·
I maintainer di solito rispondono entro 1 giorno
-
[Recipe]: AntigravityAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
chenasraf/OpenUpdater#45 ·