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

slash-up sync hangs forever during Heroku deployment #289

Open
linuswillner opened this issue Nov 21, 2023 · 5 comments
Open

slash-up sync hangs forever during Heroku deployment #289

linuswillner opened this issue Nov 21, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@linuswillner
Copy link

linuswillner commented Nov 21, 2023

Déja vù, I'm here again with mystic hanging issues.

As titled, slash-up sync does nothing for at least 40 minutes (didn't bother waiting any longer) when trying to deploy to Heroku. I have positive confirmation that the command is started by NPM, but after that, nothing happens. Adding the --debug flag still prints nothing. Tried updating to latest slash-up and slash-create, neither had any effect.

We last deployed successfully with [email protected] and [email protected] on October 10th. This breakage has therefore happened somewhere between then and now. I will try again tomorrow to rule out Discord platform issues.

The only clue I have to go on at this stage is that the sync command never gets as far https://github.com/Snazzah/slash-up/blob/master/src/commands/sync.ts#L134, since I tried adding beforeSync: 'block' to the config, but still nothing would happen. It seems reasonable to assume it never makes it as far as https://github.com/Snazzah/slash-up/blob/master/src/commands/sync.ts#L126 either. I have a non-zero amount of commands, and it not stopping on "no commands" seems to suggest it doesn't make it as far as https://github.com/Snazzah/slash-up/blob/master/src/commands/sync.ts#L116 either. I have neither disableDelete nor globalToGuild enabled in the production environment (latter is enabled in dev, but I'm running slash-up sync, which should mean it does not go into that branch), so it therefore stands to reason the script never enters neither https://github.com/Snazzah/slash-up/blob/master/src/commands/sync.ts#L108 nor https://github.com/Snazzah/slash-up/blob/master/src/commands/sync.ts#L99.

Summarily, bar the handler() function not running at all, it seems the script is liable to hang somewhere here: https://github.com/Snazzah/slash-up/blob/master/src/commands/sync.ts#L95-L96

The strangest thing is that this works just fine locally.

That's all I've got to go on at this stage; happy to provide more help where I can. Thank you in advance for any help!

@Snazzah Snazzah added the bug Something isn't working label Nov 26, 2023
@linuswillner
Copy link
Author

Tried deploying again today, issue still persists.

@Snazzah
Copy link
Owner

Snazzah commented Dec 3, 2023

There could be an underlying issue when creating the SlashCreator in the first place. Assuming the project uses slash-create v5, there might've been an issue when loading commands. Not sure how it would lead to the command hanging though. Does rolling back slash-up versions potentially fix issues, just to rule out other potential issues?

@linuswillner
Copy link
Author

We are on [email protected] and [email protected] now. We attempted upgrading as the first step towards a resolution, but sadly that did not appear to make a difference.

@Snazzah
Copy link
Owner

Snazzah commented Dec 3, 2023

So this works okay locally but hangs for Heroku? I could try and add more debug statements on when the creator is made just in case. Do you know what Node version Heroku deploys with? I'm not too familiar with Heroku.

@linuswillner
Copy link
Author

linuswillner commented Dec 3, 2023

Correct, this only happens in Heroku - locally it works fine (that's also our workaround for now).

Heroku deploys with Node 18 in our configuration, the exact version is configurable. Local deployments are similarly run with Node 18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants