Node-slack-sdk: 500 Internal Server Error, how to resolve it?

Created on 26 Aug 2019  路  6Comments  路  Source: slackapi/node-slack-sdk

Description

Describe your issue here.

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

  • [ ] bug
  • [ ] enhancement (feature request)
  • [ ] question
  • [x] documentation related
  • [ ] testing related
  • [ ] discussion

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

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] 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.

Packages:

Select all that apply:

  • [ ] @slack/web-api
  • [ ] @slack/events-api
  • [x] @slack/interactive-messages
  • [ ] @slack/rtm-api
  • [ ] @slack/webhooks
  • [ ] I don't know

Reproducible in:

package version:

node version:
v12.9.0

OS version(s):
Mac OS 10.14

Steps to reproduce:

  1. select room
  2. POST /slack/actions -> 500 Internal Server Error
  3. DEBUG @slack/interactive-messages:http-handler request received - method: POST, path: / +0ms

Expected result:

What you expected to happen

Actual result:

What actually happened

Attachments:

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

it seem like the post is missing the /slack/actions, how do i go about debug and add it?

interactive-messages question

All 6 comments

I had a similar issue. It was caused by body-parser coming before Slack in my express middleware setup. Body parser makes it so Slack can't validate the signature.

I am facing the same issue! No matter where I place the body-parser in app definition the problem persists. @defrex

Any workaround you found for these? @kohdesmond

@kohdesmond @vj-cyntexa can you share some sample code of how you've initiated the server?

from the description of your issue, it seems like you were getting DEBUG log statements. were there any log statements before or after that which you can share so we can be more helpful?

if we figure this out and there isn't some descriptive log statement about the cause for the error, that's something we should add.

thinking about what @defrex said here, it seems like we should be logging some info about what happens when the body is pre-parsed and the adapter cannot handle it. seems like we need to add a debug() statement before this line. Created #906 for this.

Hi, I am also facing similar issues with the API. However, in our setup we are going through a corporate web proxy. A better error message would be highly appreciated.

Closing this issue because #906 better captures a potential solution.

Was this page helpful?
0 / 5 - 0 ratings