-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
[Icons] ux:icon:warm-cache
interprets close:prevent
(a live_action) as an icon during warmup, causing failure
#2493
Comments
Could you give us some details regarding the error ? What exception do you get ? With what message / output in the console ? |
ux:icon:warmup
interprets close:prevent
(a live_action) as an icon during warmup, causing failureux:icon:warmup
interprets close:prevent
(a live_action) as an icon during warmup, causing failure
Indeed, I forgot to share detailed information about the error encountered. In my CI environment, I occasionally run into this error when I haven't locked the icons using the The Here are the logs from my CI environment: // ...
Executing script cache:clear [OK]
Executing script assets:install public [OK]
Executing script importmap:install [OK]
$ php bin/console asset-map:compile
Warming the icon cache...
In TraceableResponse.php line 209:
HTTP/1.1 403 Forbidden returned for "https://api.iconify.design/collections
".
In ErrorChunk.php line 73:
Received HTTP code 403 from proxy after CONNECT for "https://api.iconify.de
sign/collections".
In CurlResponse.php line 319:
Received HTTP code 403 from proxy after CONNECT for "https://api.iconify.de
sign/collections".
asset-map:compile
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: command terminated with exit code 1 To further illustrate the issue, I also ran the root@701a9d281dd1:/srv/app# bin/console ux:icons:warm-cache -vvv
// Warming the icon cache...
07:00:57 INFO [cache] Lock acquired, now computing item "close--prevent"
[ "key" => "close--prevent"]
07:00:57 INFO [http_client] Request: "GET https://api.iconify.design/collections"
07:00:57 INFO [http_client] Response: "200 https://api.iconify.design/collections" 0.101043 seconds
[ "http_code" => 200, "url" => "https://api.iconify.design/collections", "total_time" => 0.101043]
//... As shown, the warmup process tries to compute To summarize, the issue arises because |
ux:icon:warmup
interprets close:prevent
(a live_action) as an icon during warmup, causing failureux:icon:warm-cache
interprets close:prevent
(a live_action) as an icon during warmup, causing failure
This is not a problem most of the time, as the prefix is checked before trying a particular icon, against the list of collection prefixes. But in your case, the list of collection prefixes does not exist and is "fetched" from iconify, making the whole thing crash because Iconify is not reachable. To be sure, iconify is disabled in this environment ? ( |
You're absolutely right. Iconify wasn't disabled in the production environment during the Docker image build. I initially thought it could be useful, but since I'm locking the icons, enabling Iconify in production is unnecessary. I'll configure Iconify to be enabled only in the development environment for locking icons and disable it in all other environments. This resolves the issue, it wasn't a bug but rather a misunderstanding on my part. Apologies for the inconvenience, and thank you for pointing this out! |
Summary
Error during the
ux:icon:warm-cache
process when encounteringlive_action('close:prevent')
in a UX Live Component. The issue occurs in environments where access to Iconify is blocked or misconfigured, such as in a CI pipeline or local development setup.Description
When using the
live_action
function in a UX Live Component, such as:The warmup process attempts to resolve an icon named
prevent
from theclose
collection. This causes a failure becauseclose:prevent
is not an icon definition but a Live Action attribute.The issue was initially discovered in a CI pipeline behind a proxy that blocks access to Iconify, but it can also be reproduced in a local development environment with restricted access to the Iconify endpoint.
Steps to Reproduce
live_action('close:prevent')
call in a UX Live Component.Expected Behavior
The warmup process should ignore or properly handle
live_action
calls, ensuring they are not mistakenly interpreted as icon definitions. Additionally, it should handle restricted or misconfigured network environments gracefully.Actual Behavior
The process attempts to resolve
prevent
as an icon from theclose
collection. In environments where Iconify is inaccessible or misconfigured, this results in a failure during warmup.The text was updated successfully, but these errors were encountered: