I clicked on the browser icon, but the browser did not open. Is this a bug? And am I the only one experiencing this?
I also instructed the agent to open the browser, but he said there was an error there.
I clicked on the browser icon, but the browser did not open. Is this a bug? And am I the only one experiencing this?
I also instructed the agent to open the browser, but he said there was an error there.
Problem Description
When attempting to use Google Antigravity, the browser-based functionality fails to start. The error message indicates that Playwright is unable to initialize because the required $HOME environment variable is not set.
Although Windows normally uses the USERPROFILE environment variable to represent the userâs home directory, Playwright and other Unix-oriented tooling explicitly rely on the HOME variable. In this environment, HOME is missing, which prevents Playwright from installing and launching its browser components (such as Chromium).
As a result, browser context creation fails, and Antigravity is unable to perform browser-based tasks, even though network connectivity itself is functioning correctly.
Root Cause
Playwright requires a valid HOME directory to store downloaded browsers, cache files, and browser profiles.
On Windows, HOME is not guaranteed to be defined, especially in sandboxed, agent-based, or IDE-managed runtime environments.
Without HOME, Playwright fails during initialization.
Resolution
How to Fix the Issue
This issue happens because the HOME environment variable is missing on Windows. Playwright requires this variable to know where it can store browser files and temporary data.
You can fix this by setting the HOME variable manually.
Open PowerShell.
Run the following command:
[Environment]::SetEnvironmentVariable("HOME", $env:USERPROFILE, "User")
Open Windows Search and type âEnvironment Variablesâ.
Select âEdit the system environment variablesâ, then click âEnvironment Variablesâ.
Under User variables, click New.
Set:
Variable name: HOME
Variable value: %USERPROFILE%
Click OK, then restart your IDE.
Playwright needs a valid home directory to download and launch its browser (Chromium).
On Windows, this directory is usually stored in USERPROFILE, but some tools do not automatically map it to HOME. Setting HOME resolves the issue.
got it thanks bro the solution is worked for me ![]()
thank you for your solution , it works ![]()
Thanks for the proper explanations. This works for me
A SOLUĂĂO: Precisamos simplesmente criar um ponteiro permanente para a sua pasta de usuĂĄrio no Windows. Abra o PowerShell (Administrador) e execute o seguinte comando (Substitua SeuNome pelo seu nome de usuĂĄrio do Windows):
powershell
[Environment]::SetEnvironmentVariable(âHOMEâ, âC:\Users\SeuNomeâ, âUserâ)
ApĂłs executar o comando, reinicie o Antigravity e seu navegador nativo estarĂĄ funcionando normalmente! ![]()
![]()
Thank you for sharing this solution and for your detailed report on the root cause!
It is very helpful to have the specific fix confirmedâmanually setting the HOME environment variable to point to the user profile is a great workaround for the Playwright initialization failure on Windows.
We appreciate you taking the time to update the community with these steps!