Closed alexblueskypilot closed 2 years ago
Hey
I assume you mean the scripted backup scripts from here Do you know where the error occurs? Does it give you a line number or something like that? This seems very much like a syntax error but I checked the scripts and they seemed fine π€
Hi!
No, I just run the command and the error appear then the script stops:
root@23-226-107-38:~# backup-docker backup Unexpected token {
Is there a specific log file or something I can check? I tried in root and normal user with sudo, same issue.
Thanks,
Alex.
I tried to reinstall it and got some errors as well:
loadDep:ssh2 β 304 β β’ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ /usr/local/bin/backup-docker -> /usr/local/lib/node_modules/backup-docker/bin/run.js
cpu-features@0.0.2 install /usr/local/lib/node_modules/backup-docker/node_modules/cpu-features node-gyp rebuild
make: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/build' ACTION Configuring dependencies /usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build/Makefile -- The C compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Looking for dlfcn.h -- Looking for dlfcn.h - found -- Looking for getauxval -- Looking for getauxval - found -- Configuring done -- Generating done -- Build files have been written to: /usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build TOUCH Release/obj.target/config_deps.stamp ACTION Building dependencies /usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build/libcpu_features.a make[1]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' make[2]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' make[3]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' Scanning dependencies of target unix_based_hardware_detection make[3]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' make[3]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' [ 11%] Building C object CMakeFiles/unix_based_hardware_detection.dir/src/hwcaps.c.o [ 22%] Building C object CMakeFiles/unix_based_hardware_detection.dir/src/unix_features_aggregator.c.o make[3]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' [ 22%] Built target unix_based_hardware_detection make[3]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' Scanning dependencies of target utils make[3]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' make[3]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' [ 33%] Building C object CMakeFiles/utils.dir/src/filesystem.c.o [ 44%] Building C object CMakeFiles/utils.dir/src/stack_line_reader.c.o [ 55%] Building C object CMakeFiles/utils.dir/src/string_view.c.o make[3]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' [ 55%] Built target utils make[3]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' Scanning dependencies of target cpu_features make[3]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' make[3]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' [ 66%] Building C object CMakeFiles/cpu_features.dir/src/cpuinfo_x86.c.o [ 77%] Linking C static library libcpu_features.a make[3]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' [ 77%] Built target cpu_features make[3]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' Scanning dependencies of target list_cpu_features make[3]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' make[3]: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' [ 88%] Building C object CMakeFiles/list_cpu_features.dir/src/utils/list_cpu_features.c.o [100%] Linking C executable list_cpu_features make[3]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' [100%] Built target list_cpu_features make[2]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' make[1]: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/deps/cpu_features/build' TOUCH Release/obj.target/build_deps.stamp CXX(target) Release/obj.target/cpufeatures/src/binding.o SOLINK_MODULE(target) Release/obj.target/cpufeatures.node COPY Release/cpufeatures.node make: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/cpu-features/build'
ssh2@1.5.0 install /usr/local/lib/node_modules/backup-docker/node_modules/ssh2 node install.js
make: Entering directory '/usr/local/lib/node_modules/backup-docker/node_modules/ssh2/lib/protocol/crypto/build'
CXX(target) Release/obj.target/sshcrypto/src/binding.o
../src/binding.cc: In member function βvoid ChaChaPolyCipher::clear()β:
../src/binding.cc:88:7: error: βEVP_MD_CTX_freeβ was not declared in this scope
EVP_MD_CTX_free(mdctx);
^~~~~~~
../src/binding.cc:88:7: note: suggested alternative: βEVP_MD_CTX_createβ
EVP_MD_CTX_free(mdctx);
^~~~~~~
EVP_MD_CTX_create
../src/binding.cc: In member function βErrorType ChaChaPolyCipher::init(unsigned char, size_t)β:
../src/binding.cc:111:23: error: βEVP_MD_CTX_newβ was not declared in this scope
|| (mdctx = EVP_MD_CTX_new()) == nullptr
^~~~~~
../src/binding.cc:111:23: note: suggested alternative: βEVP_MD_CTX_initβ
|| (mdctx = EVP_MD_CTX_new()) == nullptr
^~~~~~
EVP_MD_CTX_init
../src/binding.cc: In member function βErrorType ChaChaPolyCipher::encrypt(unsigned char, uint32_t, uint32_t)β:
../src/binding.cc:220:47: error: βEVP_PKEYPOLY1305β was not declared in this scope
polykey = EVP_PKEY_new_raw_private_key(EVP_PKEY_POLY1305,
^~~~~
../src/binding.cc:220:47: note: suggested alternative: βEVP_PKEY_get1DHβ
polykey = EVP_PKEY_new_raw_private_key(EVP_PKEY_POLY1305,
^~~~~
EVP_PKEY_get1_DH
../src/binding.cc:220:18: error: βEVP_PKEY_new_raw_privatekeyβ was not declared in this scope
polykey = EVP_PKEY_new_raw_private_key(EVP_PKEY_POLY1305,
^~~~~~~~
../src/binding.cc:220:18: note: suggested alternative: βEVP_PKEY_new_mackeyβ
polykey = EVP_PKEY_new_raw_private_key(EVP_PKEY_POLY1305,
^~~~~~~~
EVP_PKEY_new_mac_key
../src/binding.cc:240:9: error: βEVP_DigestSignβ was not declared in this scope
if (EVP_DigestSign(mdctx,
^~~~~~
../src/binding.cc:240:9: note: suggested alternative: βEVP_DigestSignInitβ
if (EVP_DigestSign(mdctx,
^~~~~~
EVP_DigestSignInit
../src/binding.cc: In member function βErrorType AESGCMCipher::init(const char, unsigned char, size_t, unsigned char, size_t)β:
../src/binding.cc:392:36: error: βEVP_CTRL_AEAD_SET_IVLENβ was not declared in this scope
if (!EVP_CIPHER_CTXctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, nullptr)) {
^~~~~~~
../src/binding.cc:392:36: note: suggested alternative: βEVP_CTRL_GCM_SET_IVLENβ
if (!EVP_CIPHER_CTXctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, nullptr)) {
^~~~~~~
EVP_CTRL_GCM_SET_IVLEN
../src/binding.cc: In member function βErrorType AESGCMCipher::encrypt(unsigned char, uint32_t)β:
../src/binding.cc:474:29: error: βEVP_CTRL_AEAD_GET_TAGβ was not declared in this scope
EVP_CTRL_AEAD_GET_TAG,
^~~~~
../src/binding.cc:474:29: note: suggested alternative: βEVP_CTRL_CCM_GET_TAGβ
EVP_CTRL_AEAD_GET_TAG,
^~~~~
EVP_CTRL_CCM_GET_TAG
../src/binding.cc: In member function βvoid GenericCipher::clear()β:
../src/binding.cc:614:7: error: βHMAC_CTX_freeβ was not declared in this scope
HMAC_CTX_free(ctxhmac);
^~~~~
../src/binding.cc:614:7: note: suggested alternative: βHMAC_CTX_copyβ
HMAC_CTX_free(ctxhmac);
^~~~~
HMAC_CTX_copy
../src/binding.cc: In member function βErrorType GenericCipher::init(const char, unsigned char, size_t, unsigned char, size_t, const char, unsigned char, size_t, int)β:
../src/binding.cc:694:22: error: βHMAC_CTX_newβ was not declared in this scope
if ((ctxhmac = HMAC_CTX_new()) == nullptr
^~~~
../src/binding.cc:694:22: note: suggested alternative: βHMAC_CTX_initβ
if ((ctxhmac = HMAC_CTX_new()) == nullptr
^~~~
HMAC_CTX_init
../src/binding.cc: In member function βvoid ChaChaPolyDecipher::clear()β:
../src/binding.cc:956:7: error: βEVP_MD_CTX_freeβ was not declared in this scope
EVP_MD_CTX_free(mdctx);
^~~~~~~
../src/binding.cc:956:7: note: suggested alternative: βEVP_MD_CTX_createβ
EVP_MD_CTX_free(mdctx);
^~~~~~~
EVP_MD_CTX_create
../src/binding.cc: In member function βErrorType ChaChaPolyDecipher::init(unsigned char, size_t)β:
../src/binding.cc:979:23: error: βEVP_MD_CTX_newβ was not declared in this scope
|| (mdctx = EVP_MD_CTX_new()) == nullptr
^~~~~~
../src/binding.cc:979:23: note: suggested alternative: βEVP_MD_CTX_initβ
|| (mdctx = EVP_MD_CTX_new()) == nullptr
^~~~~~
EVP_MD_CTX_init
../src/binding.cc: In member function βErrorType ChaChaPolyDecipher::decrypt(unsigned char, uint32_t, unsigned char, uint32_t)β:
../src/binding.cc:1097:47: error: βEVP_PKEYPOLY1305β was not declared in this scope
polykey = EVP_PKEY_new_raw_private_key(EVP_PKEY_POLY1305,
^~~~~
../src/binding.cc:1097:47: note: suggested alternative: βEVP_PKEY_get1DHβ
polykey = EVP_PKEY_new_raw_private_key(EVP_PKEY_POLY1305,
^~~~~
EVP_PKEY_get1_DH
../src/binding.cc:1097:18: error: βEVP_PKEY_new_raw_privatekeyβ was not declared in this scope
polykey = EVP_PKEY_new_raw_private_key(EVP_PKEY_POLY1305,
^~~~~~~~
../src/binding.cc:1097:18: note: suggested alternative: βEVP_PKEY_new_mackeyβ
polykey = EVP_PKEY_new_raw_private_key(EVP_PKEY_POLY1305,
^~~~~~~~
EVP_PKEY_new_mac_key
../src/binding.cc: In member function βErrorType AESGCMDecipher::init(const char, unsigned char, size_t, unsigned char, size_t)β:
../src/binding.cc:1353:36: error: βEVP_CTRL_AEAD_SET_IVLENβ was not declared in this scope
if (!EVP_CIPHER_CTXctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, nullptr)) {
^~~~~~~
../src/binding.cc:1353:36: note: suggested alternative: βEVP_CTRL_GCM_SET_IVLENβ
if (!EVP_CIPHER_CTXctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, nullptr)) {
^~~~~~~
EVP_CTRL_GCM_SET_IVLEN
../src/binding.cc: In member function βErrorType AESGCMDecipher::decrypt(unsigned char, uint32_t, unsigned char, unsigned char)β:
../src/binding.cc:1426:35: error: βEVP_CTRL_AEAD_SET_TAGβ was not declared in this scope
if (EVP_CIPHER_CTXctrl(ctx, EVP_CTRL_AEAD_SET_TAG, 16, tag) != 1) {
^~~~~
../src/binding.cc:1426:35: note: suggested alternative: βEVP_CTRL_GCM_SET_TAGβ
if (EVP_CIPHER_CTXctrl(ctx, EVP_CTRL_AEAD_SET_TAG, 16, tag) != 1) {
^~~~~
EVP_CTRL_GCM_SET_TAG
../src/binding.cc: In member function βvoid GenericDecipher::clear()β:
../src/binding.cc:1586:7: error: βHMAC_CTX_freeβ was not declared in this scope
HMAC_CTX_free(ctxhmac);
^~~~~
../src/binding.cc:1586:7: note: suggested alternative: βHMAC_CTX_copyβ
HMAC_CTX_free(ctxhmac);
^~~~~
HMAC_CTX_copy
../src/binding.cc: In member function βErrorType GenericDecipher::init(const char, unsigned char, size_t, unsigned char, size_t, const char, unsigned char*, size_t, int, size_t)β:
../src/binding.cc:1667:22: error: βHMAC_CTX_newβ was not declared in this scope
if ((ctxhmac = HMAC_CTX_new()) == nullptr
^~~~
../src/binding.cc:1667:22: note: suggested alternative: βHMAC_CTX_initβ
if ((ctxhmac = HMAC_CTX_new()) == nullptr
^~~~
HMAC_CTX_init
sshcrypto.target.mk:97: recipe for target 'Release/obj.target/sshcrypto/src/binding.o' failed
make: *** [Release/obj.target/sshcrypto/src/binding.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/backup-docker/node_modules/ssh2/lib/protocol/crypto/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-161-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "--target=v8.10.0" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/backup-docker/node_modules/ssh2/lib/protocol/crypto
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Failed to build optional crypto binding
/usr/local/lib
βββ¬ backup-docker@1.5.5
βββ commander@4.1.1
βββ¬ dockerode@3.3.1
β βββ¬ docker-modem@3.0.3
β β βββ¬ debug@4.3.3
β β β βββ ms@2.1.2
β β βββ¬ readable-stream@3.6.0
β β β βββ inherits@2.0.4
β β β βββ¬ string_decoder@1.3.0
β β β β βββ safe-buffer@5.2.1
β β β βββ util-deprecate@1.0.2
β β βββ split-ca@1.0.1
β β βββ¬ ssh2@1.5.0
β β βββ¬ asn1@0.2.6
β β β βββ safer-buffer@2.1.2
β β βββ¬ bcrypt-pbkdf@1.0.2
β β β βββ tweetnacl@0.14.5
β β βββ cpu-features@0.0.2
β β βββ nan@2.15.0
β βββ¬ tar-fs@2.0.1
β βββ chownr@1.1.4
β βββ mkdirp-classic@0.5.3
β βββ¬ pump@3.0.0
β β βββ end-of-stream@1.4.4
β β βββ¬ once@1.4.0
β β βββ wrappy@1.0.2
β βββ¬ tar-stream@2.2.0
β βββ¬ bl@4.1.0
β β βββ¬ buffer@5.7.1
β β βββ base64-js@1.5.1
β β βββ ieee754@1.2.1
β βββ fs-constants@1.0.0
βββ limit-async@1.3.0
Hi! Any idea on what I can try to fix that? Thanks!
Hey, sorry for the late reply.
Sorry, I don't have a lot of answers here, I haven't seen this before π€
It seems like you have an issue with node-gyp
not being able to run make
gyp ERR! stack Error: make failed with exit code: 2
What operating system are you on? I just tried on MacOS 12.1 and it installed and ran without a hitch π€ Also, are you on x86 or ARM? For example, if it's an M1 Mac then that might have an effect. I have tested and it worked on a Raspberry PI 4 but I don't have an M1 mac to test with sadly :/
See if you can figure out the node-gyp
issue and if it works then :)
Let me know if you need more help!
Hey π I hope you managed to get it working. This seems inactive so I'll close it for now but please feel free to reopen if you still need help.
Hi,
When trying to run the script I have this error:
Unexpected token {
How can I fix that?
Thanks,
Alex.