Skip to content

Bot failing to start: TypeError: glob.sync is not a function #376

@richardlau

Description

@richardlau

@tniessen reports that Jenkins status is still not being posted to pull requests.

Looking at https://ci.nodejs.org/job/post-build-status-update runs, e.g. https://ci.nodejs.org/job/post-build-status-update/1837783/flowGraphTable/, I can see that although the jobs are green, the HTTP request to the bot has failed:
image

https://ci.nodejs.org/job/post-build-status-update/1837783/execution/node/17/

hudson.AbortException: Fail: Status code 408 is not in the accepted range: 100:399

If I log into the server for the github-bot, I can see that the service isn't running:

root@infra-rackspace-debian8-x64-1:~# systemctl status github-bot
● github-bot.service - github-bot
   Loaded: loaded (/lib/systemd/system/github-bot.service; enabled)
   Active: activating (auto-restart) (Result: exit-code) since Tue 2023-03-07 12:19:55 UTC; 41ms ago
  Process: 25524 ExecStart=/usr/bin/node server.js (code=exited, status=1/FAILURE)
 Main PID: 25524 (code=exited, status=1/FAILURE)

Mar 07 12:19:55 infra-rackspace-debian8-x64-1 systemd[1]: github-bot.service: main process exited, code=exited, status=1/FAILURE
Mar 07 12:19:55 infra-rackspace-debian8-x64-1 systemd[1]: Unit github-bot.service entered failed state.
root@infra-rackspace-debian8-x64-1:~#

and from the syslog:

Mar  7 12:13:26 infra-rackspace-debian8-x64-1 systemd[1]: Started github-bot.
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: /home/iojs/github-bot/server.js:13
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: glob.sync(scriptsToLoad).forEach((file) => {
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: ^
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: TypeError: glob.sync is not a function
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: at Object.<anonymous> (/home/iojs/github-bot/server.js:13:6)
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: at Module._compile (internal/modules/cjs/loader.js:1063:30)
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: at Module.load (internal/modules/cjs/loader.js:928:32)
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: at Function.Module._load (internal/modules/cjs/loader.js:769:14)
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 node[24754]: at internal/main/run_main_module.js:17:47
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 systemd[1]: github-bot.service: main process exited, code=exited, status=1/FAILURE
Mar  7 12:13:26 infra-rackspace-debian8-x64-1 systemd[1]: Unit github-bot.service entered failed state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions