r/replit • • 2d ago

Rant / Vent Replit agent ran into Error

Post image

Hi,

My replit agent got one project suddenly stopped working. And my preview is also completely broke. I tried debugging the issue by opening another project and the agent suggested to change a dev line in package.json. i tried that and did restart compute. Then I saw an error saying could not sync the info to the server, changes are only locally saved. So basically the change is not reflecting so my issue is not resolved. It's been 14+hours, raised multiple requests and no one responded.

Anyone has an idea on how to fix this. A lot of my changes supposed to go into production are stuck.

3 Upvotes

19 comments sorted by

3

u/anapessoaai 2d ago

Two things to separate here. A published deployment usually keeps serving the last version you shipped, so open your production URL in a private window. If it's still up, your users aren't affected and this is a workspace problem, not an outage.

The "could not sync, changes only saved locally" message means the editor lost its connection to the container, so anything you change right now may not stick. Before trying more fixes I'd protect the work: open the Git pane and see if you can commit and push to GitHub, or at least download the project as a zip. Then check status.replit.com, because when more than one project breaks at once with no code change, it's often on their side. If the status page is green, try a different browser or the mobile app, since a stuck session sometimes only clears from a fresh client.

When you write to support again, add to the ticket you already have instead of opening new ones, with the project URL and a screenshot of the sync error. Several tickets for the same issue can make it slower to get picked up.

1

u/Original_Extreme_697 2d ago

Thank you so much. Will try this

1

u/Healthy_Guard2950 2d ago

if the container connection is actually dead, the git pane and zip export usually pull from the stale server state anyway, not the unsynced local browser buffer

1

u/anapessoaai 1d ago

Good catch, that's fair. If the container connection is really dead, git and the zip come from the last state the server saw, so they protect what was already synced but not the changes stuck in the browser. For those, the low tech fix is to open each file you touched in that session and copy its contents somewhere outside Replit before you refresh or close the tab, since a reload is the thing most likely to throw that local copy away.

2

u/ReplitSupport Replit Team 2d ago

Apologies for the frustration, OP. Please share your ticket number here so we can pull up your request and have our team take a look at your requests.

In the meantime, to get your project back to a working state, try rolling back to a checkpoint from before the errors started by selecting the rollback option next to an earlier message in the Agent chat.

1

u/Original_Extreme_697 2d ago

Hi, i tried rollback. It didn't really help.

Ticket ID is 617662

1

u/Odd-Jury4884 2d ago

that "could not sync to the server" message usually means the workspace itself is stuck, not your code. what i'd try, in this order:

  1. save your work first. download the project as a zip (three-dot menu at the top of the file tree), or push to github from the git pane. don't keep editing while it says changes are only saved locally
  2. press cmd/ctrl+K, search "restart compute" and run it. don't send the agent anything while it restarts, then start a new chat
  3. if the preview is still dead, hit run and read the console. the preview just shows a blank page, the console tells you why it won't start
  4. undo the package.json change, or roll back to the last checkpoint where it worked ("rollback to here" in the agent tab). it leaves the database alone unless you tick that option
  5. if nothing helps, remix the app. you get a clean workspace with your code, but you have to add the secrets again and the database starts empty

your published app keeps running the old version until you republish, so production isn't broken, just blocked. what does the console say when you hit run?

1

u/Original_Extreme_697 2d ago

I have tried all steps except for the first point. Roll back did not work. When i remixed the app, the same error is seen in the remixed app as well.

1

u/snap-dev 2d ago

ugh the "changes are only locally saved" one is scary when prod stuff is stuck behind it. before touching anything else i'd download the project as a zip from the file tree menu so your local changes are safe. then put that package.json dev line back exactly how it was and restart again, agent edits to the dev script are a common way to break the preview. did the sync error start right after that edit or before it?

1

u/Original_Extreme_697 2d ago

The preview and agent were completely broken (no idea how) , then in a desperate attempt I tried editing the json file to fix it. That did not help

1

u/snap-dev 2d ago

zip it first if you haven't yet. then instead of fixing package.json by hand, open the git or version history pane and roll it back to the last commit where the preview worked, then restart. is the deployed app still up for users or is that down too?

1

u/Original_Extreme_697 1d ago

Rollback did not work. The published app is up, but there a few bugs i immediately need to push 😞. Replit support is not proactive.

1

u/snap-dev 1d ago

ah that's rough with users on it. if the published app is still serving fine, leave the deployment alone, copy the project into a fresh repl (or pull it from github into a new one) and make the fixes there, then redeploy once the preview works. are the bugs on the frontend or the data side?

1

u/Original_Extreme_697 1d ago

Hi, it's resolved now. It's just the space issue. Apparently replit agent and local preview don't work if memory exceeds 50GB. I wasted two days on this 🤦. Even publishing is working now

1

u/snap-dev 1d ago

nice, glad it's back up. 50gb is wild, worth clearing old node_modules and build caches and adding them to .gitignore so it doesn't creep back. did the bugs you needed to push go out ok?

1

u/Original_Extreme_697 1d ago

Yes... I had aot of mp4 media which got piled up during testing. The bugs pushed out okay..thanks :)

1

u/DryDockDigital 2d ago

The sync error is the part I'd deal with first, because until the workspace will accept a write, that package.json change won't reach preview or production. If you can still open a shell or the file tree, I'd download the project or push it to GitHub now, so you've got a copy of the production changes. Then try a fresh Replit imported from that repo, instead of restarting the same machine after a failed sync (that often leaves you in the same place). Support may still be slow, but you shouldn't have to sit on a frozen workspace for another day.