If you play a game that saves data via replit db. Your data is obviously saved, but only on that device; if you switch to another device, you’ll have to start over, even if you’re on the same account where the data was previously saved.
Save the replit db data for when a user logs in on a different device.
Resets data and makes user start over.
Steps to reproduce:
Login to your replit account via a different device
Open a game you have data (Replit DB) on.
Start it and you will notice all your data was reset.
Bug appears at this link:
all games that uses Replit DB
I don’t know at the top of my head.
How am I supposed to demonstrate this with a repl? I’m saying if you play a game that saves data via replit db on your main device. When you switch to a different device, your data will not transfer, and the game will reset and force you to start over, even if you are still playing on the same account you were using before switching devices.
Yeah, do you have a Repl I can test this out on? A Repl that does something with the DB, so I can try it out on multiple devices.
I’ve just seen that other topic about the insecurity of the DB, I believe the solution has always been that you need to host your Repl (as in use some sort of web server) for the DB to persist in a predictable, expected, manner.
If you run the repl once and run it again (so it can save your user in the db) it should return “welcome back @MattDESTROYER”, now you go on a different device and run it if this message does not appear it will say your data was reset. Which in return proves this bug exists and should be looked at.
Interesting, like I said, however, being a cross-device issue makes no sense to me, I would be more inclined to believe it’s something else like to do with different browsers maybe caching or something I dunno (but that wouldn’t make sense either since the browser never directly accesses the db… I dunno).
Previously, as I said earlier, the solution has just been to add a web server which I tested here and it worked.
The test does not work (404). Have you tried doing website? Note that I found out with @Firepup650 that the repl on the cover page is different than your actual repl. (It is a random one with a gibberish slug) that might be causing your issue.
This topic was from 2 months ago, I deleted that test repl long ago.
I mean like terminal games, etc. For example if I play one of @OverdriveReplit terminal games and got 15k coins it would save & if I reloaded the game my stuff will be there, but if I switch to a different device on the same account and tried to play that game my data will be reset.
There’s some confusion about how replit db works so I’ll put my thoughts:
Basically, for console repls, replit will do a temp ghost fork of the repl that gets deleted afterwards, as with all forked repls, the env vars (including the REPLIT_DB_URL) change. Therefore, everytime you fork, I believe that what happens is that replit keys the fork id to your user id as well as the repl to ensure that the same REPLIT_DB_URL gets generated or smth (lol or it’s just localStorage, actually it’s probably that), anyway, if you are on a different device, either the fork generation depends on the device or it’s dependent on localStorage I’d bet on localStorage so that can’t really be solved