(if this doesn’t make sense, I can explain because I’m not a scripter and thus not familiar with anything)
Hello, so I have a script and it allows me to rank someone after they purchase a rank via a bot. However, this is where the problem comes. Whenever I enter my Roblox cookie, the script runs on glitch but then it automatically logs me out of the bot account… It doesn’t happen to anyone else, but just me.
Yeah, as stated above Roblox did recently implement a change which invalidates the cookie if there is a continental change (to my knowledge, I’ve done a whole bunch of testing on this in my free time recently and I could really only replicate this if there was a continent change). I was going to bring that up if it still logged you out despite following the no logging out method. That messed me up for awhile, but luckily there are some pretty decent ways around this change.
In theory, you could do what I did for my application center which automatically ranks players. Change your VPN region to somewhere in Europe and then make sure you’re hosting your bot somewhere in Europe as well. (I’d assume this is a temporary fix considering Roblox probably plans to roll out IP changing soon). I’ve heard some mixed feedback about this though. It works for some people and doesn’t work for others.
You could do the more permanent solution of following the recommended action on the noblox.js GitHub. It’s the pinned issue, if you need a link let me know.
Also if you’re planning on hosting this permanently for a group of some sort, I’d feel stupid not to mention that I would highly recommend not using Glitch under the pretense that to my knowledge Glitch removed the Private Project feature from free accounts. (Not 100% sure if this is true, but I’ve had a lot of people who I work with tell me this is what is happening). Hopefully this sets you on the right track.
I believe Forummer is correct, if you don’t have a VPN and then you host your project on glitch, when you start your app it attempts to login from an IP that isn’t yours. Thus invalidating the cookie unfortunately. You can view the link to the issue here.
You can read more about something that may help here in terms of getting everything you need and understanding more. This method requires a linked credit card which is unfortunate and I’m unsure if you’d be able to sign up without it.
I haven’t actually done so myself and I’ve been hosting my ranking services simply on Heroku for now, which is free and doesn’t require credit card verification. All I’ve personally done to mitigate this change is login from my web browser on a google incognito tab whilst having a European VPN running, select my Heroku project region to Europe and run my project from there. Haven’t run into any errors since and it’s been going strong for about a week now. It’s much simpler but I’m unsure if that’s going to work long term.