Gemini Fails in Prototyper Mode with "path.relative" Error (Works in Code Mode)

Hi everyone,

I’m running into an issue with the Gemini agent, specifically within Firebase Studio’s Prototyper mode, and was hoping someone might have some insight.

When I try to use the Gemini chat agent while in Prototyper mode, it fails to process any prompt.

The request immediately fails with the following error message:

Sorry, I hit a snag. Please try again shortly or modify your prompt. path should be a path.relative()d string, but got "..."

This happens consistently, regardless of the prompt I use.

However, the Gemini agent works perfectly fine when I switch back to the standard Code mode.

I have tried using the /clear command to reset the chat history and have also performed a “Hard Restart” of the entire workspace. Neither of these actions resolved the error in Prototyper mode.

Given the specific error message, this seems to be a bug in how the Prototyper is handling file paths when sending context to the Gemini API.

Has anyone else encountered this? Is there a known fix or a better workaround I might be missing?

Any help or confirmation would be greatly appreciated!

Thanks in advance.

1 Like

Can you try to close all firebase studio tabs and open them again with only one tab? This sometimes helps me to fix the system.

1 Like

Closed all tabs, restarted the computer. no change

1 Like

Which browser are you using? It says it expects a string but gets something different. It could be a systemic failure, but I thought it might be related to the browser.

1 Like

Using the latest Chrome version ( 137.0.7151.120 )

  • If i open a new project, the prototyper chat is functional, but my existing project is still stuck / not responding / gives an error
1 Like

I see. Can you try to revert to a version before this error with the “Restore” button? I wondered if a recent change could have caused this problem.

1 Like

have you tried:

  1. clearing cache
  2. hard reloading chrome tab? [control + click reload].
1 Like

Cleared cache, did a hard reload - still no change

@bevren15 - i used /clear in the chat, so can’t see older versions. will try in a different way

** i think it happend after i added a custom doamin, but nor sure it’s related

If you have deleted the chat history and want to go back to an older version, you can do the following:

  1. Switch to coding view from the code sign at the top right
    image

  2. Switch to the Source Control tab in the left menu.

  3. Right-click on an old version and click on the Creat Branch button. (I don’t recommend going back too far because new versions will disappear from this section. Just go back a few steps at a time. If this doesn’t solve the problem, it might make more sense to try a different method).

  4. Give your branch a name from the field that appears above.image

This way you can revert to the old version. I hope this solves your problem.

1 Like

@bevren15 - (King!) it worked!
I can use the prototyper chat again. Thank you for your support!

1 Like

I’m really glad this worked :upside_down_face:

It would be great if you could mark the answer that leads to the solution as “Solution” so that people with this problem can see the solution more easily. It will be clear that it has already been solved before somebody enter it.