diff --git a/rust/agama-lib/src/product/store.rs b/rust/agama-lib/src/product/store.rs index c1b89afe16..cf97d47b12 100644 --- a/rust/agama-lib/src/product/store.rs +++ b/rust/agama-lib/src/product/store.rs @@ -24,7 +24,6 @@ use crate::{ base_http_client::BaseHTTPClient, manager::http_client::{ManagerHTTPClient, ManagerHTTPClientError}, }; -use std::{thread, time}; #[derive(Debug, thiserror::Error)] pub enum ProductStoreError { @@ -93,16 +92,6 @@ impl ProductStore { if let Some(reg_code) = &settings.registration_code { let email = settings.registration_email.as_deref().unwrap_or(""); - if probe { - // give the UI a short time for processing the events related to changing the - // product before starting registration because it triggers another pile of events - // in the Web UI as well (workaround for gh#agama-project#2274) - // even 1 second should be enough, but rather be safe and use 5s for slow networks, - // in autoinstallation it does not hurt - let delay = time::Duration::from_secs(5); - thread::sleep(delay); - } - self.product_client.register(reg_code, email).await?; // TODO: avoid reprobing if the system has been already registered with the same code? probe = true; diff --git a/rust/package/agama.changes b/rust/package/agama.changes index 74befb80b9..8c84d1ebf6 100644 --- a/rust/package/agama.changes +++ b/rust/package/agama.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 12 12:55:40 UTC 2025 - Ladislav Slezák + +- Remove the delay between selecting the product and registering it, + the problem has been fixed in the web UI + (removed workaround for gh#agama-project/agama#2274) + ------------------------------------------------------------------- Wed May 7 21:04:24 UTC 2025 - Imobach Gonzalez Sosa diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 5c9aa99c71..b470b951e7 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon May 12 12:47:46 UTC 2025 - Ladislav Slezák + +- Fixed navigation to avoid quickly switching between two paths + in a loop causing "Too many calls to Location or History APIs + within a short timeframe" error in Firefox and crashing the UI + (the proper fix for gh#agama-project/agama#2274) + ------------------------------------------------------------------- Thu May 8 13:43:53 UTC 2025 - David Diaz diff --git a/web/src/App.tsx b/web/src/App.tsx index a0e0db8d16..fb0c1ffa65 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -62,7 +62,8 @@ function App() { return ; } - if (!products || !connected) return ; + if (!products || !connected || (selectedProduct === undefined && isBusy)) + return ; if (phase === InstallationPhase.Startup && isBusy) { return ; diff --git a/web/src/components/product/ProductSelectionPage.tsx b/web/src/components/product/ProductSelectionPage.tsx index a68801314d..001c36e5f6 100644 --- a/web/src/components/product/ProductSelectionPage.tsx +++ b/web/src/components/product/ProductSelectionPage.tsx @@ -112,7 +112,7 @@ function ProductSelectionPage() { const [showLicense, setShowLicense] = useState(false); const [isLoading, setIsLoading] = useState(false); - if (!isEmpty(registration?.key)) return ; + if (!isEmpty(registration?.key) && selectedProduct) return ; const onSubmit = async (e: React.FormEvent) => { e.preventDefault();