Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error at start - ERROR: SyntaxError: Unexpected token '', ""... is not valid JSON #308

Closed
Slumpedd opened this issue Mar 26, 2024 · 4 comments

Comments

@Slumpedd
Copy link

I had the bot working for a few weeks and made no changes. The past few days I have been trying to turn it on. I navigate to the rustplusplus directory and then do npm start run and this is the output:

PS C:\Users\brian> cd rustplusplus
PS C:\Users\brian\rustplusplus> npm start run

rustplusplus@1.15.0 start
ts-node . run

2024-3-26 15:23:41 ERROR: SyntaxError: Unexpected token '', ""... is not valid JSON
PS C:\Users\brian\rustplusplus>

Any suggestions?

@alexemanuelol
Copy link
Owner

Something got messed up in your instance file or credentials file. most likely your instance file. The quick solution is to remove it completely from the instance/ folder and just restart the bot. You could also run the instance_invalid branch to print out more information regarding every write to the instance file to figure out what happened.

Did your PC/Server crash and then the bot stopped working?

@Slumpedd
Copy link
Author

Ok thanks - so I deleted the instances and now the bot is booting up but when I run npm start run this is the output:

rustplusplus@1.15.0 start
ts-node . run

2024-3-29 19:50:25 INFO: LOGGED IN AS: rustplusplus#9728
2024-3-29 19:50:27 INFO: Successfully registered application commands for guild: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2024-3-29 19:50:31 INFO: FCM-listener Host will start in 5 seconds for guildId: xxxxxxxxxxxxxxxxxxxxxxx, steamId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

Tried repairing to the server and am not having any luck. Is there a step I am missing? I do not have much/any coding experience..

@alexemanuelol
Copy link
Owner

Perhaps your credentials have expired. Try removing your current credentials with /credentials remove and then use the rustplusplus Credential application to get some new credentials

@Slumpedd
Copy link
Author

Got it working! Thank you so much. This is such an awesome tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants