RITlug / teleirc

Go implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group
https://docs.teleirc.com/
GNU General Public License v3.0
140 stars 45 forks source link

Teleirc fails to start from master in certain environments #97

Closed Tjzabel closed 5 years ago

Tjzabel commented 5 years ago

Issue

Currently, when running teleirc from CentOS 7, teleirc does not start, citing an unexpected identifier.

In my experience, this usually occurs when async is not supported in nodejs. However, node is on version 8.x.x, which should support the async functionality added in the 7.x.x versions.

We need to figure out why the master branch is failing, and also whether or not this is an isolated case with a CentOS 7 server. Further testing needs to be done with our Dockerfiles to figure out if this is an isolated issue or not.

Stacktrace

/usr/lib64/teleirc/rit-foss/lib/TelegramHandlers/TgDocumentHandler.js:31
    async RelayDocumentMessage(from, document) {
          ^^^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib64/teleirc/rit-foss/lib/TeleIrc.js:9:27)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib64/teleirc/rit-foss/teleirc.js:6:17)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
Tjzabel commented 5 years ago

Update

Running teleirc from HEAD works perfectly fine on Fedora 29. I am wondering if this is indeed an old package versioning issue on the CentOS 7 machine.

The version of the CentOS 7 machine is just CentOS 7.0.

@jwflory I am actually still unable to reach the CentOS machine I've provisioned for RITlug teleirc. Did you ever get to running the Ansible update to allow me to ssh in? I can't even ping the machine.

Tjzabel commented 5 years ago

Additional Update

After debugging with @jwflory, it seems this is an issue with CentOS and EPEL, not teleirc. CentOS's node version is v6.14.3, which does not support asnyc calls. This makes teleirc fail.

Since we already specify a node version of ~8, this issue may be able to be closed. I'm leaving this open until our teleirc hack session sunday morning.

jwflory commented 5 years ago

It was a deployment issue. This was resolved after upgrading to Node v10.x LTS. The development bot is working and online again. Thanks for the debugging help @Tjzabel. :+1:

Closing. :clapper: