Rocket.chat: Fibers Bundle Issue

Created on 21 Feb 2016  Â·  23Comments  Â·  Source: RocketChat/Rocket.Chat

Fibers has build issues with 1.0.5, and I needed to modify it to use 1.0.9 to resolve my build issue.

deployment discussion

Most helpful comment

Is this fibers issue ever going to be resolved? Just tried updating to 0.48.2 and seeing the same issue. (n==2.1.0, node==v4.5.0)

All 23 comments

In addition, you'll need to replace program/server/npm/npm-bcrypt/ with a fresh npm install bcrypt of the latest. You have to do this for it to work.

This is definitely an issue that needs to be fixed.

I really recommend an updated bundle that fixes these versions upstream. There seems to be no issue using [email protected]

How did you get the latest fibers? I tried changing programs/server/package.json to 1.0.9
but npm install still gives:

npm ERR! Linux 3.13.0-62-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v5.9.1
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node ./build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node ./build.js'.

also, how to install fresh bcrypt?

I removed programs/server/npm-shrinkwrap and did npm install. it worked.
also did:
cd programs/server/npm/npm-bcrypt/
npm update

server appears to be functioning.
Are these problems because on node v5.9.1 ?

I confirm the problem!

To fix:
programs/server/package.json and change fibers to 1.0.13

cd programs/server/npm/npm-bcrypt/
npm update

Thanks @Mte90 for the instructions. Fixed problem I had when building. Please fix on master.

The documentation should state, that it is essential to install and run n 0.10.43, this fixed it for me running on latest debian jessie.

Might be related to these bugs:
https://github.com/RocketChat/Rocket.Chat/issues/3152
https://github.com/RocketChat/Rocket.Chat/issues/1340

Might be related to this pull-request:
https://github.com/meteor/meteor/pull/7218

@Mte90 @KyoZeus
programs/server/package.json is not the only location to change, after fiddling with the programs/server/package.json and having no effect, I searched for "fibers:" and found out that the file programs/server/npm-shrinkwrap.json needs to be adjusted too (I refused to delete that file as stated by @jots ) . I removed the dependency-resolution and got npm install working for me.

I followed the instructions as given in https://rocket.chat/docs/installation/manual-installation/ubuntu/#Install

Then saw the same bcrypt issue and after searching found this thread.

I deleted the Rocket.Chat folder. Ran the following:
tar zxvf rocket.chat.tgz
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server

Then I edited the npm-shrinkwrap.json and package.json files to change the fibers version to 1.0.14 (instead of 1.0.13 as suggested above by @Mte90 because it gave me errors of being unable to find fibers).

I then ran these commands:
cd programs/server/npm/npm-bcrypt/ npm update

After which I ran npm install and then cd ../.. and since I had already export the env variables, ran node main.js, but then again got this:
`/home/xxxx/Rocket.Chat/programs/server/node_modules/fibers/future.js:280
throw(ex);
^

Error: Module did not self-register.
at Error (native)
at Object.Module._extensions..node (module.js:583:18)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at bindings (/home/xxxx/Rocket.Chat/programs/server/npm/npm-bcrypt/node_modules/bindings/bindings.js:76:44)
at Object. (/home/xxxx/Rocket.Chat/programs/server/npm/npm-bcrypt/node_modules/bcrypt/bcrypt.js:3:35)
at Module._compile (module.js:556:32)
`

Edit 1: How do I get Rocket.Chat up and running now? Please help.
Edit 2: I am on 0.39.0.

Is this fibers issue ever going to be resolved? Just tried updating to 0.48.2 and seeing the same issue. (n==2.1.0, node==v4.5.0)

Can confirm this is still an issue in 0.52.0.

Is this still an issue in 0.62.2?

Cheers
Thomas

This is a pretty old issue. Going to go ahead and close this. Please re-open if it still occurs

It seems i have the same issue (i think ?!) when trying to install RocketChat latest version 0.73.2 on Raspbian 9.6 Stretch with Node 8.11.4 i stumble to this issue
I did the manual installation for Debian and now when i try to start the service it seems to fail because of this:
/opt/Rocket.Chat/programs/server/node_modules/fibers/future.js:313

The logs of the systemd service

janv. 12 05:37:19 raspberrypi systemd[1]: Started The Rocket.Chat server.
janv. 12 05:37:22 raspberrypi rocketchat[2465]: /opt/Rocket.Chat/programs/server/node_modules/fibers/future.js:313
janv. 12 05:37:22 raspberrypi systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
janv. 12 05:37:22 raspberrypi systemd[1]: rocketchat.service: Unit entered failed state.
janv. 12 05:37:22 raspberrypi systemd[1]: rocketchat.service: Failed with result 'exit-code'.

Any idea on how i could debug that? I really lack knowledge on NodeJS apps to know how to track down any solution :S

A similar issue happened to me on v1.1.0 (Ubuntu 18.04), though it went ok after removing node_modules and re-installing dependencies with meteor npm install

/home/rocketchat/.meteor/packages/meteor-tool/.1.8.0_2.1om3lwx.sy8++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20190523-16:27:44.281(8)? (STDERR)                         throw(ex);
W20190523-16:27:44.282(8)? (STDERR)                         ^
W20190523-16:27:44.282(8)? (STDERR) 
W20190523-16:27:44.282(8)? (STDERR) Error: Could not locate the bindings file. Tried:
W20190523-16:27:44.282(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/build/sharp.node
W20190523-16:27:44.282(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/build/Debug/sharp.node
W20190523-16:27:44.283(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/build/Release/sharp.node
W20190523-16:27:44.283(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/out/Debug/sharp.node
W20190523-16:27:44.283(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/Debug/sharp.node
W20190523-16:27:44.283(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/out/Release/sharp.node
W20190523-16:27:44.283(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/Release/sharp.node
W20190523-16:27:44.283(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/build/default/sharp.node
W20190523-16:27:44.284(8)? (STDERR)  → /home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/compiled/8.11.4/linux/x64/sharp.node
W20190523-16:27:44.284(8)? (STDERR)     at bindings (/home/rocketchat/updated_rc/Rocket.Chat/node_modules/bindings/bindings.js:96:9)
W20190523-16:27:44.302(8)? (STDERR)     at Object.<anonymous> (/home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/lib/constructor.js:10:34)
W20190523-16:27:44.303(8)? (STDERR)     at Module._compile (module.js:652:30)
W20190523-16:27:44.303(8)? (STDERR)     at Object.Module._extensions..js (module.js:663:10)
W20190523-16:27:44.303(8)? (STDERR)     at Module.load (module.js:565:32)
W20190523-16:27:44.303(8)? (STDERR)     at tryModuleLoad (module.js:505:12)
W20190523-16:27:44.304(8)? (STDERR)     at Function.Module._load (module.js:497:3)
W20190523-16:27:44.304(8)? (STDERR)     at Module.require (module.js:596:17)
W20190523-16:27:44.304(8)? (STDERR)     at require (internal/module.js:11:18)
W20190523-16:27:44.304(8)? (STDERR)     at Object.<anonymous> (/home/rocketchat/updated_rc/Rocket.Chat/node_modules/sharp/lib/index.js:3:15)
W20190523-16:27:44.304(8)? (STDERR)     at Module._compile (module.js:652:30)
W20190523-16:27:44.304(8)? (STDERR)     at Object.Module._extensions..js (module.js:663:10)
W20190523-16:27:44.305(8)? (STDERR)     at Module.load (module.js:565:32)
W20190523-16:27:44.305(8)? (STDERR)     at tryModuleLoad (module.js:505:12)
W20190523-16:27:44.305(8)? (STDERR)     at Function.Module._load (module.js:497:3)
W20190523-16:27:44.305(8)? (STDERR)     at Module.require (module.js:596:17)

Still an issue for me on Debian Stretch 9.13

root@xxx:~# journalctl -u rocketchat
-- Logs begin at Fri 2020-11-13 21:05:46 UTC, end at Sat 2020-11-14 13:03:05 UTC. --
Nov 14 13:02:30 xxx systemd[1]: Started The Rocket.Chat server.
Nov 14 13:02:56 xxx rocketchat[27959]: /home/rocket/Rocket.Chat/programs/server/node_modules/fibers/future.js:280
Nov 14 13:02:56 xxx rocketchat[27959]:                                                 throw(ex);
Nov 14 13:02:56 xxx rocketchat[27959]:                                                 ^
Nov 14 13:02:56 xxx rocketchat[27959]: TypeError: AsyncLocalStorage is not a constructor
Nov 14 13:02:56 xxx rocketchat[27959]:     at module (server/sdk/index.ts:23:34)
Nov 14 13:02:56 xxx rocketchat[27959]:     at fileEvaluate (packages/modules-runtime.js:336:7)
Nov 14 13:02:56 xxx systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
Nov 14 13:02:56 xxx systemd[1]: rocketchat.service: Unit entered failed state.
Nov 14 13:02:56 xxx systemd[1]: rocketchat.service: Failed with result 'exit-code'.

I think the bug is back : I'm using the same bash script to update my RocketChat since at least two years, and I got this bug this morning ...

I confirm it's linked to 3.8.x version :
I forced my script to download 3.8.0 => same error
I force my script to download 3.7.2 => it's OK

For me problem with future.js was fixed for version 3.8.1 by upgrading to NodeJS Version to version 12.19.1.

For me problem with future.js was fixed for version 3.8.1 by upgrading to NodeJS Version to version 12.19.1.

For me, this did not help here. Tried 12.19.1 and 12.20.0 as well with the 3.8.1 - no success.

Figured it out myself: On CentOS, even nvm installs to a different location then /usr/local/bin/node, but Rocket.Chat looks for that version. after renaming and symlinking, it works fine now!

For me problem with future.js was fixed for version 3.8.1 by upgrading to NodeJS Version to version 12.19.1.

For me, this did not help here. Tried 12.19.1 and 12.20.0 as well with the 3.8.1 - no success.

Same for me too. Using nodejs 12.20.0 and 3.8.1 don't work with same error.

Go back to 3.7.x and working well on same server.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Buzzele picture Buzzele  Â·  3Comments

karlprieb picture karlprieb  Â·  3Comments

engelgabriel picture engelgabriel  Â·  3Comments

marceloschmidt picture marceloschmidt  Â·  3Comments

Buzzele picture Buzzele  Â·  3Comments