getting this error Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..,
that InvalidStateError: Failed to register a ServiceWorker is a browser/webview issue, not really an antigravity server problem per se.
a few things that usually fix it:
fully close and reopen antigravity (not just minimize). the webview sometimes gets into a broken state and a full restart clears it.
if that doesn’t work, try clearing the app cache — on windows you can find it under %appdata%\Antigravity and delete the Cache folder. on mac it’s in ~/Library/Application Support/Antigravity.
if you’re on the web version, clearing browser cache + hard reload (ctrl+shift+r) tends to do it.
let me know what OS you’re on if it still doesn’t work
Hello @Emotional_discount ,
Thanks for addressing the issue. To continue with your work, could you please try these steps:
- Update: Ensure you are on the latest build (v1.20.6 or higher).
- Clear Cache: Delete the
Code Cachefolder in your Antigravity AppData/Library folder. - Test Artifacts: Prompt the agent to “Generate a Markdown README” and check if it renders in the sidebar.
Could you please check if the issue still persists and provide us the details of OS version.
Thank you @Ahmad_Abdullah for providing the fix.