probot / stale

A GitHub App built with Probot that closes abandoned Issues and Pull Requests after a period of inactivity.
https://probot.github.io/apps/stale/
ISC License
1.25k stars 212 forks source link

Message Not Found #182

Closed Rizbe closed 5 years ago

Rizbe commented 5 years ago

Running this bot with latest master and seeing the following

Error: Propery `event` is deprecated, use `name`
    at Application.<anonymous> (/app/node_modules/probot/lib/application.js:99:34)
    at step (/app/node_modules/probot/lib/application.js:40:23)
    at Object.next (/app/node_modules/probot/lib/application.js:21:53)
    at /app/node_modules/probot/lib/application.js:15:71
    at new Promise (<anonymous>)
    at __awaiter (/app/node_modules/probot/lib/application.js:11:12)
    at Application.receive (/app/node_modules/probot/lib/application.js:95:16)
    at Timeout.intervals.(anonymous function).setInterval [as _onTimeout] (/app/node_modules/probot-scheduler/index.js:63:58)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
16:24:41.845Z ERROR event: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/apps/#create-a-new-installation-token"}
  HttpError: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/apps/#create-a-new-installation-token"}
      at response.text.then.message (/app/node_modules/@octokit/rest/lib/request/request.js:72:19)
      at process._tickCallback (internal/process/next_tick.js:68:7)
  --
  event: {
    "event": "schedule.repository",
    "installation": 598249,
    "repository": "FOO/terraform-aws-modules"
  }
16:24:41.845Z ERROR probot: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/apps/#create-a-new-installation-token"}
  HttpError: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/apps/#create-a-new-installation-token"}
      at response.text.then.message (/app/node_modules/@octokit/rest/lib/request/request.js:72:19)
      at process._tickCallback (internal/process/next_tick.js:68:7)

screen shot 2019-01-22 at 11 30 44 am

The app has access to the following repo, so not sure what's going on

Namone commented 5 years ago

I am having a similar issue when it is installed on a private organization.

Rizbe commented 5 years ago

Also seeing this

18:32:38.322Z ERROR event: {"message":"Resource not accessible by integration","documentation_url":"https://developer.github.com/v3/repos/contents/#get-contents"}
  HttpError: {"message":"Resource not accessible by integration","documentation_url":"https://developer.github.com/v3/repos/contents/#get-contents"}
      at response.text.then.message (/app/node_modules/@octokit/rest/lib/request/request.js:72:19)
      at process._tickCallback (internal/process/next_tick.js:68:7)
  --
  event: {
    "event": "schedule.repository",
    "installation": 608668,
    "repository": "FOO/terraform-aws-modules"
  }
18:32:38.323Z ERROR probot: {"message":"Resource not accessible by integration","documentation_url":"https://developer.github.com/v3/repos/contents/#get-contents"}
  HttpError: {"message":"Resource not accessible by integration","documentation_url":"https://developer.github.com/v3/repos/contents/#get-contents"}
      at response.text.then.message (/app/node_modules/@octokit/rest/lib/request/request.js:72:19)
      at process._tickCallback (internal/process/next_tick.js:68:7)

The app is installed on that repo, also deleted the app on the repo and reinstalled, still the same

Rizbe commented 5 years ago

I think the error I faced might have been due to not add this

Single File - Read-only
Path: .github/stale.yml

After adding that, it has been running for an hour and the only message I see now is

Error: Propery `event` is deprecated, use `name`
    at Application.<anonymous> (/app/node_modules/probot/lib/application.js:99:34)
    at step (/app/node_modules/probot/lib/application.js:40:23)
    at Object.next (/app/node_modules/probot/lib/application.js:21:53)
    at /app/node_modules/probot/lib/application.js:15:71
    at new Promise (<anonymous>)
    at __awaiter (/app/node_modules/probot/lib/application.js:11:12)
    at Application.receive (/app/node_modules/probot/lib/application.js:95:16)
    at Timeout.intervals.(anonymous function).setTimeout [as _onTimeout] (/app/node_modules/probot-scheduler/index.js:66:13)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
Rizbe commented 5 years ago

Also not sure why I am seeing this

ERROR probot: Go to https://github.com/settings/apps/YOUR_APP and verify that the Webhook secret matches the value of the WEBHOOK_SECRET environment variable.
  Error: Required headers missing: x-github-event, x-hub-signature, x-github-delivery
      at middleware (/app/node_modules/@octokit/webhooks/middleware/middleware.js:28:19)
      at newFn (/app/node_modules/express-async-errors/index.js:16:20)
      at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
      at /app/node_modules/express/lib/router/index.js:284:7
      at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
      at next (/app/node_modules/express/lib/router/index.js:275:10)
      at /app/node_modules/probot/lib/middleware/logging.js:35:9
      at newFn (/app/node_modules/express-async-errors/index.js:16:20)
      at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
      at /app/node_modules/express/lib/router/index.js:284:7
      at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
      at next (/app/node_modules/express/lib/router/index.js:275:10)
      at expressInit (/app/node_modules/express/lib/middleware/init.js:40:5)
      at newFn (/app/node_modules/express-async-errors/index.js:16:20)
      at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
      at /app/node_modules/express/lib/router/index.js:284:7
      at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
      at next (/app/node_modules/express/lib/router/index.js:275:10)
      at query (/app/node_modules/express/lib/middleware/query.js:45:5)
      at newFn (/app/node_modules/express-async-errors/index.js:16:20)
      at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
      at /app/node_modules/express/lib/router/index.js:284:7
      at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
      at next (/app/node_modules/express/lib/router/index.js:275:10)
      at Function.handle (/app/node_modules/express/lib/router/index.js:174:3)
      at Function.handle (/app/node_modules/express/lib/application.js:174:10)
      at Server.app (/app/node_modules/express/lib/express.js:39:9)
      at Server.emit (events.js:182:13)
      at Server.EventEmitter.emit (domain.js:441:20)
      at parserOnIncoming (_http_server.js:672:12)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)

Checked the var $WEBHOOK_SECRET and it's the same one used for the github app

Rizbe commented 5 years ago

Forgot to add the stale config per repo 🤦‍♂️