probot / create-probot-app

🤖📦 Create a new probot app
ISC License
236 stars 106 forks source link

Example app isn't working #33

Closed stefanbuck closed 6 years ago

stefanbuck commented 6 years ago

Hi,

I wanted to create my second probot app with this generator. I followed this steps. For testing purposes I enabled all permissions as you suggested. I made all required changes to .env and link my a test repo with my app.

After running npm run dev I see the following request an all respond with a 20x status.

So far so good. If I create a new issue, I just get a 400 response and I have no idea where this is coming from. Looks like a POST request to / is failing.

19:49:59.237Z  INFO http: POST / 400 - 1.84 ms (id=XXXX-XXXX-XXXX-XXXX-XXXX)
19:49:59.242Z ERROR probot: Bad Request
  Error: Bad Request
      at Request.callback (/Users/stefan/code/probot-app/node_modules/superagent/lib/node/index.js:706:15)
      at IncomingMessage.parser (/Users/stefan/code/probot-app/node_modules/superagent/lib/node/index.js:916:18)
      at IncomingMessage.emit (events.js:187:15)
      at IncomingMessage.EventEmitter.emit (domain.js:442:20)
      at endReadableNT (_stream_readable.js:1090:12)
      at process._tickCallback (internal/process/next_tick.js:63:19)

I'm using node v10.3.0 and npm 6.1.0.

hiimbex commented 6 years ago

Looks like a duplicate of https://github.com/probot/probot/issues/607 and https://github.com/probot/probot/issues/568

Can you double check that your Webhook Secret is set on your GitHub App settings, and in your local .env

stefanbuck commented 6 years ago

Indeed, looks related to the mentioned issues. Sorry, I didn't think about searching for the issue there. I was conficed that it's a generator issue.

I changed my webhook secret right after setting up the app and updated the .env as well. This shouldn't effect my certificate I guess, right?

stefanbuck commented 6 years ago

Ohh man, I used smee.io redelivery feature to retirgger a webhook from an issue that I created before updating my secret 🤦‍♂️ After creating a new issue it works.

hiimbex commented 6 years ago

Glad you got it working @stefanbuck!