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

@slack/bolt 3.8.1 fails to bind to $PORT on Heroku (3.7.0 works) #1256

Closed
5 of 10 tasks
TheJimFactor opened this issue Dec 29, 2021 · 5 comments
Closed
5 of 10 tasks

@slack/bolt 3.8.1 fails to bind to $PORT on Heroku (3.7.0 works) #1256

TheJimFactor opened this issue Dec 29, 2021 · 5 comments
Assignees
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
Milestone

Comments

@TheJimFactor
Copy link

TheJimFactor commented Dec 29, 2021

Description

When following the getting started guide or deploy to heroku guide https://slack.dev/bolt-js/deployments/heroku the deployment to heroku fails with the latest package 3.8.1.

Downgrading to package 3.2.0 which is used in https://github.com/slackapi/bolt-js/blob/main/examples/deploy-heroku/package.json seems to work though.

Tested versions that fail to bind (edit: tested incorrectly with a ^ in package.json):
3.8.1
3.7.0
3.6.0
3.5.0
3.4.1
3.3.0

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

package version: 3.8.1

node version: 16.x

OS version(s):

Steps to reproduce:

  1. Follow guide - https://slack.dev/bolt-js/deployments/heroku
  2. deploy to heroku
  3. see Error R10 (Boot Timeout)

Expected result:

Work like 3.2.0

Actual result:

Fails to bind Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

2021-12-29T01:23:34.024885+00:00 heroku[web.1]: Starting process with command `npm start`
2021-12-29T01:23:35.218892+00:00 app[web.1]:
2021-12-29T01:23:35.218911+00:00 app[web.1]: > slackbolt@1.0.0 start
2021-12-29T01:23:35.218912+00:00 app[web.1]: > node app.js
2021-12-29T01:23:35.218912+00:00 app[web.1]:
2021-12-29T01:23:35.531688+00:00 app[web.1]: ⚡️ Bolt app is running!
2021-12-29T01:24:34.616926+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2021-12-29T01:24:34.769617+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-12-29T01:24:34.940739+00:00 heroku[web.1]: Process exited with status 137
2021-12-29T01:24:35.044769+00:00 heroku[web.1]: State changed from starting to crashed

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

@seratch seratch added the bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented label Dec 29, 2021
@seratch seratch added this to the 3.9.0 milestone Dec 29, 2021
@seratch seratch self-assigned this Dec 29, 2021
@seratch
Copy link
Member

seratch commented Dec 29, 2021

Hi @TheJimFactor, thanks for reporting this issue!

It is a regression bug caused by this PR: #1184 We'll fix this issue in the next release. This issue affects only v3.8.1 (the latest release). As a workaround, you can use @slack/bolt@3.7.0 for now.

@seratch seratch changed the title @slack/bolt 3.8.1 fails to bind to $PORT on heroku but 3.2.0 works @slack/bolt 3.8.1 fails to bind to $PORT on Heroku (3.7.0 works) Dec 29, 2021
@TheJimFactor
Copy link
Author

TheJimFactor commented Dec 29, 2021

Hi @TheJimFactor, thanks for reporting this issue!

It is a regression bug caused by this PR: #1184 We'll fix this issue in the next release. This issue affects only v3.8.1 (the latest release). As a workaround, you can use @slack/bolt@3.7.0 for now.

Thanks for letting me know 3.7.0 works. I was testing it with "@slack/bolt": "^3.7.0" instead of "@slack/bolt": "3.7.0" and still having it fail, but removing the ^ has 3.7.0 working.

@seratch
Copy link
Member

seratch commented Jan 7, 2022

This issue was already resolved by #1210

@eyewell
Copy link

eyewell commented Jan 31, 2022

I have tried version 3.7.0, and version 3.2.0, and still get this R10 error on Heroku.
With developerMode enabled, I see this output consistently:

2022-01-31T23:16:02.722488+00:00 heroku[web.1]: State changed from crashed to starting
2022-01-31T23:16:04.931165+00:00 heroku[web.1]: Starting process with command npm start
2022-01-31T23:16:06.044048+00:00 app[web.1]:
2022-01-31T23:16:06.044059+00:00 app[web.1]: > testbot@1.0.0 start
2022-01-31T23:16:06.044059+00:00 app[web.1]: > node index.js
2022-01-31T23:16:06.044059+00:00 app[web.1]:
2022-01-31T23:16:06.341191+00:00 app[web.1]: [DEBUG] bolt-app initialized
2022-01-31T23:16:06.342013+00:00 app[web.1]: [DEBUG] bolt-app adding Developer Mode custom OAuth failure handler
2022-01-31T23:16:06.342073+00:00 app[web.1]: [DEBUG] bolt-app Initializing SocketModeReceiver
2022-01-31T23:16:06.344400+00:00 app[web.1]: [DEBUG] bolt-app The logLevel given to WebClient was ignored as you also gave logger
2022-01-31T23:16:06.344555+00:00 app[web.1]: [DEBUG] bolt-app initialized
2022-01-31T23:16:06.344981+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 transitioning to state: disconnected
2022-01-31T23:16:06.345232+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 initialized
2022-01-31T23:16:06.345693+00:00 app[web.1]: [DEBUG] bolt-app apiCall('auth.test') start
2022-01-31T23:16:06.346936+00:00 app[web.1]: [DEBUG] bolt-app will perform http request
2022-01-31T23:16:06.374875+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 start()
2022-01-31T23:16:06.375662+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 transitioning to state: connecting
2022-01-31T23:16:06.375663+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 transitioning to state: connecting:authenticating
2022-01-31T23:16:06.375664+00:00 app[web.1]: [DEBUG] bolt-app apiCall('apps.connections.open') start
2022-01-31T23:16:06.376048+00:00 app[web.1]: [DEBUG] bolt-app will perform http request
2022-01-31T23:16:06.402337+00:00 app[web.1]: [DEBUG] bolt-app http response received
2022-01-31T23:16:06.403023+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 transitioning to state: connecting:authenticated
2022-01-31T23:16:06.405857+00:00 app[web.1]: ⚡️ Bolt app is running!
2022-01-31T23:16:06.413732+00:00 app[web.1]: [DEBUG] bolt-app http response received
2022-01-31T23:16:06.420752+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 transitioning to state: connecting:handshaking
2022-01-31T23:16:06.429105+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 received a message on the WebSocket: {"type":"hello","num_connections":1,"debug_info":{"host":"applink-5d9784f894-bc58m","build_number":2,"approximate_connection_time":18060},"connection_info":{"app_id":"A02R8AAQ7MG"}}
2022-01-31T23:16:06.429255+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 transitioning to state: connected
2022-01-31T23:16:06.429349+00:00 app[web.1]: [DEBUG] socket-mode:SocketModeClient:0 transitioning to state: connected:ready
2022-01-31T23:17:05.152977+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-01-31T23:17:05.187910+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-01-31T23:17:05.347391+00:00 heroku[web.1]: Process exited with status 22
2022-01-31T23:17:05.210339+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2022-01-31T23:17:05.421715+00:00 heroku[web.1]: State changed from starting to crashed

@seratch
Copy link
Member

seratch commented Jan 31, 2022

@eyewell This issue was resolved in v3.9.0. Please try the latest version out.

elliehastings added a commit to elliehastings/kudobot that referenced this issue Feb 5, 2022
Attempts to resolve the R10 error in Heroku.

slackapi/bolt-js#1256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
Projects
None yet
Development

No branches or pull requests

3 participants