Connection Error...?

Description

When npm install on version 4.6.2, the following error was shown.
And then a desktop app and browers blink Connecting... bar above the screen, and can’t finish setup.
Could anyone tell me how to fix this issue?

Client Information

  • Desktop app: 3.8.4
  • Chrome: 100.0.4896.127
  • Safari: 15.4 (17613.1.17.1.13)
  • OS: macOS 12.3.1

Server Setup Information

  • Version of Rocket.Chat Server: 4.6.2
  • Operating System: Debian GNU/Linux 11.3
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v14.19.1
  • MongoDB Version:
  • Proxy: apache
  • Firewalls involved: iptables only.

Any additional Information

make: Entering directory '/srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/tiny-secp256k1/build'
  CXX(target) Release/obj.target/secp256k1/native/addon.o
In file included from ../native/addon.cpp:4:
../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../node_modules/nan/nan.h:2298:7: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
 2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE ecdsaVerify(Nan::NAN_METHOD_ARGS_TYPE)’:
../native/addon.cpp:320:56: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
  320 |   strict = info[3]->BooleanValue(Nan::GetCurrentContext()).FromJust();
      |                                  ~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                        |
      |                                                        v8::Local<v8::Context>
In file included from /srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/node.h:67,
                 from ../node_modules/nan/nan.h:54,
                 from ../native/addon.cpp:4:
/srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/v8.h:2858:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 2858 |   bool BooleanValue(Isolate* isolate) const;
      |                     ~~~~~~~~~^~~~~~~
In file included from ../node_modules/nan/nan.h:54,
                 from ../native/addon.cpp:4:
../native/addon.cpp: At global scope:
/srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/node.h:793:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  793 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/node.h:827:3: note: in expansion of macro ‘NODE_MODULE_X’
  827 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../native/addon.cpp:359:1: note: in expansion of macro ‘NODE_MODULE’
  359 | NODE_MODULE(secp256k1, Init)
      | ^~~~~~~~~~~
../native/addon.cpp: In instantiation of ‘unsigned int {anonymous}::assumeCompression(const I&, const A&) [with long unsigned int index = 2; I = Nan::FunctionCallbackInfo<v8::Value>; A = v8::Local<v8::Object>]’:
../native/addon.cpp:142:50:   required from here
../native/addon.cpp:80:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
   80 |   if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
      |       ~~~~~~~~~~~~~~^~~~~~~~
../native/addon.cpp:82:58: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
   82 |   return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
      |                                    ~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                          |
      |                                                          v8::Local<v8::Context>
In file included from /srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/node.h:67,
                 from ../node_modules/nan/nan.h:54,
                 from ../native/addon.cpp:4:
/srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/v8.h:2858:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 2858 |   bool BooleanValue(Isolate* isolate) const;
      |                     ~~~~~~~~~^~~~~~~
../native/addon.cpp: In instantiation of ‘unsigned int {anonymous}::assumeCompression(const I&, const A&) [with long unsigned int index = 1; I = Nan::FunctionCallbackInfo<v8::Value>; A = v8::Local<v8::Object>]’:
../native/addon.cpp:174:49:   required from here
../native/addon.cpp:80:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
   80 |   if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
      |       ~~~~~~~~~~~~~~^~~~~~~~
../native/addon.cpp:82:58: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
   82 |   return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
      |                                    ~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                          |
      |                                                          v8::Local<v8::Context>
In file included from /srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/node.h:67,
                 from ../node_modules/nan/nan.h:54,
                 from ../native/addon.cpp:4:
/srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/v8.h:2858:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 2858 |   bool BooleanValue(Isolate* isolate) const;
      |                     ~~~~~~~~~^~~~~~~
../native/addon.cpp: In instantiation of ‘unsigned int {anonymous}::assumeCompression(const I&) [with long unsigned int index = 1; I = Nan::FunctionCallbackInfo<v8::Value>]’:
../native/addon.cpp:189:46:   required from here
../native/addon.cpp:87:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
   87 |   if (info.Length() <= index) return SECP256K1_EC_COMPRESSED;
      |       ~~~~~~~~~~~~~~^~~~~~~~
../native/addon.cpp:89:58: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
   89 |   return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
      |                                    ~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                          |
      |                                                          v8::Local<v8::Context>
In file included from /srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/node.h:67,
                 from ../node_modules/nan/nan.h:54,
                 from ../native/addon.cpp:4:
/srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/v8.h:2858:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 2858 |   bool BooleanValue(Isolate* isolate) const;
      |                     ~~~~~~~~~^~~~~~~
../native/addon.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE eccPrivateSub(Nan::NAN_METHOD_ARGS_TYPE)’:
../native/addon.cpp:240:29: warning: ignoring return value of ‘int secp256k1_ec_privkey_negate(const secp256k1_context*, unsigned char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  240 |  secp256k1_ec_privkey_negate(context, tweak_negated); // returns 1 always
      |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
make: *** [secp256k1.target.mk:150: Release/obj.target/secp256k1/native/addon.o] Error 1
make: Leaving directory '/srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/tiny-secp256k1/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Linux 5.10.0-13-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/tiny-secp256k1
gyp ERR! node -v v14.19.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tiny-secp256k1@1.1.3 build: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tiny-secp256k1@1.1.3 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /srv/Rocket.Chat/.npm/_logs/2022-04-20T12_17_18_600Z-debug.log
secp256k1 bindings compilation fail. Pure JS implementation will be used.

> core-js@3.14.0 postinstall /srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> fibers@5.0.1 install /srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/fibers
> node build.js || nodejs build.js

`linux-x64-83-glibc` exists; testing
Binary is fine; exiting

> gc-stats@1.4.0 install /srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/gc-stats
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://node-binaries.s3.amazonaws.com/gcstats/v1.4.0/Release/node-v83-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for gc-stats@1.4.0 and node@14.19.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/gc-stats/build'
  CXX(target) Release/obj.target/gcstats/src/gcstats.o
In file included from ../../nan/nan.h:58,
                 from ../src/gcstats.cc:1:
/srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/node.h:793:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  793 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/srv/Rocket.Chat/.cache/node-gyp/14.19.1/include/node/node.h:827:3: note: in expansion of macro ‘NODE_MODULE_X’
  827 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/gcstats.cc:226:1: note: in expansion of macro ‘NODE_MODULE’
  226 | NODE_MODULE(gcstats, init)
      | ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/gcstats.node
  COPY Release/gcstats.node
  COPY /srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/gc-stats/build/gcstats/v1.4.0/Release/node-v83-linux-x64/gcstats.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/srv/Rocket.Chat/bundle-4.6.2/programs/server/npm/node_modules/gc-stats/build'