rossimo / retrobot

MIT License
281 stars 16 forks source link

Forever issue when trying to start #11

Closed SavageTheUnicorn closed 1 year ago

SavageTheUnicorn commented 1 year ago

I do not know how to format this or explain everything as easily as possible. Screenshot_20220918-052044 Screenshot_20220918-043432 # I am working on uploading the retrobot.log from the forever folder.

SavageTheUnicorn commented 1 year ago

retrobot.log

rossimo commented 1 year ago

You mentioned earlier that running the command with sudo seemed to fix the problem. That sounds like a $PATH problem maybe? I would run a which forever as normal user, and as root to get a clue to what may be happening.

Also, you shouldn't need to manually run forever yourself. The yarn service:start should automatically find the forever script in node_modules. Maybe you've run yarn install as root by mistake, causing permission issues?

After looking at the retrobot.log, I'm wanting to think that there was a problem with the token that was eventually resolved.

SavageTheUnicorn commented 1 year ago

After looking at the retrobot.log, I'm wanting to think that there was a problem with the token that was eventually resolved.

Yes, but the bot still remains offline and the same error is received. I want to believe the log generated because I also tried yarn start along with yarn service:start with hopes it would launch. It had outputted that there was an invalid token, which was solved before I made this issue.

Also, you shouldn't need to manually run forever yourself. The yarn service:start should automatically find the forever script in node_modules. Maybe you've run yarn install as root by mistake, causing permission issues?

No, I hadn't ran anything as root I was only adding sudo to the beginning of the command when I got output back. Attempting to run yarn service:start with root outputs that yarn is not installed/found.

You mentioned earlier that running the command with sudo seemed to fix the problem. That sounds like a $PATH problem maybe? I would run a which forever as normal user, and as root to get a clue to what may be happening.

Outputs /usr/local/bin/forever when run either way. Root obtained via sudo su.

rossimo commented 1 year ago

Ok, the second screenshot is expected output. The bot will become a daemon at that point, and continue to run in the background are initializing for a couple seconds. If the console output of yarn start and the forever log are the same, then we can rule out this is a issue with running the bot in service mode. Can you confirm that?

SavageTheUnicorn commented 1 year ago

Ok, the second screenshot is expected output. The bot will become a daemon at that point, and continue to run in the background are initializing for a couple seconds. If the console output of yarn start and the forever log are the same, then we can rule out this is a issue with running the bot in service mode. Can you confirm that?

Ah sorry.. How is that done? I'm a bit of a beginner with Linux in general.

rossimo commented 1 year ago

Forgot to add this step to the docs. Be sure "Message Content Intent" is enabled in the Discord Developer Portal. Screenshot 2022-09-18 143012