SideProjectGuys / invite-manager-bot

A discord bot that tracks invites and much more
https://docs.invitemanager.co/
GNU General Public License v3.0
165 stars 135 forks source link

Unable to start the bot #121

Closed Sasiko closed 4 years ago

Sasiko commented 4 years ago

Centos 7 mariadb

trying npm start gets me this error https://i.imgur.com/RD6iDjD.png

not sure what i did wrong i renamed to config.json https://i.imgur.com/7NJIbxV.png https://i.imgur.com/ [REDACTED BOT TOKEN]

Valandur commented 4 years ago

Hi. Please make sure not to post sensitive data such as your bot token. I have removed it for you, but please invalidate it it just to be sure.

As for your issue: What branch are you running, master or the newest develop? Did you run npm install before starting the bot?

Sasiko commented 4 years ago

Oh sorry, i forgot to censor the token. but thanks for removing it for me and i will invalidate the tokn, thank you.

i did git clone to default branch which is defaulted to master branch

Yes, i did npm install without any issues.

Valandur commented 4 years ago

What version of node are you using?

Valandur commented 4 years ago

Fixed in the latest master, try pulling again.

Sasiko commented 4 years ago

thanks, i did a pull and it gave me descriptive details, however bot is still offlne

Loading commands... Loaded botConfig from botConfig.js Loaded config from config.js Loaded interactiveConfig from interactiveConfig.js Loaded inviteCodeConfig from inviteCodeConfig.js Loaded memberConfig from memberConfig.js Loaded permissions from permissions.js Loaded setup from setup.js Loaded botInfo from botInfo.js Loaded credits from credits.js Loaded getBot from getBot.js Loaded help from help.js Loaded members from members.js Loaded ping from ping.js Loaded prefix from prefix.js Loaded support from support.js Loaded export from export.js Loaded premium from premium.js Loaded tryPremium from tryPremium.js Loaded makeMentionable from makeMentionable.js Loaded mentionRole from mentionRole.js Unhandled Rejection at: Promise Promise [Object] { _bitField: 18087936, _fulfillmentHandler0: TypeError: canvas is not a constructor at Object. (/home//invite-manager-bot/bin/modules/invites/models/Chart.js:18:18) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home//invite-manager-bot/bin/modules/invites/commands/graph.js:11:17) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at fs_1.readdirSync.forEach (/home//invite-manager-bot/bin/framework/services/Commands.js:37:27) at Array.forEach () at loadRecursive (/home//invite-manager-bot/bin/framework/services/Commands.js:28:62) at fs_1.readdirSync.forEach (/home//invite-manager-bot/bin/framework/services/Commands.js:31:17) at Array.forEach () at loadRecursive (/home//invite-manager-bot/bin/framework/services/Commands.js:28:62), _rejectionHandler0: undefined, _promise0: undefined, _receiver0: undefined } reason: TypeError: canvas is not a constructor at Object. (/home//invite-manager-bot/bin/modules/invites/models/Chart.js:18:18) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home//invite-manager-bot/bin/modules/invites/commands/graph.js:11:17) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at fs_1.readdirSync.forEach (/home//invite-manager-bot/bin/framework/services/Commands.js:37:27) at Array.forEach () at loadRecursive (/home//invite-manager-bot/bin/framework/services/Commands.js:28:62) at fs_1.readdirSync.forEach (/home//invite-manager-bot/bin/framework/services/Commands.js:31:17) at Array.forEach () at loadRecursive (/home//invite-manager-bot/bin/framework/services/Commands.js:28:62)

Valandur commented 4 years ago

It currently only works with node v10, not node v12 because of the canvas library used for the graph command

Sasiko commented 4 years ago

yeah but however the version is in 10 v10.16.3

Sasiko commented 4 years ago

another issue im seeing

cache: { guilds: 0, users: 1, channels: 0, roles: 0, ranks: 0, settings: 0, premium: 0, permissions: 0, strikes: 0, punishments: 0, inviteCodes: 0, members: 0, messages: 0 } } Error: Invalid session at ws.onclose (/home//invite-manager-bot/node_modules/eris/lib/gateway/Shard.js:1673:27) at WebSocketClient.internalOnClose (/home//invite-manager-bot/node_modules/uws/uws.js:121:17) at process.nextTick (/home//invite-manager-bot/node_modules/uws/uws.js:64:19) at process._tickCallback (internal/process/next_tick.js:61:11) DISCORD CONNECT Send message to RabbitMQ { id: 'status', cmd: 'STATUS', connected: true, gateway: undefined, guilds: 0, error: null, tracking: { pendingGuilds: [], initialPendingGuilds: 0 }, music: { connections: [] }, cache: { guilds: 0, users: 1, channels: 0, roles: 0, ranks: 0, settings: 0, premium: 0, permissions: 0, strikes: 0, punishments: 0, inviteCodes: 0, members: 0, messages: 0 } } DISCORD ERROR: { Error: invalid stored block lengths at Zlib.zlibOnError [as onerror] (zlib.js:162:17) errno: -3, code: 'Z_DATA_ERROR' } DISCORD DISCONNECT Send message to RabbitMQ { id: 'status', cmd: 'STATUS', connected: false, gateway: undefined, guilds: 0, error: 'Invalid session', tracking: { pendingGuilds: [], initialPendingGuilds: 0 }, music: { connections: [] }, cache: { guilds: 0, users: 1, channels: 0, roles: 0, ranks: 0, settings: 0, premium: 0, permissions: 0, strikes: 0, punishments: 0, inviteCodes: 0, members: 0, messages: 0 } } Error: Invalid session at ws.onclose (/home//invite-manager-bot/node_modules/eris/lib/gateway/Shard.js:1673:27) at WebSocketClient.internalOnClose (/home//invite-manager-bot/node_modules/uws/uws.js:121:17) at process.nextTick (/home//invite-manager-bot/node_modules/uws/uws.js:64:19) at process._tickCallback (internal/process/next_tick.js:61:11)

Valandur commented 4 years ago

Issue was resolved by re-initializing repo