) to install the web app. However, I got result code kWebAppProviderNotReady (
). I cannot find any solution to this error code. Any suggestions?
ScopedObserver<web_app::AppRegistrar, web_app::AppRegistrarObserver> web_apps_observer_{this};
auto web_application_info = std::make_unique<WebApplicationInfo>();
web_application_info->start_url = GURL("
https://airhorner.com");
web_application_info->display_mode = blink::mojom::DisplayMode::kBrowser;
provider->install_manager().InstallWebAppFromInfo(
std::move(web_application_info), web_app::ForInstallableSite::kYes,
webapps::WebappInstallSource::INTERNAL_DEFAULT,
base::BindOnce(
[](const web_app::AppId& installed_app_id,
web_app::InstallResultCode code) {
LOG(WARNING) << "APP ID: " + installed_app_id;
LOG(WARNING) << "RESULT CODE: " + std::to_string( (int) code);
}));