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 after completion #189

Closed
linuswillner opened this issue Oct 4, 2022 · 5 comments
Closed

slash-up sync hangs after completion #189

linuswillner opened this issue Oct 4, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@linuswillner
Copy link

Whenever I run npx slash-up sync, the command will hang for an undefined amount of time despite apparently succeeding. I say undefined because I haven't tried leaving it running indefinitely to figure out whether it's actually going to ever exit, but anecdotal testing suggests it can stay hung for at least 15 minutes.

Placing a console.log at the end of the handler() function in lib/commands/sync.js seems to suggest that it reaches the end of the function no problem, so maybe there something is not terminating properly somewhere?

Here's the configuration I'm using (I logged out process.env to ensure the environment values referenced are defined).

module.exports = {
  token: process.env.DISCORD_BOT_TOKEN,
  applicationId: process.env.DISCORD_APP_ID,
  commandPath: './src/commands',
  env: {
    development: {
      globalToGuild: process.env.DEVELOPMENT_GUILD_ID
    }
  }
}

Since I run npx slash-up sync as a deploy step, this is quite annoying. I can of course manually patch over the issue with timeout, but it'd still be nice to have a proper fix.

@Snazzah
Copy link
Owner

Snazzah commented Oct 5, 2022

So it outputs as normal but fails to exit afterwards? Huh. I haven't ran into a problem like that, but does explicitly calling process.exit at the end fix the issue?

@linuswillner
Copy link
Author

linuswillner commented Oct 5, 2022

That's correct. I didn't try the process.exit() approach however. I could try though, I'll get back to you on Monday.

@Snazzah Snazzah added the bug Something isn't working label Oct 5, 2022
@linuswillner
Copy link
Author

linuswillner commented Oct 16, 2022

Sorry, I took way too long to get back to you on this issue, but yes, putting process.exit() at the end of the handler function does indeed exit the app. 🤔

Some more information: A team member of mine is experiencing none of this issue. They are, however, on Linux (specifically NixOS), while I'm working on Windows. I haven't tried running the project where I use this on a Mac to confirm whether this could indeed be a Windows-specific issue.

@Snazzah
Copy link
Owner

Snazzah commented Oct 17, 2022

Can you check to see if this is fixed on v1.2.1?

@linuswillner
Copy link
Author

Yep, that's fixed it! Cheers!

@Snazzah Snazzah closed this as completed Oct 17, 2022
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