Giter VIP home page Giter VIP logo

aws-crt-nodejs's Introduction

AWS CRT JS

NodeJS/Browser bindings for the AWS Common Runtime

API Docs

License

This library is licensed under the Apache 2.0 License.

Building the package

Prereqs:

  • Node 14+
  • npm
  • CMake 3.1+
  • Linux: gcc 5+ or clang 3.6+
    • If your compiler can compile node, it can compile this library
  • Windows: Visual Studio 2015+
  • OSX: XCode or brew-installed llvm

To build the package locally

git clone https://github.com/awslabs/aws-crt-nodejs.git
cd aws-crt-nodejs
git submodule update --init
npm install

Using From Your NodeJS Application

Normally, you just declare aws-crt as a dependency in your package.json file.

Using From Your Browser Application

You can either add it to package.json (if using a tool like webpack), or just import the dist.browser/ folder into your web project

Installing from npm

npm install aws-crt

To reduce the size of package, we put the C source code in the S3 bucket. If the platform you are using doesn't have the prebuilt binary, the install script will pull the source from S3 bucket. In case of no public internet access, you can specify the "CRT_BINARY_HOST" environment variable for the host of the source code. The build script will fetch source code from that host instead. To fetch the source from S3, you can reach to the cloudfront distribution (Only works for version after v1.9.2) https://d332vdhbectycy.cloudfront.net/aws-crt-<version>-source.tgz, the sha256 checksum https://d332vdhbectycy.cloudfront.net/aws-crt-<version>-source.sha256

Debug C part of code

After building the package locally, use node ./scripts/build.js --debug to enable debug. Then, attach any C debugger to use node to run jest

Mac-Only TLS Behavior

Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v1.1.11, when a stored private key from the Keychain is used, the following will be logged at the "info" log level:

static: certificate has an existing certificate-key pair that was previously imported into the Keychain.  Using key from Keychain instead of the one provided.

aws-crt-nodejs's People

Contributors

alfred2g avatar bretambrose avatar coldencullen avatar davidogunsaws avatar dependabot[bot] avatar dmitriymusatkin avatar graebm avatar ilevyor avatar jmklix avatar jonathanhenson avatar orgads avatar rccarper avatar sbstevek avatar sfod avatar singku-china avatar sohibegit avatar srchase avatar sunhubs avatar tingdaok avatar trivikr avatar twistedtwigleg avatar waahm7 avatar xiazhvera avatar yasminetalby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-crt-nodejs's Issues

Install issue on raspberry pi 4

Info

cmake: 3.13.4
GCC: 8.3.0-6+rpi1

log

pi@raspberrypi:~/home-garage $ npm install aws-crt

> [email protected] install /home/pi/home-garage/node_modules/aws-crt
> node ./scripts/install.js

info TOOL Using Unix Makefiles generator.
info TOOL Building only the install target, as specified from the command line.
info CMD CONFIGURE
info TOOL Building only the install target, as specified from the command line.
info RUN cmake "/home/pi/home-garage/node_modules/aws-crt" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/home-garage/node_modules/aws-crt/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v13.12.0/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="13.12.0" -DNODE_ARCH="arm" -DCMAKE_EXPORT_COMPILE_COMMANDS="true" -DCMAKE_JS_PLATFORM="linux" -DCMAKE_JS_ARCH="arm"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 8.3.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
-- Using submodule dependencies
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Performing Test HAVE_MAY_I_USE
-- Performing Test HAVE_MAY_I_USE - Failed
-- Performing Test HAVE_BUILTIN_CPU_SUPPORTS
-- Performing Test HAVE_BUILTIN_CPU_SUPPORTS - Failed
-- Performing Test HAVE_MSVC_CPUIDEX
-- Performing Test HAVE_MSVC_CPUIDEX - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Packaging currently only supported on Fedora.
-- Found LibCrypto: /usr/lib/arm-linux-gnueabihf/libcrypto.a
-- LibCrypto Include Dir: /usr/include
-- LibCrypto Shared Lib:  /usr/lib/arm-linux-gnueabihf/libcrypto.so
-- LibCrypto Static Lib:  /usr/lib/arm-linux-gnueabihf/libcrypto.a
-- Attempting to try_compile PQ ASM
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
CMake Error at /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CMakeLists.txt:15 (add_executable):
  Cannot find source file:

    /home/pi/home-garage/node_modules/aws-crt/aws-common-runtime/s2n/tests/unit/s2n_pq_asm_noop_test.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CMakeLists.txt:15 (add_executable):
  No SOURCES given to target: cmTC_cc0d4


CMake Error at aws-common-runtime/s2n/CMakeLists.txt:118 (try_compile):
  Failed to generate test project build system.


-- Configuring incomplete, errors occurred!
See also "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
(node:8083) UnhandledPromiseRejectionWarning: Error: Process terminated: 1
    at ChildProcess.<anonymous> (/home/pi/home-garage/node_modules/cmake-js/lib/processHelpers.js:29:32)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
(node:8083) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:8083) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN [email protected] No description

+ [email protected]
updated 1 package and audited 2277 packages in 13.743s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

CMakeError.log

log
Performing C SOURCE FILE Test AWS_HAVE_MSVC_MULX failed with the following compile output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_5a198/fast"
/usr/bin/make -f CMakeFiles/cmTC_5a198.dir/build.make CMakeFiles/cmTC_5a198.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_5a198.dir/src.c.o
/usr/bin/cc   -DAWS_HAVE_MSVC_MULX   -o CMakeFiles/cmTC_5a198.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:4:5: warning: implicit declaration of function ‘_mulx_u32’ [-Wimplicit-function-declaration]
     _mulx_u32(1, 2, &foo);
     ^~~~~~~~~
Linking C executable cmTC_5a198
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5a198.dir/link.txt --verbose=1
/usr/bin/cc  -DAWS_HAVE_MSVC_MULX    -rdynamic CMakeFiles/cmTC_5a198.dir/src.c.o  -o cmTC_5a198
/usr/bin/ld: CMakeFiles/cmTC_5a198.dir/src.c.o: in function `main':
src.c:(.text+0x24): undefined reference to `_mulx_u32'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_5a198.dir/build.make:87: cmTC_5a198] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_5a198/fast] Error 2

...and run output:

Return value: 1
Source file was:

    int main() {
    int foo = 42;
    _mulx_u32(1, 2, &foo);
    return foo != 2;
    }
Performing C SOURCE FILE Test HAVE_M_AVX2_FLAG failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0e83b/fast"
/usr/bin/make -f CMakeFiles/cmTC_0e83b.dir/build.make CMakeFiles/cmTC_0e83b.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_0e83b.dir/src.c.o
/usr/bin/cc   -DHAVE_M_AVX2_FLAG   -mavx2 -o CMakeFiles/cmTC_0e83b.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
cc: error: unrecognized command line option '-mavx2'
make[1]: *** [CMakeFiles/cmTC_0e83b.dir/build.make:66: CMakeFiles/cmTC_0e83b.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_0e83b/fast] Error 2

Source file was:
int main(void) { return 0; }
Performing C SOURCE FILE Test HAVE_AVX2_INTRINSICS failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_79f68/fast"
/usr/bin/make -f CMakeFiles/cmTC_79f68.dir/build.make CMakeFiles/cmTC_79f68.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_79f68.dir/src.c.o
/usr/bin/cc   -DHAVE_AVX2_INTRINSICS   -o CMakeFiles/cmTC_79f68.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_79f68.dir/build.make:66: CMakeFiles/cmTC_79f68.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_79f68/fast] Error 2

Source file was:

#include <immintrin.h>
#include <emmintrin.h>
#include <string.h>

int main() {
    __m256i vec;
    memset(&vec, 0, sizeof(vec));

    _mm256_shuffle_epi8(vec, vec);
    _mm256_set_epi32(1,2,3,4,5,6,7,8);
    _mm256_permutevar8x32_epi32(vec, vec);

    return 0;
}
Performing C SOURCE FILE Test HAVE_MM256_EXTRACT_EPI64 failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e75f5/fast"
/usr/bin/make -f CMakeFiles/cmTC_e75f5.dir/build.make CMakeFiles/cmTC_e75f5.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e75f5.dir/src.c.o
/usr/bin/cc   -DHAVE_MM256_EXTRACT_EPI64   -o CMakeFiles/cmTC_e75f5.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_e75f5.dir/build.make:66: CMakeFiles/cmTC_e75f5.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_e75f5/fast] Error 2

Source file was:

#include <immintrin.h>
#include <string.h>

int main() {
    __m256i vec;
    memset(&vec, 0, sizeof(vec));
    return (int)_mm256_extract_epi64(vec, 2);
}
Performing C SOURCE FILE Test HAVE_MAY_I_USE failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_06dd6/fast"
/usr/bin/make -f CMakeFiles/cmTC_06dd6.dir/build.make CMakeFiles/cmTC_06dd6.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_06dd6.dir/src.c.o
/usr/bin/cc   -DHAVE_MAY_I_USE   -o CMakeFiles/cmTC_06dd6.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_06dd6.dir/build.make:66: CMakeFiles/cmTC_06dd6.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_06dd6/fast] Error 2

Source file was:

#include <immintrin.h>

int main() {
    return _may_i_use_cpu_feature(_FEATURE_AVX2 | _FEATURE_SSE4_1);
}

Performing C SOURCE FILE Test HAVE_BUILTIN_CPU_SUPPORTS failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_8a67b/fast"
/usr/bin/make -f CMakeFiles/cmTC_8a67b.dir/build.make CMakeFiles/cmTC_8a67b.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8a67b.dir/src.c.o
/usr/bin/cc   -DHAVE_BUILTIN_CPU_SUPPORTS   -o CMakeFiles/cmTC_8a67b.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_8a67b.dir/build.make:66: CMakeFiles/cmTC_8a67b.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_8a67b/fast] Error 2

Source file was:

#include <immintrin.h>

int main() {
    return __builtin_cpu_supports("avx2");
}

Performing C SOURCE FILE Test HAVE_MSVC_CPUIDEX failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e49b8/fast"
/usr/bin/make -f CMakeFiles/cmTC_e49b8.dir/build.make CMakeFiles/cmTC_e49b8.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e49b8.dir/src.c.o
/usr/bin/cc   -DHAVE_MSVC_CPUIDEX   -o CMakeFiles/cmTC_e49b8.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: intrin.h: No such file or directory
 #include <intrin.h>
          ^~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_e49b8.dir/build.make:66: CMakeFiles/cmTC_e49b8.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_e49b8/fast] Error 2

Source file was:

#include <intrin.h>

int main() {
    int cpuInfo[4] = {0};
    int function_id = 1;
    int subfunction_id = 1;
    __cpuidex(cpuInfo, function_id, subfunction_id);
    return 0;
}
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_a2976/fast"
/usr/bin/make -f CMakeFiles/cmTC_a2976.dir/build.make CMakeFiles/cmTC_a2976.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a2976.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_a2976.dir/CheckSymbolExists.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_a2976
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a2976.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_a2976.dir/CheckSymbolExists.c.o  -o cmTC_a2976
/usr/bin/ld: CMakeFiles/cmTC_a2976.dir/CheckSymbolExists.c.o: in function `main':
CheckSymbolExists.c:(.text+0x38): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_a2976.dir/build.make:87: cmTC_a2976] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a2976/fast] Error 2

File /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Performing C SOURCE FILE Test HAS_WGNU failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f1f64/fast"
/usr/bin/make -f CMakeFiles/cmTC_f1f64.dir/build.make CMakeFiles/cmTC_f1f64.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f1f64.dir/src.c.o
/usr/bin/cc   -DHAS_WGNU   -Wgnu -o CMakeFiles/cmTC_f1f64.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
cc: error: unrecognized command line option '-Wgnu'
make[1]: *** [CMakeFiles/cmTC_f1f64.dir/build.make:66: CMakeFiles/cmTC_f1f64.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_f1f64/fast] Error 2

Source file was:
int main(void) { return 0; }
Performing C SOURCE FILE Test HAS_SANITIZERS failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_dffa3/fast"
/usr/bin/make -f CMakeFiles/cmTC_dffa3.dir/build.make CMakeFiles/cmTC_dffa3.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_dffa3.dir/src.c.o
/usr/bin/cc   -DHAS_SANITIZERS   -fsanitize= -o CMakeFiles/cmTC_dffa3.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
cc: error: missing argument to '-fsanitize='
make[1]: *** [CMakeFiles/cmTC_dffa3.dir/build.make:66: CMakeFiles/cmTC_dffa3.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_dffa3/fast] Error 2

Source file was:
int main(void) { return 0; }

Browser support for SigV4A

Hello,

I have a React application targeting browsers and I'm trying to use this part of the AWS SDK: https://github.com/aws/aws-sdk-js-v3/tree/main/packages/signature-v4-crt (AWS SigV4A signing). That AWS SDK library doesn't work because it is assuming the native version of this package and using a bunch of exported things that are not exported in the browser dist.

A lot of this package seems to be missing in the browser distribution, the auth.ts file is almost empty: https://github.com/awslabs/aws-crt-nodejs/blob/main/lib/browser/auth.ts compared to the native counterpart: https://github.com/awslabs/aws-crt-nodejs/blob/main/lib/native/auth.ts

I don't know what else is missing, but is the intention that the browser and native distributions both end up with the same interface? Is this a WIP, or am I trying to do something that cannot be supported? Do I have any other options to use SigV4A signing in the browser?

Unsubscribe crashes connection in browser

Unsubscribe logic expects to receive a packet as a result of from MQTT.js client, but that returns only an optional error.

Screen Shot 2021-01-07 at 15 29 44

mqtt.ts:390 Uncaught TypeError: Cannot read property 'messageId' of undefined
    at mqtt.ts:390
    at MqttClient.push../node_modules/mqtt/lib/client.js.MqttClient._handleAck (client.js:1371)
    at MqttClient.push../node_modules/mqtt/lib/client.js.MqttClient._handlePacket (client.js:417)

Further more this seems to close the connection as following attempts to subscribe to other topics result in Error: Connection closed.

MQTT Subscribe callback topic with wildcard

When subscribing to an MQTT topic using wildcards e.g. mytopic/# the topic sent to the callback is not the actual topic name where the message was received. In version 1 the topic passed to the callback was e.g mytopic/sub1. Now in version 2 the callback receives the subscription e.g. mytopic/#

Is there any way to receive the actual topic called?

No notification of MQTT connection failures in browser

Version used: v1.1.13
Platform: Chrome running on Windows

I'm using the MQTT module inside a web browser to connect to AWS IoT, but I've noticed that I don't get notified by MqttClientConnection when the connection fails. For example, if I try to connect with invalid credentials, an exception gets logged in the browser console:

stream.js:64 WebSocket connection to 'wss://anonymised-ats.iot.eu-west-1.amazonaws.com/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=asdada%2F20200818%2Feu-west-1%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20200818T151704Z&X-Amz-SignedHeaders=host&X-Amz-Signature=b248cc32aba80259cdcf00c59360af8ac69b4f2709cbada15fd3e0d7b56f1afb&X-Amz-Security-Token=asdasdasd' failed: Error during WebSocket handshake: Unexpected response code: 403

however, the MqttClientConnection doesn't emit an 'error' or 'disconnect' event and the promise returned by MqttClientConnection.connect() is neither resolved nor rejected.

This issue can be reproduced in the browser/pub_sub sample by modifying the connect_websocket function to supply invalid credentials to AwsIotMqttConnectionConfigBuilder.with_credentials(), e.g:

        let config = iot.AwsIotMqttConnectionConfigBuilder.new_builder_for_websocket()
            .with_clean_session(true)
            .with_client_id(`pub_sub_sample(${new Date()})`)
            .with_endpoint(Config.AWS_IOT_ENDPOINT)
            .with_credentials(Config.AWS_REGION, 'asdada', 'asdasda', 'asdasdasd')
            .with_use_websockets()
            .build();

then building the sample and opening index.html in a web browser. With localStorage.debug = '*' this produces the following logging in the console:

16:17:04.035 browser.js:183 mqttjs:client MqttClient :: options.protocol +0ms undefined
16:17:04.036 browser.js:183 mqttjs:client MqttClient :: options.protocolVersion +2ms 4
16:17:04.036 browser.js:183 mqttjs:client MqttClient :: options.username +0ms ?SDK=BrowserJSv2&Version=1.0.0-dev
16:17:04.036 browser.js:183 mqttjs:client MqttClient :: options.keepalive +0ms 1200
16:17:04.037 browser.js:183 mqttjs:client MqttClient :: options.reconnectPeriod +1ms 0
16:17:04.037 browser.js:183 mqttjs:client MqttClient :: options.rejectUnauthorized +0ms undefined
16:17:04.037 browser.js:183 mqttjs:client MqttClient :: clientId +0ms pub_sub_sample(Tue Aug 18 2020 16:17:04 GMT+0100 (British Summer Time))
16:17:04.039 browser.js:183 mqttjs:client MqttClient :: setting up stream +1ms
16:17:04.040 browser.js:183 mqtt-packet:parser _resetState: resetting packet, error, _list, and _stateCounter +0ms
16:17:04.042 browser.js:183 mqttjs:client _setupStream :: calling method to clear reconnect +4ms
16:17:04.042 browser.js:183 mqttjs:client _clearReconnect : clearing reconnect timer +0ms
16:17:04.043 browser.js:183 mqttjs:client _setupStream :: using streamBuilder provided to client to create stream +1ms
16:17:04.063 browser.js:183 mqttjs:client _setupStream :: pipe stream to writable stream +20ms
16:17:04.066 browser.js:183 mqttjs:client _setupStream: sending packet `connect` +2ms
16:17:04.066 browser.js:183 mqttjs:client sendPacket :: packet: Object +1ms
16:17:04.071 browser.js:183 mqttjs:client sendPacket :: emitting `packetsend` +4ms
16:17:04.071 browser.js:183 mqttjs:client sendPacket :: writing to stream +1ms
16:17:04.072 browser.js:183 mqtt-packet:writeToStream generate called +0ms
16:17:04.181 browser.js:183 mqtt-packet:writeToStream generate: packet.cmd: connect +109ms
16:17:04.183 browser.js:183 mqtt-packet:writeToStream writeVarByteInt: writing to stream: Uint8Array [119] +2ms
16:17:04.184 browser.js:183 mqtt-packet:writeToStream writeNumberCached: number: 4 +1ms
16:17:04.185 browser.js:183 mqtt-packet:writeToStream writeNumberCached: Uint8Array(2) [0, 4] +0ms
16:17:04.185 browser.js:183 mqtt-packet:writeToStream writeString: MQTT +1ms
16:17:04.187 browser.js:183 mqtt-packet:writeToStream writeNumberCached: number: 1200 +1ms
16:17:04.190 browser.js:183 mqtt-packet:writeToStream writeNumberCached: Uint8Array(2) [4, 176] +4ms
16:17:04.191 browser.js:183 mqtt-packet:writeToStream writeNumberCached: number: 71 +1ms
16:17:04.192 browser.js:183 mqtt-packet:writeToStream writeNumberCached: Uint8Array(2) [0, 71] +1ms
16:17:04.193 browser.js:183 mqtt-packet:writeToStream writeString: pub_sub_sample(Tue Aug 18 2020 16:17:04 GMT+0100 (British Summer Time)) +0ms
16:17:04.193 browser.js:183 mqtt-packet:writeToStream writeNumberCached: number: 34 +1ms
16:17:04.193 browser.js:183 mqtt-packet:writeToStream writeNumberCached: Uint8Array(2) [0, 34] +0ms
16:17:04.194 browser.js:183 mqtt-packet:writeToStream writeString: ?SDK=BrowserJSv2&Version=1.0.0-dev +1ms
16:17:04.194 browser.js:183 mqttjs:client sendPacket :: writeToStream result true +123ms
16:17:04.276 stream.js:64 WebSocket connection to 'wss://anonymised-ats.iot.eu-west-1.amazonaws.com/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=asdada%2F20200818%2Feu-west-1%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20200818T151704Z&X-Amz-SignedHeaders=host&X-Amz-Signature=b248cc32aba80259cdcf00c59360af8ac69b4f2709cbada15fd3e0d7b56f1afb&X-Amz-Security-Token=asdasdasd' failed: Error during WebSocket handshake: Unexpected response code: 403
16:17:04.279 browser.js:183 mqttjs:client streamErrorHandler :: error +85ms undefined
16:17:04.279 browser.js:183 mqttjs:client nop :: +0ms Event {isTrusted: true, type: "error", target: WebSocket, currentTarget: WebSocket, eventPhase: 0, …}
16:17:04.280 browser.js:183 mqttjs:client (pub_sub_sample(Tue Aug 18 2020 16:17:04 GMT+0100 (British Summer Time)))stream :: on close +1ms
16:17:04.280 browser.js:183 mqttjs:client flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function +0ms
16:17:04.280 browser.js:183 mqttjs:client stream: emit close to MqttClient +0ms
16:17:04.281 browser.js:183 mqttjs:client close :: connected set to `false` +1ms
16:17:04.281 browser.js:183 mqttjs:client close :: clearing connackTimer +0ms
16:17:04.281 browser.js:183 mqttjs:client close :: clearing ping timer +0ms
16:17:04.282 browser.js:183 mqttjs:client close :: calling _setupReconnect +0ms
16:17:04.282 browser.js:183 mqttjs:client _setupReconnect :: doing nothing... +1ms

It looks like the underlying MQTT.js library is emitting a 'close' event, but this isn't being handled by MqttClientConnection?

Unable to install on Jetson device

I'm trying to install the aws-iot-device-sdk-v2 on a Jetson device but get hung up when npm install aws-crt fails with an error related to OpenSSL. The relevant terminal output is below:

[ 77%] Built target aws-c-io
[ 84%] Built target aws-c-http
[ 84%] Linking C executable elasticurl
[ 87%] Built target aws-c-mqtt
[ 95%] Built target aws-c-auth
[ 95%] Linking C shared library Release/aws-crt-nodejs.node
[ 96%] Built target elasticurl
/usr/bin/ld: /usr/local/lib/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcrypto.a(sha1-armv8.o): In function `sha1_block_armv8':
(.text+0x1240): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_ADR_PREL_LO21 against symbol `poly1305_blocks' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcrypto.a(poly1305-armv8.o): In function `poly1305_init':
(.text+0x40): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_ADR_PREL_LO21 against symbol `poly1305_emit' which may bind externally can not be used when making a shared object; recompile with -fPIC
(.text+0x48): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcrypto.a(poly1305-armv8.o): In function `poly1305_emit_neon':
(.text+0x9a0): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcrypto.a(sha256-armv8.o): In function `sha256_block_data_order':
(.text+0xf88): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcrypto.a(sha512-armv8.o): In function `sha512_block_data_order':
(.text+0x10c8): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
CMakeFiles/aws-crt-nodejs.dir/build.make:416: recipe for target 'Release/aws-crt-nodejs.node' failed
make[2]: *** [Release/aws-crt-nodejs.node] Error 1
CMakeFiles/Makefile2:74: recipe for target 'CMakeFiles/aws-crt-nodejs.dir/all' failed
make[1]: *** [CMakeFiles/aws-crt-nodejs.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

This is very similar to the following issues encountered when using the IoT Device Python SDK:
aws/aws-iot-device-sdk-python-v2#43
aws/aws-iot-device-sdk-python-v2#69

I've managed to rebuild OpenSSL from source with -fPIC enabled and still encounter the same error when rebuilding the SDK from a clean environment. This has also been performed inside a Docker container on the Jetson device and the same issue occurs.

Any recommendations?

Allow to bypass stringification of `publish` payload

I am migrating our browser client from aws-iot-device-sdk to aws-crt/dist.browser/browser/mqtt and need to send a Uint8Array payload because the other end expects that. Unfortunately

let payload_data = normalize_payload(payload);
converts the payload to a string format.

I am not aware any reasoning in favor of stringification and am not challenging that. However I would like to have a way to bypass that.

A custom implementation could be passed in MqttConnectionConfig or overwritten as a static function of MqttClientConnection or MqttClient.

Error TS1192 when compiling with TypeScript

When using this library (v1.3.4) from TypeScript (v3.8.3 and v4.1.2 tested) I get the following errors:

node_modules/aws-crt/dist/native/auth.d.ts:5:8 - error TS1192: Module '"<REDACTED>/node_modules/aws-crt/dist/native/binding"' has no default export.

5 import crt_native from './binding';
         ~~~~~~~~~~

node_modules/aws-crt/dist/native/http.d.ts:5:8 - error TS1192: Module '"<REDACTED>/node_modules/aws-crt/dist/native/binding"' has no default export.

5 import crt_native from './binding';
         ~~~~~~~~~~


Found 2 errors.

This can be fixed by rewriting the import as import * as crt_native from './binding', but since this is generated code I don't know how to fix it.

proxy options with auth does not work

Recently I am working with aws-crt and aws-iot-device-sdk-js-v2 to do aws Iot connection test behind a proxy.
If the proxy without authentication, it works; and if the proxy with authentication, it will fail.
So I go througth the codes and find one possible issue in aws-crt, please help confirm whether it should be correct.

in function aws_napi_http_proxy_options_new in source/http_connections.c, there are following snippets:

napi_value node_port = *arg++;
uint32_t port;
AWS_NAPI_CALL(env, napi_get_value_uint32(env, node_port, &port), {
    napi_throw_type_error(env, NULL, "port must be a number");
    goto cleanup;
});
binding->native.port = (uint16_t)port;

napi_value node_auth_method = *arg++;
if (!aws_napi_is_null_or_undefined(env, node_auth_method)) {
    uint32_t auth_method = 0;
    AWS_NAPI_CALL(env, napi_get_value_uint32(env, node_port, &auth_method), {
        napi_throw_type_error(env, NULL, "auth_method must be a number");
        goto cleanup;
    });
    binding->native.auth_type = auth_method;
}

it seems to read node_port for auth_method, which may just copy from the code for node_port and do not change completely.
This will cause auth_method to be wrong value and the behavior is not clear.
Thanks.

Cannot build on Mac

There are some invalid options for strip on Mac.

Options:

--strip-debug
--strip-unneeded

Error message:

error: /Library/Developer/CommandLineTools/usr/bin/strip: unrecognized option: --strip-debug
Usage: /Library/Developer/CommandLineTools/usr/bin/strip [-AnuSXx] [-] [-d filename] [-s filename] [-R filename] [-o output] file [...] 
make[2]: *** [Release/aws-crt-nodejs.node] Error 1
make[2]: *** Deleting file `Release/aws-crt-nodejs.node'
make[1]: *** [CMakeFiles/aws-crt-nodejs.dir/all] Error 2
make: *** [all] Error 2
ERR! OMG Process terminated: 2
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

Error: Process terminated: 2
    at ChildProcess.<anonymous> (/Users/thomaszhou/program/git/aws-crt-nodejs/node_modules/cmake-js/lib/processHelpers.js:34:32)
    at ChildProcess.emit (node:events:390:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

Environment:

  • Mac OS: Monterey 12.0
  • Chip: Apple M1 Pro
  • CMake: 3.22.0
  • strip: 2.37

aws-crt 1.12.4 is 600mb size

Hi there,

Im reaching out because a customer has opened an issue on the AWS-JS-SDK repo about the latest version of aws-crt being about 600mb in size.

I have reproduced the issue and confirmed that it is not an SDK related issue.
Here are the changes between 1.12.3 and 1.12.4

Can someone please take a look at it?

Many thanks!

MQTT - Unknown Errors and warning logged

After mqtt.connect(), I get the following errors and warnings. There doesn't seem to be any impact and connection goes through.

===============================================
[WARN] [2022-02-01T03:43:21Z] [00007fd07f9ce700] [socket] - id=0x7fd06c000cd0 fd=29: setsockopt() for NO_SIGNAL failed with errno 92. If you are having SIGPIPE signals thrown, you may want to install a signal trap in your application layer.
[ERROR] [2022-02-01T03:43:21Z] [00007fd07f9ce700] [socket] - id=0x7fd06c000cd0 fd=29: connect failed with error code 101.
[ERROR] [2022-02-01T03:43:21Z] [00007fd07f9ce700] [channel-bootstrap] - id=0x5eeb3c0: failed to create socket with error 1049
[WARN] [2022-02-01T03:43:21Z] [00007fd07f9ce700] [socket] - id=0x7fd06c000cd0 fd=29: setsockopt() for NO_SIGNAL failed with errno 92. If you are having SIGPIPE signals thrown, you may want to install a signal trap in your application layer.

aws_logger handle is not closed while running jest tests.

While running jest for my nodejs tests, I am noticing that the "aws_logger" handle is not getting closed resulting in automation tests failing.

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

● aws_logger

  1 | const {PromiseSocket, TimeoutError} = require("promise-socket");
> 2 | const { mqtt, io, iot } = require('aws-crt');
    |                           ^
  3 | const fs = require( "fs" );
  4 | const { loginUser, logoutUser } = require( "./aws-cognito" );
  5 | const cfg = require( './aws-config.json' )

  at Runtime._loadModule (node_modules/jest-runtime/build/index.js:1180:29)
  at Object.<anonymous> (node_modules/aws-crt/lib/native/binding.js:40:19)
  at Object.<anonymous> (node_modules/aws-crt/lib/native/crt.ts:22:1)
  at Object.<anonymous> (node_modules/aws-crt/lib/index.ts:18:1)
  at Object.<anonymous> (tests/server.spec.js:2:27)
  at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
  at runJest (node_modules/@jest/core/build/runJest.js:404:19)
  at _run10000 (node_modules/@jest/core/build/cli/index.js:320:7)
  at runCLI (node_modules/@jest/core/build/cli/index.js:173:3)

error Command failed with exit code 1.

MSBUILD : error MSB1009: Project file does not exist.

Hi,

I trying to rebuild aws-crt on windows 10.

But I get this error.

What should I do?

PS C:\Code\aws-crt-nodejs> npm run prepare

> [email protected] prepare C:\Code\aws-crt-nodejs
> node ./scripts/tsc.js && node ./scripts/build.js

> npx tsc -p tsconfig.json
> npx tsc -p tsconfig.browser.json
info TOOL Using Visual Studio 15 2017 Win64 generator.
info CMD BUILD
info RUN cmake --build "C:\Code\aws-crt-nodejs\build" --config Release --target install
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: install.vcxproj
ERR! OMG Process terminated: 1
(node:832) UnhandledPromiseRejectionWarning: Error: Process terminated: 1
    at ChildProcess.<anonymous> (C:\Code\aws-crt-nodejs\node_modules\cmake-js\lib\processHelpers.js:29:32)
    at ChildProcess.emit (events.js:376:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:832) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:832) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

[MQTT] Topic returning topic filter, not message topic

When trying out the sample, and listening to MQTT on a wildcard topic, the topic set in the on_publish is set to the filter, not the actual topic that the message appeared on. How to deal with this, and get the actual topic?

E.g. '$aws/things/+/shadow/update/accepted' should give topic '$aws/things/my_test_device/shadow/update/accepted'

connection.subscribe('/test/me/senpai', mqtt.QoS.AtLeastOnce, (topic, payload) => {

I posted the same issue in aws/aws-iot-device-sdk-js-v2#40 but I think this is the right place for it

Module does not compile on arm64

Decided to deploy this node package in a clean Ubuntu 20 LTS (arm64) distribution running on Raspberry Pi 3B. Results are no good. 🥺

We are using:

  • Node 12.18.2
  • npm 6.14.8
  • cmake 3.16.3.

The package does install successfully but module linking fails.

> [email protected] install /home/ubuntu/cross-compiling/node_modules/aws-crt
> node ./scripts/install.js

info TOOL Using Unix Makefiles generator.
info TOOL Building only the install target, as specified from the command line.
info CMD CONFIGURE
info TOOL Building only the install target, as specified from the command line.
info RUN cmake "/home/ubuntu/cross-compiling/node_modules/aws-crt" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/ubuntu/cross-compiling/node_modules/aws-crt/build/Release" -DCMAKE_JS_INC="/home/ubuntu/.cmake-js/node-arm64/v12.18.2/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="12.18.2" -DNODE_ARCH="arm64" -DCMAKE_EXPORT_COMPILE_COMMANDS="true" -DCMAKE_JS_PLATFORM="linux" -DCMAKE_JS_ARCH="arm64" -DBUILD_TESTING="OFF"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 10.2.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
-- Using submodule dependencies
-- CMake 3.16.3
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Failed
-- Performing Test AWS_ARCH_ARM64
-- Performing Test AWS_ARCH_ARM64 - Success
-- Performing Test AWS_ARCH_ARM32
-- Performing Test AWS_ARCH_ARM32 - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_AUXV
-- Performing Test AWS_HAVE_AUXV - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Performing Test HAS_MOUTLINE_ATOMICS
-- Performing Test HAS_MOUTLINE_ATOMICS - Success
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Packaging currently only supported on Fedora.
-- Found LibCrypto: /usr/lib/aarch64-linux-gnu/libcrypto.a  
-- LibCrypto Include Dir: /usr/include
-- LibCrypto Shared Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.so
-- LibCrypto Static Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.a
-- Attempting to try_compile PQ ASM
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- PQ ASM try_compile failed - using generic C code for PQ crypto
-- Performing Test S2N_HAVE_EXECINFO
-- Performing Test S2N_HAVE_EXECINFO - Success
-- LibCrypto Include Dir: /usr/include
-- LibCrypto Shared Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.so
-- LibCrypto Static Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.a
-- LibCrypto Include Dir: /usr/include
-- LibCrypto Shared Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.so
-- LibCrypto Static Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.a
-- LibCrypto Include Dir: /usr/include
-- LibCrypto Shared Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.so
-- LibCrypto Static Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.a
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/cross-compiling/node_modules/aws-crt/build

Towards the very end, the linking step fails:

gmake[2]: Leaving directory '/home/ubuntu/cross-compiling/node_modules/aws-crt/build'
[ 94%] Built target aws-c-auth
gmake[2]: Entering directory '/home/ubuntu/cross-compiling/node_modules/aws-crt/build'
Scanning dependencies of target aws-crt-nodejs
gmake[2]: Leaving directory '/home/ubuntu/cross-compiling/node_modules/aws-crt/build'
gmake[2]: Entering directory '/home/ubuntu/cross-compiling/node_modules/aws-crt/build'
[ 94%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/auth.c.o
[ 95%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/class_binder.c.o
[ 95%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/crypto.c.o
[ 95%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/http_connection.c.o
[ 96%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/http_connection_manager.c.o
[ 96%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/http_headers.c.o
[ 96%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/http_message.c.o
[ 96%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/http_stream.c.o
[ 97%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/io.c.o
[ 97%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/logger.c.o
[ 97%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/module.c.o
[ 98%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/mqtt_client.c.o
[ 98%] Building C object CMakeFiles/aws-crt-nodejs.dir/source/mqtt_client_connection.c.o
[ 98%] Linking C shared library Release/aws-crt-nodejs.node
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
(.text+0x1240): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_ADR_PREL_LO21 against symbol `poly1305_blocks' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): in function `poly1305_init':
(.text+0x40): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_ADR_PREL_LO21 against symbol `poly1305_emit' which may bind externally can not be used when making a shared object; recompile with -fPIC
(.text+0x48): dangerous relocation: unsupported relocation
/usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): in function `poly1305_blocks_neon':
(.text+0x26c): relocation truncated to fit: R_AARCH64_CONDBR19 against symbol `poly1305_blocks' defined in .text section in /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o)
/usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): in function `poly1305_emit_neon':
(.text+0x904): relocation truncated to fit: R_AARCH64_CONDBR19 against symbol `poly1305_emit' defined in .text section in /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o)
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
(.text+0x9a0): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): in function `sha256_block_data_order':
(.text+0xf88): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): in function `sha512_block_data_order':
(.text+0x1108): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/aws-crt-nodejs.dir/build.make:274: Release/aws-crt-nodejs.node] Error 1
gmake[2]: Leaving directory '/home/ubuntu/cross-compiling/node_modules/aws-crt/build'
gmake[1]: *** [CMakeFiles/Makefile2:290: CMakeFiles/aws-crt-nodejs.dir/all] Error 2
gmake[1]: Leaving directory '/home/ubuntu/cross-compiling/node_modules/aws-crt/build'
gmake: *** [Makefile:130: all] Error 2
ERR! OMG Process terminated: 2
(node:39593) UnhandledPromiseRejectionWarning: Error: Process terminated: 2
    at ChildProcess.<anonymous> (/home/ubuntu/cross-compiling/node_modules/cmake-js/lib/processHelpers.js:29:32)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
(node:39593) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:39593) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Is this module not supported in ARM64?

Please use major version bumps when introducing architecture breakages

In a project I had version 1.8.4, then bumped to 1.9.0 and npm installation went fine as well.

Then later tried with 1.9.6 and kabooom, installation got stuck, times out.

Understand that since I'm on MacBook Air, ARM architecture isn't always well supported.

Took me hours to investigate which npm package caused headaches and narrowed down to this one. Respect for all your hard work, but recommend doing major version bumps whenever you introduce breaking changes. Thanks.

CMake errors during npm install on raspberry Pi (ARM)

When upgrading from 1.12.5 -> 1.13.2 I see the following output from my project's npm install operation:

npm install
 code 1
 path /home/pi/print-client/node_modules/aws-crt
 command failed
 command sh -c node ./scripts/install.js --production
 npm list tar error:
 Error: Command failed: npm list --depth 0 tar
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:24:45)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:20:19)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:54:26)
     at Object.<anonymous> (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:78:9)
     at Module._compile (node:internal/modules/cjs/loader:1105:14)
     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
     at Module.load (node:internal/modules/cjs/loader:981:32) {
   status: 1,
   signal: null,
   output: [
     null,
     '[email protected] /home/pi/print-client/node_modules/aws-crt\n└── (empty)\n\n',
     ''
   ],
   pid: 25958,
   stdout: '[email protected] /home/pi/print-client/node_modules/aws-crt\n└── (empty)\n\n',
   stderr: ''
 }
 npm global list tar error:
 Error: Command failed: npm list -g --depth 0 tar
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:36:45)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:20:19)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:54:26)
     at Object.<anonymous> (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:78:9)
     at Module._compile (node:internal/modules/cjs/loader:1105:14)
     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
     at Module.load (node:internal/modules/cjs/loader:981:32) {
   status: 1,
   signal: null,
   output: [ null, '/usr/lib\n└── (empty)\n\n', '' ],
   pid: 25970,
   stdout: '/usr/lib\n└── (empty)\n\n',
   stderr: ''
 }
 Could not find tar version 6.1.11
 Looking for tar version 6.1.11 as a dependency...
 npm list tar error:
 Error: Command failed: npm list --depth 0 tar
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:24:45)
     at Object.npmDownloadAndInstallRuntimePackage (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:65:18)
     at Object.getPackageAndFetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:38:23)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:24:24)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:54:26)
     at Object.<anonymous> (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:78:9)
     at Module._compile (node:internal/modules/cjs/loader:1105:14) {
   status: 1,
   signal: null,
   output: [
     null,
     'aws-crt-build@ /home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies\n' +
       '└── (empty)\n' +
       '\n',
     ''
   ],
   pid: 25982,
   stdout: 'aws-crt-build@ /home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies\n' +
     '└── (empty)\n' +
     '\n',
   stderr: ''
 }
 npm global list tar error:
 Error: Command failed: npm list -g --depth 0 tar
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:36:45)
     at Object.npmDownloadAndInstallRuntimePackage (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:65:18)
     at Object.getPackageAndFetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:38:23)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:24:24)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:54:26)
     at Object.<anonymous> (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:78:9)
     at Module._compile (node:internal/modules/cjs/loader:1105:14) {
   status: 1,
   signal: null,
   output: [ null, '/usr/lib\n└── (empty)\n\n', '' ],
   pid: 25994,
   stdout: '/usr/lib\n└── (empty)\n\n',
   stderr: ''
 }
 Could not find tar version 6.1.11
 Could not find tar
 Downloading tar from npm for build...
 npm list axios error:
 Error: Command failed: npm list --depth 0 axios
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:24:45)
     at Object.loadAxios (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_axios.js:25:23)
     at Object.fetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:56:26)
     at Object.getPackageAndFetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:48:14)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:24:24)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:54:26)
     at Object.<anonymous> (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:78:9) {
   status: 1,
   signal: null,
   output: [
     null,
     'aws-crt-build@ /home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies\n' +
       '└── (empty)\n' +
       '\n',
     ''
   ],
   pid: 26018,
   stdout: 'aws-crt-build@ /home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies\n' +
     '└── (empty)\n' +
     '\n',
   stderr: ''
 }
 npm global list axios error:
 Error: Command failed: npm list -g --depth 0 axios
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:36:45)
     at Object.loadAxios (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_axios.js:25:23)
     at Object.fetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:56:26)
     at Object.getPackageAndFetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:48:14)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:24:24)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:54:26)
     at Object.<anonymous> (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:78:9) {
   status: 1,
   signal: null,
   output: [ null, '/usr/lib\n└── (empty)\n\n', '' ],
   pid: 26030,
   stdout: '/usr/lib\n└── (empty)\n\n',
   stderr: ''
 }
 Could not find axios version 0.24.0
 Looking for axios version 0.24.0 as a dependency...
 npm list axios error:
 Error: Command failed: npm list --depth 0 axios
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:24:45)
     at Object.npmDownloadAndInstallRuntimePackage (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:65:18)
     at Object.loadAxios (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_axios.js:29:49)
     at Object.fetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:56:26)
     at Object.getPackageAndFetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:48:14)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:24:24)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:54:26) {
   status: 1,
   signal: null,
   output: [
     null,
     'aws-crt-build@ /home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies\n' +
       '└── (empty)\n' +
       '\n',
     ''
   ],
   pid: 26042,
   stdout: 'aws-crt-build@ /home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies\n' +
     '└── (empty)\n' +
     '\n',
   stderr: ''
 }
 npm global list axios error:
 Error: Command failed: npm list -g --depth 0 axios
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:36:45)
     at Object.npmDownloadAndInstallRuntimePackage (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:65:18)
     at Object.loadAxios (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_axios.js:29:49)
     at Object.fetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:56:26)
     at Object.getPackageAndFetchNativeCode (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:48:14)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_tar.js:24:24)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:54:26) {
   status: 1,
   signal: null,
   output: [ null, '/usr/lib\n└── (empty)\n\n', '' ],
   pid: 26054,
   stdout: '/usr/lib\n└── (empty)\n\n',
   stderr: ''
 }
 Could not find axios version 0.24.0
 Could not find axios
 Downloading axios from npm for build...
 npm list cmake-js error:
 Error: Command failed: npm list --depth 0 cmake-js
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:24:45)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:20:19)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:58:28)
     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
   status: 1,
   signal: null,
   output: [
     null,
     '[email protected] /home/pi/print-client/node_modules/aws-crt\n└── (empty)\n\n',
     ''
   ],
   pid: 26082,
   stdout: '[email protected] /home/pi/print-client/node_modules/aws-crt\n└── (empty)\n\n',
   stderr: ''
 }
 npm global list cmake-js error:
 Error: Command failed: npm list -g --depth 0 cmake-js
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:36:45)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:20:19)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:58:28)
     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
   status: 1,
   signal: null,
   output: [ null, '/usr/lib\n└── (empty)\n\n', '' ],
   pid: 26094,
   stdout: '/usr/lib\n└── (empty)\n\n',
   stderr: ''
 }
 Could not find cmake-js version 6.3.2
 Looking for cmake-js version 6.3.2 as a dependency...
 npm list cmake-js error:
 Error: Command failed: npm list --depth 0 cmake-js
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:24:45)
     at Object.npmDownloadAndInstallRuntimePackage (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:65:18)
     at Object.getPackageAndBuildSource (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:47:23)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:23:24)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:58:28)
     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
   status: 1,
   signal: null,
   output: [
     null,
     'aws-crt-build@ /home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies\n' +
       '└── (empty)\n' +
       '\n',
     ''
   ],
   pid: 26106,
   stdout: 'aws-crt-build@ /home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies\n' +
     '└── (empty)\n' +
     '\n',
   stderr: ''
 }
 npm global list cmake-js error:
 Error: Command failed: npm list -g --depth 0 cmake-js
     at checkExecSyncError (node:child_process:828:11)
     at Object.execSync (node:child_process:899:15)
     at Object.npmCheckIfPackageExists (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:36:45)
     at Object.npmDownloadAndInstallRuntimePackage (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_utils.js:65:18)
     at Object.getPackageAndBuildSource (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:47:23)
     at Object.performStep (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:23:24)
     at buildFromRemoteSource (/home/pi/print-client/node_modules/aws-crt/scripts/build.js:58:28)
     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
   status: 1,
   signal: null,
   output: [ null, '/usr/lib\n└── (empty)\n\n', '' ],
   pid: 26118,
   stdout: '/usr/lib\n└── (empty)\n\n',
   stderr: ''
 }
 Could not find cmake-js version 6.3.2
 Could not find cmake-js
 Downloading cmake-js from npm for build...
 Not searching for unused variables given on the command line.
 -- The C compiler identification is GNU 8.4.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
 -- Using submodule dependencies
 -- Configuring incomplete, errors occurred!
 See also "/home/pi/print-client/node_modules/aws-crt/build/linux-arm/CMakeFiles/CMakeOutput.log".
 info TOOL Using Unix Makefiles generator.
 info TOOL Building only the install target, as specified from the command line.
 info CMD CONFIGURE
 info TOOL Building only the install target, as specified from the command line.
 info RUN [
 info RUN   'cmake',
 info RUN   '/home/pi/print-client/node_modules/aws-crt',
 info RUN   '--no-warn-unused-cli',
 info RUN   '-G',
 info RUN   'Unix Makefiles',
 info RUN   '-DCMAKE_JS_VERSION=6.3.2',
 info RUN   '-DCMAKE_BUILD_TYPE=Release',
 info RUN   '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/pi/print-client/node_modules/aws-crt/build/linux-arm/Release',
 info RUN   '-DCMAKE_JS_INC=/home/pi/.cmake-js/node-arm/v16.15.0/include/node;/home/pi/print-client/node_modules/nan',
 info RUN   '-DCMAKE_JS_SRC=',
 info RUN   '-DNODE_RUNTIME=node',
 info RUN   '-DNODE_RUNTIMEVERSION=16.15.0',
 info RUN   '-DNODE_ARCH=arm',
 info RUN   '-DCMAKE_EXPORT_COMPILE_COMMANDS=true',
 info RUN   '-DCMAKE_JS_PLATFORM=linux',
 info RUN   '-DBUILD_TESTING=OFF',
 info RUN   '-DCMAKE_INSTALL_PREFIX=crt/install',
 info RUN   '-DCMAKE_PREFIX_PATH=crt/install'
 info RUN ]
 CMake Error at CMakeLists.txt:38 (include):
   include could not find load file:

     AwsFindPackage


 CMake Error at CMakeLists.txt:44 (add_subdirectory):
   add_subdirectory given source "crt/aws-c-common" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:50 (add_subdirectory):
   add_subdirectory given source "crt/aws-lc" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:52 (add_subdirectory):
   add_subdirectory given source "crt/s2n" which is not an existing directory.


 CMake Error at CMakeLists.txt:55 (add_subdirectory):
   add_subdirectory given source "crt/aws-c-sdkutils" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:56 (add_subdirectory):
   add_subdirectory given source "crt/aws-c-io" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:57 (add_subdirectory):
   add_subdirectory given source "crt/aws-c-cal" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:58 (add_subdirectory):
   add_subdirectory given source "crt/aws-c-compression" which is not an
   existing directory.


 CMake Error at CMakeLists.txt:59 (add_subdirectory):
   add_subdirectory given source "crt/aws-c-http" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:60 (add_subdirectory):
   add_subdirectory given source "crt/aws-c-auth" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:61 (add_subdirectory):
   add_subdirectory given source "crt/aws-c-mqtt" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:62 (add_subdirectory):
   add_subdirectory given source "crt/aws-checksums" which is not an existing
   directory.


 CMake Error at CMakeLists.txt:76 (include):
   include could not find load file:

     AwsCFlags


 CMake Error at CMakeLists.txt:77 (include):
   include could not find load file:

     AwsSharedLibSetup


 CMake Error at CMakeLists.txt:78 (include):
   include could not find load file:

     AwsSanitizers


 CMake Error at CMakeLists.txt:85 (aws_set_common_properties):
   Unknown CMake command "aws_set_common_properties".


 ERR! OMG Process terminated: 1
 node:internal/process/promises:279
             triggerUncaughtException(err, true /* fromPromise */);
             ^

 Error: Process terminated: 1
     at ChildProcess.<anonymous> (/home/pi/print-client/node_modules/aws-crt/scripts/build_dependencies/node_modules/cmake-js/lib/processHelpers.js:34:32)
     at ChildProcess.emit (node:events:527:28)
     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)

On 1.12.5 everything installs fine.

I believe it is related to the changes made in 001193e

Alpine linux support (currently crashes)

When I'm trying to upgrade aws-sdk-v3 monorepo to v3.2.9 my build fails with this error:

 FAIL  src/test/links/linksTest.ts
  ● Test suite failed to run

    Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /srv/shorturl_api/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node)

      at Runtime._loadModule (../node_modules/jest-runtime/build/index.js:1029:29)
      at Object.<anonymous> (../node_modules/aws-crt/lib/native/binding.js:40:19)

I run node using alpine 3.12 docker container:
FROM node:16.8.0-alpine3.12

AWS CRT binary not present in any of the following locations

Describe the bug

Transfered from aws/aws-sdk-js-v3#2753

When upgrading to 3.29.0, and compiling a typescript file to a single javascript file with esbuild, and running that with node, you get:

AWS CRT binary not present in any of the following locations:

       /codebuild/output/bin/native/aws-crt-nodejs
        /codebuild/output/bin/linux-x64/aws-crt-nodejs

Your environment

First saw this in a codebuild job, but happens everywhere. So for example AWS Linux Workspace.

UPDTATE:

I saw this on AWS CodeBuild jobs, so that's Ubuntu 20 I think.

SDK version number

@aws-sdk/[email protected]

Is the issue in the browser/Node.js/ReactNative?

node.js

Seen with version 14 and 16.

Expected behavior

As per #2750 you should not pull in aws-crt and 200MB of dependencies.

[Created on behalf of @berenddeboer ]

Reduce number of dependencies added by AWS CRT

Is your feature request related to a problem? Please describe.

Installing [email protected] adds 118 dependencies in node_modules as shown below.

$ mkdir test-aws-crt && cd test-aws-crt

$ test-aws-crt> npm init -y && npm install [email protected] --save-exact

$ test-aws-crt> find node_modules -type d -maxdepth 1 | wc -l
     118

$ test-aws-crt> ls -1 node_modules
@httptoolkit
@types
ansi
ansi-regex
are-we-there-yet
aws-crt
axios
balanced-match
base64-js
big-integer
binary
bl
bluebird
brace-expansion
buffer
buffer-from
buffer-indexof-polyfill
buffer-shims
buffers
camelcase
chainsaw
chownr
cliui
cmake-js
code-point-at
commist
concat-map
concat-stream
core-util-is
crypto-js
debug
decamelize
deep-extend
delegates
duplexer2
duplexify
end-of-stream
fastestsmallesttextencoderdecoder
follow-redirects
fs-extra
fs-minipass
fs.realpath
fstream
gauge
glob
graceful-fs
has-unicode
help-me
ieee754
inflight
inherits
ini
invert-kv
is-fullwidth-code-point
is-iojs
isarray
isexe
isomorphic-ws
js-sdsl
jsonfile
lcid
leven
listenercount
lodash
lodash.pad
lodash.padend
lodash.padstart
lru-cache
memory-stream
minimatch
minimist
minipass
minizlib
mkdirp
mqtt
mqtt-packet
ms
npmlog
number-allocator
number-is-nan
once
os-locale
path-is-absolute
process-nextick-args
pump
rc
readable-stream
reinterval
rfdc
rimraf
safe-buffer
semver
setimmediate
split2
splitargs
stream-shift
string-width
string_decoder
strip-ansi
strip-json-comments
tar
traverse
typedarray
universalify
unzipper
url-join
util-deprecate
which
window-size
wrap-ansi
wrappy
ws
xtend
y18n
yallist
yargs

This is blocking the AWS SDK for JavaScript (v3) from reducing the install size.

Describe the solution you'd like

Remove unnecessary dependencies from aws-crt

Describe alternatives you've considered

N/A

Additional context

  • We noticed this issue while measuring the install size of the AWS SDK for JavaScript (v3) in JS-3470
  • Internal ticket with AWS CRT: P67533319

Memory leak in publish()

I believe there's a memory leak in the publish() method of MqttClientConnection. We're sending data at a rate of about 100Hz, around 1kB per message. The process's CPU usage keeps on increasing, and after about 30 minutes it saturates at 100% of a CPU core. We also see increases in used memory, where the increase is linear until there's a crash after 2 hours (cause not known yet).

I'm using heapdump to diagnose the memory usage using Chrome Dev Tools. I took a snapshot after process boot, and then after 30 minutes. I see a dramatic increase in a couple of object types. Most notably, I see a lot of strings (payload, topic) that are the parameters used here to pass to the crt_native.mqtt_client_connection_publish() method.

I'm guessing that these objects aren't released somehow. I've tried awaiting the returned Promise and not awaiting, but that does not have an effect.

Since the addition of aws-crt is the only change we made to our service, it's very probably it's the origin of the increasing CPU and memory usage.

Do you have any idea what could cause this?

I'm running aws-crt-nodejs version 1.3.4. We see the same behaviour on older versions as well.

Can't install on Pi 4

Following the instructions here, I get errors trying to install aws-crt

Pre reqs:
cmake is already the newest version (3.16.3-3~bpo10+1).
libssl-dev is already the newest version (1.1.1d-0+deb10u5+rpt2).
git version 2.20.1
node v14.16.0
npm 6.14.11

pi@raspberrypi:~/iot $ npm install aws-crt
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported

> [email protected] install /home/pi/iot/node_modules/aws-crt
> node ./scripts/install.js

info TOOL Using Unix Makefiles generator.
info TOOL Building only the install target, as specified from the command line.
info CMD CONFIGURE
info TOOL Building only the install target, as specified from the command line.
info RUN cmake "/home/pi/iot/node_modules/aws-crt" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/iot/node_modules/aws-crt/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v14.16.0/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="14.16.0" -DNODE_ARCH="arm" -DCMAKE_EXPORT_COMPILE_COMMANDS="true" -DCMAKE_JS_PLATFORM="linux" -DCMAKE_JS_ARCH="arm" -DBUILD_TESTING="OFF" -DCMAKE_INSTALL_PREFIX="crt/install" -DCMAKE_PREFIX_PATH="crt/install"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 8.3.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
-- Using submodule dependencies
-- CMake 3.16.3
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Failed
-- Performing Test AWS_ARCH_ARM64
-- Performing Test AWS_ARCH_ARM64 - Failed
-- Performing Test AWS_ARCH_ARM32
-- Performing Test AWS_ARCH_ARM32 - Success
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_AUXV
-- Performing Test AWS_HAVE_AUXV - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Performing Test HAS_MOUTLINE_ATOMICS
-- Performing Test HAS_MOUTLINE_ATOMICS - Failed
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Looking for pthread_attr_setaffinity_np
-- Looking for pthread_attr_setaffinity_np - not found
-- Looking for pthread_setaffinity_np
-- Looking for pthread_setaffinity_np - not found
CMake Warning at crt/aws-c-common/cmake/AwsThreadAffinity.cmake:43 (message):
  No supported method for setting thread affinity
Call Stack (most recent call first):
  crt/aws-c-common/CMakeLists.txt:169 (aws_set_thread_affinity_method)


-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Packaging currently only supported on Fedora.
-- The C compiler identification is GNU 8.3.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
-- The CXX compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Perl: /usr/bin/perl (found version "5.28.1")
-- Checking for module 'libunwind-generic'
--   No package 'libunwind-generic' found
libunwind not found. Disabling unwind tests.
-- Go not found. Disabling some code generation and using pre-generated code in generated-src/
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_LIBSSL
    BUILD_TESTING


-- Build files have been written to: /home/pi/iot/node_modules/aws-crt/build/aws-lc
Scanning dependencies of target boringssl_gtest
[  0%] Building CXX object CMakeFiles/boringssl_gtest.dir/third_party/googletest/src/gtest-all.cc.o
[  0%] Linking CXX static library libboringssl_gtest.a
[  0%] Built target boringssl_gtest
Scanning dependencies of target crypto_test_data
[  1%] Building CXX object CMakeFiles/crypto_test_data.dir/crypto_test_data.cc.o
[  1%] Built target crypto_test_data
Scanning dependencies of target global_target
[  1%] Built target global_target
Scanning dependencies of target test_support_lib
[  1%] Building CXX object crypto/test/CMakeFiles/test_support_lib.dir/abi_test.cc.o
[  1%] Building CXX object crypto/test/CMakeFiles/test_support_lib.dir/file_test.cc.o
[  1%] Building CXX object crypto/test/CMakeFiles/test_support_lib.dir/malloc.cc.o
[  2%] Building CXX object crypto/test/CMakeFiles/test_support_lib.dir/test_util.cc.o
[  2%] Building CXX object crypto/test/CMakeFiles/test_support_lib.dir/wycheproof_util.cc.o
[  2%] Linking CXX static library libtest_support_lib.a
[  2%] Built target test_support_lib
[  2%] Generating vpaes-armv7.S
[  2%] Generating aesv8-armx.S
[  3%] Generating armv4-mont.S
[  3%] Generating bsaes-armv7.S
[  3%] Generating ghash-armv4.S
[  3%] Generating ghashv8-armx.S
[  4%] Generating sha1-armv4-large.S
[  4%] Generating sha256-armv4.S
[  4%] Generating sha512-armv4.S
Scanning dependencies of target fipsmodule
[  5%] Building C object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/bcm.c.o
[  5%] Building C object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/fips_shared_support.c.o
[  5%] Building C object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/is_fips.c.o
[  5%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesv8-armx.S.o
[  5%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/armv4-mont.S.o
[  6%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/bsaes-armv7.S.o
[  6%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/ghash-armv4.S.o
[  6%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/ghashv8-armx.S.o
[  6%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/sha1-armv4-large.S.o
[  7%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/sha256-armv4.S.o
[  7%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/sha512-armv4.S.o
[  7%] Building ASM object crypto/fipsmodule/CMakeFiles/fipsmodule.dir/vpaes-armv7.S.o
[  7%] Built target fipsmodule
[  8%] Generating test/trampoline-armv4.S
[  8%] Generating chacha/chacha-armv4.S
Scanning dependencies of target crypto
[  8%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_bitstr.c.o
[  8%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_bool.c.o
[  8%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_d2i_fp.c.o
[  9%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_dup.c.o
[  9%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_enum.c.o
[  9%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_gentm.c.o
[  9%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_i2d_fp.c.o
[ 10%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_int.c.o
[ 10%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_mbstr.c.o
[ 10%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_object.c.o
[ 10%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_octet.c.o
[ 10%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_print.c.o
[ 11%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_strnid.c.o
[ 11%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_time.c.o
[ 11%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_type.c.o
[ 11%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_utctm.c.o
[ 12%] Building C object crypto/CMakeFiles/crypto.dir/asn1/a_utf8.c.o
[ 12%] Building C object crypto/CMakeFiles/crypto.dir/asn1/asn1_lib.c.o
[ 12%] Building C object crypto/CMakeFiles/crypto.dir/asn1/asn1_par.c.o
[ 12%] Building C object crypto/CMakeFiles/crypto.dir/asn1/asn_pack.c.o
[ 13%] Building C object crypto/CMakeFiles/crypto.dir/asn1/f_enum.c.o
[ 13%] Building C object crypto/CMakeFiles/crypto.dir/asn1/f_int.c.o
[ 13%] Building C object crypto/CMakeFiles/crypto.dir/asn1/f_string.c.o
[ 13%] Building C object crypto/CMakeFiles/crypto.dir/asn1/tasn_dec.c.o
[ 13%] Building C object crypto/CMakeFiles/crypto.dir/asn1/tasn_enc.c.o
[ 14%] Building C object crypto/CMakeFiles/crypto.dir/asn1/tasn_fre.c.o
[ 14%] Building C object crypto/CMakeFiles/crypto.dir/asn1/tasn_new.c.o
[ 14%] Building C object crypto/CMakeFiles/crypto.dir/asn1/tasn_typ.c.o
[ 14%] Building C object crypto/CMakeFiles/crypto.dir/asn1/tasn_utl.c.o
[ 15%] Building C object crypto/CMakeFiles/crypto.dir/asn1/time_support.c.o
[ 15%] Building C object crypto/CMakeFiles/crypto.dir/base64/base64.c.o
[ 15%] Building C object crypto/CMakeFiles/crypto.dir/bio/bio.c.o
[ 15%] Building C object crypto/CMakeFiles/crypto.dir/bio/bio_mem.c.o
[ 16%] Building C object crypto/CMakeFiles/crypto.dir/bio/connect.c.o
[ 16%] Building C object crypto/CMakeFiles/crypto.dir/bio/fd.c.o
[ 16%] Building C object crypto/CMakeFiles/crypto.dir/bio/file.c.o
[ 16%] Building C object crypto/CMakeFiles/crypto.dir/bio/hexdump.c.o
[ 16%] Building C object crypto/CMakeFiles/crypto.dir/bio/pair.c.o
[ 17%] Building C object crypto/CMakeFiles/crypto.dir/bio/printf.c.o
[ 17%] Building C object crypto/CMakeFiles/crypto.dir/bio/socket.c.o
[ 17%] Building C object crypto/CMakeFiles/crypto.dir/bio/socket_helper.c.o
[ 17%] Building C object crypto/CMakeFiles/crypto.dir/blake2/blake2.c.o
[ 18%] Building C object crypto/CMakeFiles/crypto.dir/bn_extra/bn_asn1.c.o
[ 18%] Building C object crypto/CMakeFiles/crypto.dir/bn_extra/convert.c.o
[ 18%] Building C object crypto/CMakeFiles/crypto.dir/buf/buf.c.o
[ 18%] Building C object crypto/CMakeFiles/crypto.dir/bytestring/asn1_compat.c.o
[ 19%] Building C object crypto/CMakeFiles/crypto.dir/bytestring/ber.c.o
[ 19%] Building C object crypto/CMakeFiles/crypto.dir/bytestring/cbb.c.o
[ 19%] Building C object crypto/CMakeFiles/crypto.dir/bytestring/cbs.c.o
[ 19%] Building C object crypto/CMakeFiles/crypto.dir/bytestring/unicode.c.o
[ 19%] Building C object crypto/CMakeFiles/crypto.dir/chacha/chacha.c.o
[ 20%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/cipher_extra.c.o
[ 20%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/derive_key.c.o
[ 20%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/e_aesccm.c.o
[ 20%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/e_aesctrhmac.c.o
[ 21%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/e_aesgcmsiv.c.o
[ 21%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/e_chacha20poly1305.c.o
[ 21%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/e_null.c.o
[ 21%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/e_rc2.c.o
[ 22%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/e_rc4.c.o
[ 22%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/e_tls.c.o
[ 22%] Building C object crypto/CMakeFiles/crypto.dir/cipher_extra/tls_cbc.c.o
[ 22%] Building C object crypto/CMakeFiles/crypto.dir/cmac/cmac.c.o
[ 22%] Building C object crypto/CMakeFiles/crypto.dir/conf/conf.c.o
[ 23%] Building C object crypto/CMakeFiles/crypto.dir/cpu-aarch64-fuchsia.c.o
[ 23%] Building C object crypto/CMakeFiles/crypto.dir/cpu-aarch64-linux.c.o
[ 23%] Building C object crypto/CMakeFiles/crypto.dir/cpu-aarch64-win.c.o
[ 23%] Building C object crypto/CMakeFiles/crypto.dir/cpu-arm-linux.c.o
[ 24%] Building C object crypto/CMakeFiles/crypto.dir/cpu-arm.c.o
[ 24%] Building C object crypto/CMakeFiles/crypto.dir/cpu-intel.c.o
[ 24%] Building C object crypto/CMakeFiles/crypto.dir/cpu-ppc64le.c.o
[ 24%] Building C object crypto/CMakeFiles/crypto.dir/crypto.c.o
[ 25%] Building C object crypto/CMakeFiles/crypto.dir/curve25519/curve25519.c.o
[ 25%] Building C object crypto/CMakeFiles/crypto.dir/curve25519/spake25519.c.o
[ 25%] Building C object crypto/CMakeFiles/crypto.dir/dh_extra/params.c.o
[ 25%] Building C object crypto/CMakeFiles/crypto.dir/dh_extra/dh_asn1.c.o
[ 25%] Building C object crypto/CMakeFiles/crypto.dir/digest_extra/digest_extra.c.o
[ 26%] Building C object crypto/CMakeFiles/crypto.dir/dsa/dsa.c.o
[ 26%] Building C object crypto/CMakeFiles/crypto.dir/dsa/dsa_asn1.c.o
[ 26%] Building C object crypto/CMakeFiles/crypto.dir/ecdh_extra/ecdh_extra.c.o
[ 26%] Building C object crypto/CMakeFiles/crypto.dir/ecdsa_extra/ecdsa_asn1.c.o
[ 27%] Building C object crypto/CMakeFiles/crypto.dir/ec_extra/ec_asn1.c.o
[ 27%] Building C object crypto/CMakeFiles/crypto.dir/ec_extra/ec_derive.c.o
[ 27%] Building C object crypto/CMakeFiles/crypto.dir/ec_extra/hash_to_curve.c.o
[ 27%] Building C object crypto/CMakeFiles/crypto.dir/err/err.c.o
[ 28%] Building C object crypto/CMakeFiles/crypto.dir/err_data.c.o
[ 28%] Building C object crypto/CMakeFiles/crypto.dir/engine/engine.c.o
[ 28%] Building C object crypto/CMakeFiles/crypto.dir/evp/digestsign.c.o
[ 28%] Building C object crypto/CMakeFiles/crypto.dir/evp/evp.c.o
[ 28%] Building C object crypto/CMakeFiles/crypto.dir/evp/evp_asn1.c.o
[ 29%] Building C object crypto/CMakeFiles/crypto.dir/evp/evp_ctx.c.o
[ 29%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_dsa_asn1.c.o
[ 29%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_ec.c.o
[ 29%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_ec_asn1.c.o
[ 30%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_ed25519.c.o
[ 30%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_ed25519_asn1.c.o
[ 30%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_rsa.c.o
[ 30%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_rsa_asn1.c.o
[ 31%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_x25519.c.o
[ 31%] Building C object crypto/CMakeFiles/crypto.dir/evp/p_x25519_asn1.c.o
[ 31%] Building C object crypto/CMakeFiles/crypto.dir/evp/pbkdf.c.o
[ 31%] Building C object crypto/CMakeFiles/crypto.dir/evp/print.c.o
[ 31%] Building C object crypto/CMakeFiles/crypto.dir/evp/scrypt.c.o
[ 32%] Building C object crypto/CMakeFiles/crypto.dir/evp/sign.c.o
[ 32%] Building C object crypto/CMakeFiles/crypto.dir/ex_data.c.o
[ 32%] Building C object crypto/CMakeFiles/crypto.dir/hkdf/hkdf.c.o
[ 32%] Building C object crypto/CMakeFiles/crypto.dir/hpke/hpke.c.o
[ 33%] Building C object crypto/CMakeFiles/crypto.dir/hrss/hrss.c.o
[ 33%] Building C object crypto/CMakeFiles/crypto.dir/lhash/lhash.c.o
[ 33%] Building C object crypto/CMakeFiles/crypto.dir/mem.c.o
[ 33%] Building C object crypto/CMakeFiles/crypto.dir/obj/obj.c.o
[ 34%] Building C object crypto/CMakeFiles/crypto.dir/obj/obj_xref.c.o
[ 34%] Building C object crypto/CMakeFiles/crypto.dir/pem/pem_all.c.o
[ 34%] Building C object crypto/CMakeFiles/crypto.dir/pem/pem_info.c.o
[ 34%] Building C object crypto/CMakeFiles/crypto.dir/pem/pem_lib.c.o
[ 34%] Building C object crypto/CMakeFiles/crypto.dir/pem/pem_oth.c.o
[ 35%] Building C object crypto/CMakeFiles/crypto.dir/pem/pem_pk8.c.o
[ 35%] Building C object crypto/CMakeFiles/crypto.dir/pem/pem_pkey.c.o
[ 35%] Building C object crypto/CMakeFiles/crypto.dir/pem/pem_x509.c.o
[ 35%] Building C object crypto/CMakeFiles/crypto.dir/pem/pem_xaux.c.o
[ 36%] Building C object crypto/CMakeFiles/crypto.dir/pkcs7/pkcs7.c.o
[ 36%] Building C object crypto/CMakeFiles/crypto.dir/pkcs7/pkcs7_x509.c.o
[ 36%] Building C object crypto/CMakeFiles/crypto.dir/pkcs8/pkcs8.c.o
[ 36%] Building C object crypto/CMakeFiles/crypto.dir/pkcs8/pkcs8_x509.c.o
[ 37%] Building C object crypto/CMakeFiles/crypto.dir/pkcs8/p5_pbev2.c.o
[ 37%] Building C object crypto/CMakeFiles/crypto.dir/poly1305/poly1305.c.o
[ 37%] Building C object crypto/CMakeFiles/crypto.dir/poly1305/poly1305_arm.c.o
[ 37%] Building C object crypto/CMakeFiles/crypto.dir/poly1305/poly1305_vec.c.o
[ 37%] Building C object crypto/CMakeFiles/crypto.dir/pool/pool.c.o
[ 38%] Building C object crypto/CMakeFiles/crypto.dir/rand_extra/deterministic.c.o
[ 38%] Building C object crypto/CMakeFiles/crypto.dir/rand_extra/forkunsafe.c.o
[ 38%] Building C object crypto/CMakeFiles/crypto.dir/rand_extra/fuchsia.c.o
[ 38%] Building C object crypto/CMakeFiles/crypto.dir/rand_extra/passive.c.o
[ 39%] Building C object crypto/CMakeFiles/crypto.dir/rand_extra/rand_extra.c.o
[ 39%] Building C object crypto/CMakeFiles/crypto.dir/rand_extra/windows.c.o
[ 39%] Building C object crypto/CMakeFiles/crypto.dir/rc4/rc4.c.o
[ 39%] Building C object crypto/CMakeFiles/crypto.dir/refcount_c11.c.o
[ 40%] Building C object crypto/CMakeFiles/crypto.dir/refcount_lock.c.o
[ 40%] Building C object crypto/CMakeFiles/crypto.dir/rsa_extra/rsa_asn1.c.o
[ 40%] Building C object crypto/CMakeFiles/crypto.dir/rsa_extra/rsa_print.c.o
[ 40%] Building C object crypto/CMakeFiles/crypto.dir/stack/stack.c.o
[ 40%] Building C object crypto/CMakeFiles/crypto.dir/siphash/siphash.c.o
[ 41%] Building C object crypto/CMakeFiles/crypto.dir/thread.c.o
[ 41%] Building C object crypto/CMakeFiles/crypto.dir/thread_none.c.o
[ 41%] Building C object crypto/CMakeFiles/crypto.dir/thread_pthread.c.o
[ 41%] Building C object crypto/CMakeFiles/crypto.dir/thread_win.c.o
[ 42%] Building C object crypto/CMakeFiles/crypto.dir/trust_token/pmbtoken.c.o
[ 42%] Building C object crypto/CMakeFiles/crypto.dir/trust_token/trust_token.c.o
[ 42%] Building C object crypto/CMakeFiles/crypto.dir/trust_token/voprf.c.o
[ 42%] Building C object crypto/CMakeFiles/crypto.dir/x509/a_digest.c.o
[ 43%] Building C object crypto/CMakeFiles/crypto.dir/x509/a_sign.c.o
[ 43%] Building C object crypto/CMakeFiles/crypto.dir/x509/a_strex.c.o
[ 43%] Building C object crypto/CMakeFiles/crypto.dir/x509/a_verify.c.o
[ 43%] Building C object crypto/CMakeFiles/crypto.dir/x509/algorithm.c.o
[ 43%] Building C object crypto/CMakeFiles/crypto.dir/x509/asn1_gen.c.o
[ 44%] Building C object crypto/CMakeFiles/crypto.dir/x509/by_dir.c.o
[ 44%] Building C object crypto/CMakeFiles/crypto.dir/x509/by_file.c.o
[ 44%] Building C object crypto/CMakeFiles/crypto.dir/x509/i2d_pr.c.o
[ 44%] Building C object crypto/CMakeFiles/crypto.dir/x509/rsa_pss.c.o
[ 45%] Building C object crypto/CMakeFiles/crypto.dir/x509/t_crl.c.o
[ 45%] Building C object crypto/CMakeFiles/crypto.dir/x509/t_req.c.o
[ 45%] Building C object crypto/CMakeFiles/crypto.dir/x509/t_x509.c.o
[ 45%] Building C object crypto/CMakeFiles/crypto.dir/x509/t_x509a.c.o
[ 46%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509.c.o
[ 46%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_att.c.o
[ 46%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_cmp.c.o
[ 46%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_d2.c.o
[ 46%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_def.c.o
[ 47%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_ext.c.o
[ 47%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_lu.c.o
[ 47%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_obj.c.o
[ 47%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_r2x.c.o
[ 48%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_req.c.o
[ 48%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_set.c.o
[ 48%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_trs.c.o
[ 48%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_txt.c.o
[ 49%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_v3.c.o
[ 49%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_vfy.c.o
[ 49%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509_vpm.c.o
[ 49%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509cset.c.o
[ 49%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509name.c.o
[ 50%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509rset.c.o
[ 50%] Building C object crypto/CMakeFiles/crypto.dir/x509/x509spki.c.o
[ 50%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_algor.c.o
[ 50%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_all.c.o
[ 51%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_attrib.c.o
[ 51%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_crl.c.o
[ 51%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_exten.c.o
[ 51%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_info.c.o
[ 52%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_name.c.o
[ 52%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_pkey.c.o
[ 52%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_pubkey.c.o
[ 52%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_req.c.o
[ 52%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_sig.c.o
[ 53%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_spki.c.o
[ 53%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_val.c.o
[ 53%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_x509.c.o
[ 53%] Building C object crypto/CMakeFiles/crypto.dir/x509/x_x509a.c.o
[ 54%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/pcy_cache.c.o
[ 54%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/pcy_data.c.o
[ 54%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/pcy_lib.c.o
[ 54%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/pcy_map.c.o
[ 55%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/pcy_node.c.o
[ 55%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/pcy_tree.c.o
[ 55%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_akey.c.o
[ 55%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_akeya.c.o
[ 55%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_alt.c.o
[ 56%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_bcons.c.o
[ 56%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_bitst.c.o
[ 56%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_conf.c.o
[ 56%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_cpols.c.o
[ 57%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_crld.c.o
[ 57%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_enum.c.o
[ 57%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_extku.c.o
[ 57%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_genn.c.o
[ 58%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_ia5.c.o
[ 58%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_info.c.o
[ 58%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_int.c.o
[ 58%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_lib.c.o
[ 58%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_ncons.c.o
[ 59%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_ocsp.c.o
[ 59%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_pci.c.o
[ 59%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_pcia.c.o
[ 59%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_pcons.c.o
[ 60%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_pmaps.c.o
[ 60%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_prn.c.o
[ 60%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_purp.c.o
[ 60%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_skey.c.o
[ 61%] Building C object crypto/CMakeFiles/crypto.dir/x509v3/v3_utl.c.o
[ 61%] Building ASM object crypto/CMakeFiles/crypto.dir/chacha/chacha-armv4.S.o
[ 61%] Building ASM object crypto/CMakeFiles/crypto.dir/curve25519/asm/x25519-asm-arm.S.o
[ 61%] Building ASM object crypto/CMakeFiles/crypto.dir/poly1305/poly1305_arm_asm.S.o
[ 61%] Building ASM object crypto/CMakeFiles/crypto.dir/test/trampoline-armv4.S.o
[ 62%] Linking C static library libcrypto.a
[ 62%] Built target crypto
Scanning dependencies of target urandom_test
[ 62%] Building CXX object crypto/CMakeFiles/urandom_test.dir/fipsmodule/rand/urandom_test.cc.o
[ 63%] Linking CXX executable urandom_test
[ 63%] Built target urandom_test
Scanning dependencies of target boringssl_gtest_main
[ 63%] Building CXX object crypto/test/CMakeFiles/boringssl_gtest_main.dir/gtest_main.cc.o
[ 63%] Built target boringssl_gtest_main
Scanning dependencies of target crypto_test
[ 63%] Building CXX object crypto/CMakeFiles/crypto_test.dir/abi_self_test.cc.o
[ 63%] Building CXX object crypto/CMakeFiles/crypto_test.dir/asn1/asn1_test.cc.o
[ 63%] Building CXX object crypto/CMakeFiles/crypto_test.dir/base64/base64_test.cc.o
[ 64%] Building CXX object crypto/CMakeFiles/crypto_test.dir/bio/bio_test.cc.o
[ 64%] Building CXX object crypto/CMakeFiles/crypto_test.dir/blake2/blake2_test.cc.o
[ 64%] Building CXX object crypto/CMakeFiles/crypto_test.dir/buf/buf_test.cc.o
[ 64%] Building CXX object crypto/CMakeFiles/crypto_test.dir/bytestring/bytestring_test.cc.o
[ 65%] Building CXX object crypto/CMakeFiles/crypto_test.dir/chacha/chacha_test.cc.o
[ 65%] Building CXX object crypto/CMakeFiles/crypto_test.dir/cipher_extra/aead_test.cc.o
/home/pi/iot/node_modules/aws-crt/crt/aws-lc/crypto/cipher_extra/aead_test.cc: In member function ‘virtual void PerAEADTest_UnalignedInput_Test::TestBody()’:
/home/pi/iot/node_modules/aws-crt/crt/aws-lc/crypto/cipher_extra/aead_test.cc:622:54: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t key[EVP_AEAD_MAX_KEY_LENGTH + 1];
                                                      ^
/home/pi/iot/node_modules/aws-crt/crt/aws-lc/crypto/cipher_extra/aead_test.cc:623:58: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH + 1];
                                                          ^
/home/pi/iot/node_modules/aws-crt/crt/aws-lc/crypto/cipher_extra/aead_test.cc:624:39: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t plaintext[32 + 1];
                                       ^
/home/pi/iot/node_modules/aws-crt/crt/aws-lc/crypto/cipher_extra/aead_test.cc:625:32: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t ad[32 + 1];
                                ^
/home/pi/iot/node_modules/aws-crt/crt/aws-lc/crypto/cipher_extra/aead_test.cc:644:75: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t ciphertext[sizeof(plaintext) + EVP_AEAD_MAX_OVERHEAD];
                                                                           ^
/home/pi/iot/node_modules/aws-crt/crt/aws-lc/crypto/cipher_extra/aead_test.cc:652:45: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t out[sizeof(ciphertext)];
                                             ^
cc1plus: all warnings being treated as errors
make[2]: *** [crypto/CMakeFiles/crypto_test.dir/build.make:167: crypto/CMakeFiles/crypto_test.dir/cipher_extra/aead_test.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:457: crypto/CMakeFiles/crypto_test.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
CMake Error at crt/aws-c-cal/cmake/modules/aws-lc.cmake:29 (message):
  Failed to build aws-lc
Call Stack (most recent call first):
  CMakeLists.txt:41 (include)


-- Configuring incomplete, errors occurred!
See also "/home/pi/iot/node_modules/aws-crt/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/iot/node_modules/aws-crt/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
(node:8916) UnhandledPromiseRejectionWarning: Error: Process terminated: 1
    at ChildProcess.<anonymous> (/home/pi/iot/node_modules/cmake-js/lib/processHelpers.js:29:32)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8916) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:8916) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 215 packages from 157 contributors and audited 215 packages in 340.368s

7 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Polyfill not included in published browser build

The polyfill.js file is required here: https://github.com/awslabs/aws-crt-nodejs/blob/master/lib/browser/http.ts#L13
But not found in the published npm module:

$ tree node_modules/aws-crt/dist.browser/browser

├── aws_iot.d.ts
├── aws_iot.js
├── aws_iot.js.map
├── crypto.d.ts
├── crypto.js
├── crypto.js.map
├── error.d.ts
├── error.js
├── error.js.map
├── http.d.ts
├── http.js
├── http.js.map
├── io.d.ts
├── io.js
├── io.js.map
├── mqtt.d.ts
├── mqtt.js
├── mqtt.js.map
├── trie.d.ts
├── trie.js
├── trie.js.map
├── ws.d.ts
├── ws.js
└── ws.js.map

Pnpm install issues

We just switched from npm to pnpm for faster installs & a monorepo setup.

It appears there are some issues with this package

> Build error occurred
Error: AWS CRT binary not present in any of the following locations:
	/Users/xyz/abc/clients/src/app/.next/bin/native/aws-crt-nodejs
	/Users/xyz/abc/clients/src/app/.next/bin/darwin-x64/aws-crt-nodejs
	 at Object.19698 (/Users//xyz/abc/clients/src/app/.next/serverless/chunks/706.js:288530:11)
    at __webpack_require__ (/Users/xyz/abc/clients/src/app/.next/serverless/pages/index.js:16366:43)

It appears that the bin is missing?

This is a related issue. aws/aws-iot-device-sdk-js-v2#119 (comment)

Stackoverflow suggested copying the bin where it needs to go https://stackoverflow.com/questions/68063950/aws-iot-sdk-js-v2-connection-problem-aws-crt-binary-not-present-in-any-of-the

Any pointers on how to solve this. I'm unfamiliar with this package and am wondering why it needs a bin to run as we are consuming the SDK in our next.js application

Thanks 😃

Not able to compile in arm7 on version 1.8.3/1.8.2/1.8.1 but it works for 1.8.0

Scanning dependencies of target aws-c-compression
[ 84%] Building C object crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/source/compression.c.o
[ 84%] Building C object crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/source/huffman.c.o
[ 84%] Building C object crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/source/huffman_testing.c.o
/home/gitlab-runner/builds/XXXXXX/0/YYYYYYYY/ZZZZZZZZZZZ/node_modules/aws-crt/crt/aws-c-compression/source/huffman_testing.c:13:10: fatal error: aws/testing/compression/huffman.h: No such file or directory
#include <aws/testing/compression/huffman.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/build.make:89: crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/source/huffman_testing.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:685: crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
ERR! OMG Process terminated: 2
(node:22276) UnhandledPromiseRejectionWarning: Error: Process terminated: 2
at ChildProcess. (/home/gitlab-runner/builds/XXXXXX/0/YYYYYYYY/ZZZZZZZZZZZ/node_modules/cmake-js/lib/processHelpers.js:29:32)
at ChildProcess.emit (events.js:314:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
(node:22276) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:22276) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@awscrt/* Aliases not being resolved at compile time

Environment

  • Mac OS Mojave
  • $ node -v : v14.7.0
  • $ rails -v : Rails 5.2.4.3
  • $ yarn -v : 1.22.4

package.json:

{
  "name": "testapp",
  "private": true,
  "dependencies": {
    "@rails/webpacker": "5.1.1",
    "aws-crt": "^1.1.11"
  },
  "devDependencies": {
    "webpack-dev-server": "^3.11.0"
  }
}

Steps to reproduce (I am using Ruby on Rails with webpacker)

  1. rails new testapp --webpack
  2. cd testapp && bundle exec rails webpacker:install
  3. yarn add aws-crt
  4. In app/javascript/packs/application.js write:
import { mqtt, CrtError, io } from "aws-crt";
const client_bootstrap = new io.ClientBootstrap();
console.log(client_bootstrap)
  1. run ./bin/webpack-dev-server

For me this results in the following error:

Can't resolve '@awscrt/io' in 'testapp/node_modules/aws-crt/dist.browser/browser'

It seems that the aliases defined inside tsconfig.browser.json are not being properly read and my bundle won't compile. I don't know if this depends on my configuration. I will provide more information if needed.

Installation on raspbian fails

npm i aws-crt

results in:

> [email protected] install /home/pi/node_modules/aws-crt
> node ./scripts/install.js

module.js:550
    throw err;
    ^

Error: Cannot find module 'cmake-js'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/pi/node_modules/aws-crt/scripts/build.js:17:15)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

Installed CMake via
apt install cmake

installed cmake-js via
npm i cmake-js

Run again npm i aws-crt

This time fails:

> [email protected] install /home/pi/aws-crt/node_modules/aws-crt
> node ./scripts/install.js

info TOOL Using Unix Makefiles generator.
info TOOL Building only the install target, as specified from the command line.
info DIST Downloading distribution files.
http DIST 	- https://nodejs.org/dist/v8.17.0/SHASUMS256.txt
http DIST 	- https://nodejs.org/dist/v8.17.0/node-v8.17.0-headers.tar.gz
info CMD CONFIGURE
info TOOL Building only the install target, as specified from the command line.
info RUN cmake "/home/pi/aws-crt/node_modules/aws-crt" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/aws-crt/node_modules/aws-crt/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v8.17.0/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="8.17.0" -DNODE_ARCH="arm" -DCMAKE_EXPORT_COMPILE_COMMANDS="true" -DCMAKE_JS_PLATFORM="linux" -DCMAKE_JS_ARCH="arm"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 8.3.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
-- Using submodule dependencies
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Packaging currently only supported on Fedora.
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LibCrypto (missing: LibCrypto_LIBRARY LibCrypto_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  aws-common-runtime/s2n/cmake/modules/FindLibCrypto.cmake:61 (find_package_handle_standard_args)
  CMakeLists.txt:40 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pi/aws-crt/node_modules/aws-crt/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/aws-crt/node_modules/aws-crt/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
(node:6585) UnhandledPromiseRejectionWarning: Error: Process terminated: 1
    at ChildProcess.<anonymous> (/home/pi/aws-crt/node_modules/cmake-js/lib/processHelpers.js:29:32)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
(node:6585) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6585) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Find out that LibCrypto is part of libel-dev. Install via sudo apt install libssl-dev

Run again npm i aws-crt, which fails with the same error as in issue #80:


> [email protected] install /home/pi/aws-crt/node_modules/aws-crt
> node ./scripts/install.js

info TOOL Using Unix Makefiles generator.
info TOOL Building only the install target, as specified from the command line.
info CMD CONFIGURE
info TOOL Building only the install target, as specified from the command line.
info RUN cmake "/home/pi/aws-crt/node_modules/aws-crt" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/aws-crt/node_modules/aws-crt/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v8.17.0/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="8.17.0" -DNODE_ARCH="arm" -DCMAKE_EXPORT_COMPILE_COMMANDS="true" -DCMAKE_JS_PLATFORM="linux" -DCMAKE_JS_ARCH="arm"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 8.3.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
-- Using submodule dependencies
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Packaging currently only supported on Fedora.
-- Found LibCrypto: /usr/lib/arm-linux-gnueabihf/libcrypto.a
-- LibCrypto Include Dir: /usr/include
-- LibCrypto Shared Lib:  /usr/lib/arm-linux-gnueabihf/libcrypto.so
-- LibCrypto Static Lib:  /usr/lib/arm-linux-gnueabihf/libcrypto.a
-- Attempting to try_compile PQ ASM
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
CMake Error at /home/pi/aws-crt/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CMakeLists.txt:15 (add_executable):
  Cannot find source file:

    /home/pi/aws-crt/node_modules/aws-crt/aws-common-runtime/s2n/tests/unit/s2n_pq_asm_noop_test.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at /home/pi/aws-crt/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CMakeLists.txt:15 (add_executable):
  No SOURCES given to target: cmTC_68eeb


CMake Error at aws-common-runtime/s2n/CMakeLists.txt:118 (try_compile):
  Failed to generate test project build system.


-- Configuring incomplete, errors occurred!
See also "/home/pi/aws-crt/node_modules/aws-crt/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/aws-crt/node_modules/aws-crt/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
(node:7097) UnhandledPromiseRejectionWarning: Error: Process terminated: 1
    at ChildProcess.<anonymous> (/home/pi/aws-crt/node_modules/cmake-js/lib/processHelpers.js:29:32)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
(node:7097) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7097) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Fatal error condition occurred

This is happening using ava@4 as test runner.

Environment information

npx envinfo --binaries --system

  System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 3.32 GB / 32.00 GB
    Shell: 3.3.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 16.13.1 - ~/.local/share/nvm/v16.13.1/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.1.2 - ~/.local/share/nvm/v16.13.1/bin/npm

Stack trace error

Fatal error condition occurred in /Users/kikobeats/Projects/microlink/api/node_modules/aws-crt/source/module.c:603: s_node_uv_elg == NULL
Exiting Application
################################################################################
Stack trace:
################################################################################
1   aws-crt-nodejs.node                 0x00000001133723d8 aws_fatal_assert + 80
2   aws-crt-nodejs.node                 0x000000011330d244 napi_register_module_v1 + 2320
3   node                                0x0000000104953758 _Z30napi_module_register_by_symbolN2v85LocalINS_6ObjectEEENS0_INS_5ValueEEENS0_INS_7ContextEEEPFP12napi_value__P10napi_env__S8_E + 496
4   node                                0x0000000104957eb4 _ZNSt3__110__function6__funcIZN4node7binding6DLOpenERKN2v820FunctionCallbackInfoINS4_5ValueEEEE3$_0NS_9allocatorISA_EEFbPNS3_4DLibEEEclEOSE_ + 448
5   node                                0x00000001049570f0 _ZN4node11Environment12TryLoadAddonEPKciRKNSt3__18functionIFbPNS_7binding4DLibEEEE + 240
6   node                                0x0000000104956f18 _ZN4node7binding6DLOpenERKN2v820FunctionCallbackInfoINS1_5ValueEEE + 480
7   node                                0x0000000104b3b57c _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE + 276
8   node                                0x0000000104b3b074 _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE + 468
9   node                                0x0000000104b3a900 _ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE + 228
10  node                                0x000000010527842c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
11  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
12  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
13  ???                                 0x00000005580982b4 0x0 + 22951854772
14  ???                                 0x00000005580b60f0 0x0 + 22951977200
15  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
16  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
17  ???                                 0x0000000558091e7c 0x0 + 22951829116
18  ???                                 0x00000005580aca0c 0x0 + 22951938572
19  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
20  ???                                 0x00000005580982b4 0x0 + 22951854772
21  ???                                 0x00000005580b60f0 0x0 + 22951977200
22  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
23  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
24  ???                                 0x0000000558091e7c 0x0 + 22951829116
25  ???                                 0x00000005580aca0c 0x0 + 22951938572
26  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
27  ???                                 0x00000005580982b4 0x0 + 22951854772
28  ???                                 0x00000005580b60f0 0x0 + 22951977200
29  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
30  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
31  ???                                 0x0000000558091e7c 0x0 + 22951829116
32  ???                                 0x00000005580aca0c 0x0 + 22951938572
33  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
34  ???                                 0x00000005580982b4 0x0 + 22951854772
35  ???                                 0x00000005580b60f0 0x0 + 22951977200
36  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
37  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
38  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
39  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
40  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
41  node                                0x0000000105208f78 construct_stub_create_deopt_addr + 344
42  node                                0x00000001053072d0 Builtins_ConstructHandler + 656
43  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
44  node                                0x0000000105208f78 construct_stub_create_deopt_addr + 344
45  node                                0x00000001053072d0 Builtins_ConstructHandler + 656
46  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
47  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
48  ???                                 0x0000000558091e7c 0x0 + 22951829116
49  ???                                 0x00000005580aca0c 0x0 + 22951938572
50  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
51  ???                                 0x00000005580982b4 0x0 + 22951854772
52  ???                                 0x000000055808e7dc 0x0 + 22951815132
53  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
54  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
55  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
56  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
57  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
58  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
59  ???                                 0x0000000558065f60 0x0 + 22951649120
60  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
61  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
62  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
63  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
64  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
65  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
66  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
67  ???                                 0x0000000558065f60 0x0 + 22951649120
68  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
69  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
70  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
71  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
72  node                                0x000000010523b574 Builtins_AsyncFunctionAwaitResolveClosure + 84
73  node                                0x00000001052c0418 Builtins_PromiseFulfillReactionJob + 56
74  node                                0x000000010522d954 Builtins_RunMicrotasks + 596
75  node                                0x0000000105209c44 Builtins_JSRunMicrotasksEntry + 164
76  node                                0x0000000104bde450 _ZN2v88internal12_GLOBAL__N_16InvokeEPNS0_7IsolateERKNS1_12InvokeParamsE + 2332
77  node                                0x0000000104bde884 _ZN2v88internal12_GLOBAL__N_118InvokeWithTryCatchEPNS0_7IsolateERKNS1_12InvokeParamsE + 88
78  node                                0x0000000104bde970 _ZN2v88internal9Execution16TryRunMicrotasksEPNS0_7IsolateEPNS0_14MicrotaskQueueEPNS0_11MaybeHandleINS0_6ObjectEEE + 64
79  node                                0x0000000104c0159c _ZN2v88internal14MicrotaskQueue13RunMicrotasksEPNS0_7IsolateE + 336
80  node                                0x0000000104c01e30 _ZN2v88internal14MicrotaskQueue17PerformCheckpointEPNS_7IsolateE + 124
81  node                                0x00000001048cfd8c _ZN4node21InternalCallbackScope5CloseEv + 248
82  node                                0x00000001048cf7c4 _ZN4node21InternalCallbackScopeD1Ev + 20
83  node                                0x00000001049833dc _ZN4node2fs10FileHandle8CloseReq7ResolveEv + 136
84  node                                0x000000010499610c _ZZN4node2fs10FileHandle12ClosePromiseEvEN3$_08__invokeEP7uv_fs_s + 244
85  node                                0x00000001051ea3b0 uv__work_done + 192
86  node                                0x00000001051edb10 uv__async_io + 320
87  node                                0x00000001051ff824 uv__io_poll + 1052
88  node                                0x00000001051edfa0 uv_run + 380
89  node                                0x00000001048d0e00 _ZN4node13SpinEventLoopEPNS_11EnvironmentE + 244
90  node                                0x0000000104a11be8 _ZN4node6worker6Worker3RunEv + 984
91  node                                0x0000000104a14e10 _ZZN4node6worker6Worker11StartThreadERKN2v820FunctionCallbackInfoINS2_5ValueEEEEN3$_38__invokeEPv + 56
92  libsystem_pthread.dylib             0x00000001b1bb54ec _pthread_start + 148
93  libsystem_pthread.dylib             0x00000001b1bb02d0 thread_start + 8
Signal received: 6, errno: 0
################################################################################
Stack trace:
################################################################################
1   aws-crt-nodejs.node                 0x000000011330d488 s_print_stack_trace + 24
2   libsystem_platform.dylib            0x00000001b1bcc4e4 _sigtramp + 56
3   libsystem_pthread.dylib             0x00000001b1bb515c pthread_kill + 288
4   libsystem_c.dylib                   0x00000001b1af2314 abort + 164
5   aws-crt-nodejs.node                 0x00000001133723dc aws_byte_buf_init + 0
6   aws-crt-nodejs.node                 0x000000011330d244 napi_register_module_v1 + 2320
7   node                                0x0000000104953758 _Z30napi_module_register_by_symbolN2v85LocalINS_6ObjectEEENS0_INS_5ValueEEENS0_INS_7ContextEEEPFP12napi_value__P10napi_env__S8_E + 496
8   node                                0x0000000104957eb4 _ZNSt3__110__function6__funcIZN4node7binding6DLOpenERKN2v820FunctionCallbackInfoINS4_5ValueEEEE3$_0NS_9allocatorISA_EEFbPNS3_4DLibEEEclEOSE_ + 448
9   node                                0x00000001049570f0 _ZN4node11Environment12TryLoadAddonEPKciRKNSt3__18functionIFbPNS_7binding4DLibEEEE + 240
10  node                                0x0000000104956f18 _ZN4node7binding6DLOpenERKN2v820FunctionCallbackInfoINS1_5ValueEEE + 480
11  node                                0x0000000104b3b57c _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE + 276
12  node                                0x0000000104b3b074 _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE + 468
13  node                                0x0000000104b3a900 _ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE + 228
14  node                                0x000000010527842c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
15  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
16  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
17  ???                                 0x00000005580982b4 0x0 + 22951854772
18  ???                                 0x00000005580b60f0 0x0 + 22951977200
19  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
20  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
21  ???                                 0x0000000558091e7c 0x0 + 22951829116
22  ???                                 0x00000005580aca0c 0x0 + 22951938572
23  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
24  ???                                 0x00000005580982b4 0x0 + 22951854772
25  ???                                 0x00000005580b60f0 0x0 + 22951977200
26  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
27  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
28  ???                                 0x0000000558091e7c 0x0 + 22951829116
29  ???                                 0x00000005580aca0c 0x0 + 22951938572
30  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
31  ???                                 0x00000005580982b4 0x0 + 22951854772
32  ???                                 0x00000005580b60f0 0x0 + 22951977200
33  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
34  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
35  ???                                 0x0000000558091e7c 0x0 + 22951829116
36  ???                                 0x00000005580aca0c 0x0 + 22951938572
37  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
38  ???                                 0x00000005580982b4 0x0 + 22951854772
39  ???                                 0x00000005580b60f0 0x0 + 22951977200
40  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
41  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
42  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
43  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
44  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
45  node                                0x0000000105208f78 construct_stub_create_deopt_addr + 344
46  node                                0x00000001053072d0 Builtins_ConstructHandler + 656
47  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
48  node                                0x0000000105208f78 construct_stub_create_deopt_addr + 344
49  node                                0x00000001053072d0 Builtins_ConstructHandler + 656
50  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
51  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
52  ???                                 0x0000000558091e7c 0x0 + 22951829116
53  ???                                 0x00000005580aca0c 0x0 + 22951938572
54  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
55  ???                                 0x00000005580982b4 0x0 + 22951854772
56  ???                                 0x000000055808e7dc 0x0 + 22951815132
57  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
58  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
59  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
60  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
61  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
62  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
63  ???                                 0x0000000558065f60 0x0 + 22951649120
64  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
65  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
66  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
67  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
68  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
69  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
70  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
71  ???                                 0x0000000558065f60 0x0 + 22951649120
72  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
73  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
74  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
75  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
76  node                                0x000000010523b574 Builtins_AsyncFunctionAwaitResolveClosure + 84
77  node                                0x00000001052c0418 Builtins_PromiseFulfillReactionJob + 56
78  node                                0x000000010522d954 Builtins_RunMicrotasks + 596
79  node                                0x0000000105209c44 Builtins_JSRunMicrotasksEntry + 164
80  node                                0x0000000104bde450 _ZN2v88internal12_GLOBAL__N_16InvokeEPNS0_7IsolateERKNS1_12InvokeParamsE + 2332
81  node                                0x0000000104bde884 _ZN2v88internal12_GLOBAL__N_118InvokeWithTryCatchEPNS0_7IsolateERKNS1_12InvokeParamsE + 88
82  node                                0x0000000104bde970 _ZN2v88internal9Execution16TryRunMicrotasksEPNS0_7IsolateEPNS0_14MicrotaskQueueEPNS0_11MaybeHandleINS0_6ObjectEEE + 64
83  node                                0x0000000104c0159c _ZN2v88internal14MicrotaskQueue13RunMicrotasksEPNS0_7IsolateE + 336
84  node                                0x0000000104c01e30 _ZN2v88internal14MicrotaskQueue17PerformCheckpointEPNS_7IsolateE + 124
85  node                                0x00000001048cfd8c _ZN4node21InternalCallbackScope5CloseEv + 248
86  node                                0x00000001048cf7c4 _ZN4node21InternalCallbackScopeD1Ev + 20
87  node                                0x00000001049833dc _ZN4node2fs10FileHandle8CloseReq7ResolveEv + 136
88  node                                0x000000010499610c _ZZN4node2fs10FileHandle12ClosePromiseEvEN3$_08__invokeEP7uv_fs_s + 244
89  node                                0x00000001051ea3b0 uv__work_done + 192
90  node                                0x00000001051edb10 uv__async_io + 320
91  node                                0x00000001051ff824 uv__io_poll + 1052
92  node                                0x00000001051edfa0 uv_run + 380
93  node                                0x00000001048d0e00 _ZN4node13SpinEventLoopEPNS_11EnvironmentE + 244
94  node                                0x0000000104a11be8 _ZN4node6worker6Worker3RunEv + 984
95  node                                0x0000000104a14e10 _ZZN4node6worker6Worker11StartThreadERKN2v820FunctionCallbackInfoINS2_5ValueEEEEN3$_38__invokeEPv + 56
96  libsystem_pthread.dylib             0x00000001b1bb54ec _pthread_start + 148
97  libsystem_pthread.dylib             0x00000001b1bb02d0 thread_start + 8
Signal received: 6, errno: 0
################################################################################
Stack trace:
################################################################################
1   aws-crt-nodejs.node                 0x000000011330d488 s_print_stack_trace + 24
2   libsystem_platform.dylib            0x00000001b1bcc4e4 _sigtramp + 56
3   libsystem_pthread.dylib             0x00000001b1bb515c pthread_kill + 288
4   libsystem_c.dylib                   0x00000001b1af2314 abort + 164
5   node                                0x00000001051fa718 uv_barrier_wait + 0
6   node                                0x00000001048e5d24 _ZN4node9MutexBaseINS_16LibuvMutexTraitsEED1Ev + 20
7   libsystem_c.dylib                   0x00000001b1aa47d8 __cxa_finalize_ranges + 460
8   libsystem_c.dylib                   0x00000001b1aa4580 exit + 44
9   aws-crt-nodejs.node                 0x000000011330d490 s_napi_context_finalize + 0
10  libsystem_platform.dylib            0x00000001b1bcc4e4 _sigtramp + 56
11  libsystem_pthread.dylib             0x00000001b1bb515c pthread_kill + 288
12  libsystem_c.dylib                   0x00000001b1af2314 abort + 164
13  aws-crt-nodejs.node                 0x00000001133723dc aws_byte_buf_init + 0
14  aws-crt-nodejs.node                 0x000000011330d244 napi_register_module_v1 + 2320
15  node                                0x0000000104953758 _Z30napi_module_register_by_symbolN2v85LocalINS_6ObjectEEENS0_INS_5ValueEEENS0_INS_7ContextEEEPFP12napi_value__P10napi_env__S8_E + 496
16  node                                0x0000000104957eb4 _ZNSt3__110__function6__funcIZN4node7binding6DLOpenERKN2v820FunctionCallbackInfoINS4_5ValueEEEE3$_0NS_9allocatorISA_EEFbPNS3_4DLibEEEclEOSE_ + 448
17  node                                0x00000001049570f0 _ZN4node11Environment12TryLoadAddonEPKciRKNSt3__18functionIFbPNS_7binding4DLibEEEE + 240
18  node                                0x0000000104956f18 _ZN4node7binding6DLOpenERKN2v820FunctionCallbackInfoINS1_5ValueEEE + 480
19  node                                0x0000000104b3b57c _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE + 276
20  node                                0x0000000104b3b074 _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE + 468
21  node                                0x0000000104b3a900 _ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE + 228
22  node                                0x000000010527842c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
23  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
24  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
25  ???                                 0x00000005580982b4 0x0 + 22951854772
26  ???                                 0x00000005580b60f0 0x0 + 22951977200
27  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
28  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
29  ???                                 0x0000000558091e7c 0x0 + 22951829116
30  ???                                 0x00000005580aca0c 0x0 + 22951938572
31  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
32  ???                                 0x00000005580982b4 0x0 + 22951854772
33  ???                                 0x00000005580b60f0 0x0 + 22951977200
34  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
35  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
36  ???                                 0x0000000558091e7c 0x0 + 22951829116
37  ???                                 0x00000005580aca0c 0x0 + 22951938572
38  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
39  ???                                 0x00000005580982b4 0x0 + 22951854772
40  ???                                 0x00000005580b60f0 0x0 + 22951977200
41  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
42  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
43  ???                                 0x0000000558091e7c 0x0 + 22951829116
44  ???                                 0x00000005580aca0c 0x0 + 22951938572
45  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
46  ???                                 0x00000005580982b4 0x0 + 22951854772
47  ???                                 0x00000005580b60f0 0x0 + 22951977200
48  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
49  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
50  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
51  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
52  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
53  node                                0x0000000105208f78 construct_stub_create_deopt_addr + 344
54  node                                0x00000001053072d0 Builtins_ConstructHandler + 656
55  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
56  node                                0x0000000105208f78 construct_stub_create_deopt_addr + 344
57  node                                0x00000001053072d0 Builtins_ConstructHandler + 656
58  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
59  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
60  ???                                 0x0000000558091e7c 0x0 + 22951829116
61  ???                                 0x00000005580aca0c 0x0 + 22951938572
62  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
63  ???                                 0x00000005580982b4 0x0 + 22951854772
64  ???                                 0x000000055808e7dc 0x0 + 22951815132
65  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
66  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
67  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
68  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
69  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
70  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
71  ???                                 0x0000000558065f60 0x0 + 22951649120
72  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
73  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
74  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
75  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
76  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
77  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
78  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
79  ???                                 0x0000000558065f60 0x0 + 22951649120
80  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
81  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
82  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
83  node                                0x000000010520bf78 Builtins_InterpreterEntryTrampoline + 248
84  node                                0x000000010523b574 Builtins_AsyncFunctionAwaitResolveClosure + 84
85  node                                0x00000001052c0418 Builtins_PromiseFulfillReactionJob + 56
86  node                                0x000000010522d954 Builtins_RunMicrotasks + 596
87  node                                0x0000000105209c44 Builtins_JSRunMicrotasksEntry + 164
88  node                                0x0000000104bde450 _ZN2v88internal12_GLOBAL__N_16InvokeEPNS0_7IsolateERKNS1_12InvokeParamsE + 2332
89  node                                0x0000000104bde884 _ZN2v88internal12_GLOBAL__N_118InvokeWithTryCatchEPNS0_7IsolateERKNS1_12InvokeParamsE + 88
90  node                                0x0000000104bde970 _ZN2v88internal9Execution16TryRunMicrotasksEPNS0_7IsolateEPNS0_14MicrotaskQueueEPNS0_11MaybeHandleINS0_6ObjectEEE + 64
91  node                                0x0000000104c0159c _ZN2v88internal14MicrotaskQueue13RunMicrotasksEPNS0_7IsolateE + 336
92  node                                0x0000000104c01e30 _ZN2v88internal14MicrotaskQueue17PerformCheckpointEPNS_7IsolateE + 124
93  node                                0x00000001048cfd8c _ZN4node21InternalCallbackScope5CloseEv + 248
94  node                                0x00000001048cf7c4 _ZN4node21InternalCallbackScopeD1Ev + 20
95  node                                0x00000001049833dc _ZN4node2fs10FileHandle8CloseReq7ResolveEv + 136
96  node                                0x000000010499610c _ZZN4node2fs10FileHandle12ClosePromiseEvEN3$_08__invokeEP7uv_fs_s + 244
97  node                                0x00000001051ea3b0 uv__work_done + 192
98  node                                0x00000001051edb10 uv__async_io + 320
99  node                                0x00000001051ff824 uv__io_poll + 1052
100 node                                0x00000001051edfa0 uv_run + 380
101 node                                0x00000001048d0e00 _ZN4node13SpinEventLoopEPNS_11EnvironmentE + 244
102 node                                0x0000000104a11be8 _ZN4node6worker6Worker3RunEv + 984
103 node                                0x0000000104a14e10 _ZZN4node6worker6Worker11StartThreadERKN2v820FunctionCallbackInfoINS2_5ValueEEEEN3$_38__invokeEPv + 56
104 libsystem_pthread.dylib             0x00000001b1bb54ec _pthread_start + 148
105 libsystem_pthread.dylib             0x00000001b1bb02d0 thread_start + 8

Guidance: importing correct dist in browser

First of all, I don't know if this ticket should be in this repo or in aws-iot-device-sdk-js-v2

I have a react typescript project that creates a mqtt websocket connection using credentials. My first idea was to use aws-iot-device-sdk-js-v2 but I couldn't transpile it because the library was importing dist types from aws-crt instead of dist.browser

Then I realised that aws-iot-device-sdk-js-v2 is only importing the modules and exporting them as is so I moved to use aws-crt directly, but I have to import the modules like this

import { io, iot, mqtt} from 'aws-crt/dist.browser/browser';

Everything works but... it's ugly. Is there any recommended way to use these packages in the browser?

Thanks

Client crashes 10sec after connecting

I have a client that uses WSS and Custom Auth and 10sec after connecting it crashes:

Signal received: 10, errno: 0
################################################################################
Resolved stacktrace:
################################################################################
1   aws-crt-nodejs.node                 0x000000010450e733 s_print_stack_trace + 19
2   libsystem_platform.dylib            0x00007fff6cec95fd _sigtramp + 29
3   ???                                 0x0000000104035000 0x0 + 4362293248
v8::internal::GlobalHandles::InvokeSecondPassPhantomCallbacks() (in node) + 145
v8::internal::GlobalHandles::InvokeSecondPassPhantomCallbacksFromTask() (in node) + 291
node::PerIsolatePlatformData::RunForegroundTask(std::__1::unique_ptr<v8::Task, std::__1::default_delete<v8::Task> >) (in node) + 200
node::PerIsolatePlatformData::FlushForegroundTasksInternal() (in node) + 502
uv__async_io (in node) + 294
uv__io_poll (in node) + 1676
uv_run (in node) + 359
node::NodeMainInstance::Run() (in node) + 300
node::Start(int, char**) (in node) + 250
13  libdyld.dylib                       0x00007fff6ccd0cc9 start + 1
################################################################################
Raw stacktrace:
################################################################################
1   aws-crt-nodejs.node                 0x000000010450e733 s_print_stack_trace + 19
2   libsystem_platform.dylib            0x00007fff6cec95fd _sigtramp + 29
3   ???                                 0x0000000104035000 0x0 + 4362293248
4   node                                0x000000010027ee1d _ZN2v88internal13GlobalHandles32InvokeSecondPassPhantomCallbacksEv + 145
5   node                                0x000000010027ed4d _ZN2v88internal13GlobalHandles40InvokeSecondPassPhantomCallbacksFromTaskEv + 291
6   node                                0x00000001000db0e8 _ZN4node22PerIsolatePlatformData17RunForegroundTaskENSt3__110unique_ptrIN2v84TaskENS1_14default_deleteIS4_EEEE + 200
7   node                                0x00000001000da4a6 _ZN4node22PerIsolatePlatformData28FlushForegroundTasksInternalEv + 502
8   node                                0x00000001006d12da uv__async_io + 294
9   node                                0x00000001006e1996 uv__io_poll + 1676
10  node                                0x00000001006d1796 uv_run + 359
11  node                                0x00000001000bcaa8 _ZN4node16NodeMainInstance3RunEv + 300
12  node                                0x00000001000660ea _ZN4node5StartEiPPc + 250
13  libdyld.dylib                       0x00007fff6ccd0cc9 start + 1

The client can be found here: https://github.com/massi-ang/aws-iot-custom-authorizer-sample/blob/master/test/authTest.js

In the same repo there is also the code to create the Custom Authorizer.

No prebuilt binary for ARM

Are there plans to have a prebuilt binary for ARM? I understand it can be built from source, but my Raspberry Pi 3 always runs out of memory while building.

IoT Publish Type Errors

Hi,

I am getting this type error when using the publish method. The publish payload exists on AWS IoT Core "Test" panel, but the SDK implementation is throwing error on Browser (Angular).

Please advise.

Service File:

import { Injectable, NgZone } from '@angular/core';
import { io, iot, mqtt } from 'aws-iot-device-sdk-v2';
import { CrtError } from 'aws-crt';
import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class AWSIoTService {

  iotTopic = null;
  connection: mqtt.MqttClientConnection;

  AWS_ACCESS_KEY = 'xxxx';
  AWS_SECRET_ACCESS_KEY = 'xxxx';
  AWS_IOT_ENDPOINT = 'data-ats.iot.ap-southeast-1.amazonaws.com';

  constructor(zone: NgZone) {
    this.connection = zone.runOutsideAngular(() => {
      return this.makeOrResumeConnection();
    });
  }

  makeOrResumeConnection(): mqtt.MqttClientConnection {
    const clientName = 'quix-admin-' + Math.floor((Math.random() * 100000) + 1);
    const clientBootstrap = new io.ClientBootstrap();
    const config = iot.AwsIotMqttConnectionConfigBuilder
      .new_with_websockets({
        region: 'ap-southeast-1',
        credentials_provider: undefined,
        proxy_options: undefined
      })
      .with_client_id(clientName)
      .with_clean_session(false)
      .with_credentials('ap-southeast-1', this.AWS_ACCESS_KEY, this.AWS_SECRET_ACCESS_KEY, '')
      .with_endpoint(this.AWS_IOT_ENDPOINT)
      .build();

    const client = new mqtt.MqttClient(clientBootstrap);

    const connection = client.new_connection(config);

    connection.on('connect', (_) => {
      console.log('Connected to AWS IoT');
    });

    connection.on('interrupt', (error: CrtError) => {
      console.log(`connection interrupted: error=${error}`);
    });

    connection.on('resume', (returnCode: number, sessionPresent: boolean) => {
      console.log(`resumed: rc: ${returnCode} existing session: ${sessionPresent}`);
    });

    connection.on('disconnect', () => {
      connection.connect();
    });

    connection.on('error', err => {
      console.error(err);
    });

    connection.connect();
    return connection;
  }

  async publish(topic: string, payload: mqtt.Payload) {
    return this.connection.publish(topic, payload, mqtt.QoS.AtMostOnce);
  }

  subscribeToTopic(topic: string): Observable<any> {
    return new Observable(observer => {
      // tslint:disable-next-line: variable-name
      this.connection.subscribe(topic, mqtt.QoS.AtMostOnce, (_topic, _payload) => {
        const decoder = new TextDecoder('utf8');
        const message = decoder.decode(_payload);
        observer.next(message);
      }).catch(err => {
        observer.error(err);
        observer.complete();
      });
    });
  }
}
ERROR Error: Uncaught (in promise): TypeError: packet is undefined
./node_modules/aws-crt/dist.browser/browser/mqtt.js/MqttClientConnection.prototype.publish/</</</<@http://localhost:4200/pages-dashboard-dashboard-module.js:1557:39
sendPacket@http://localhost:4200/pages-dashboard-dashboard-module.js:21299:5
./node_modules/mqtt/lib/client.js/MqttClient.prototype._sendPacket@http://localhost:4200/pages-dashboard-dashboard-module.js:22259:17
./node_modules/mqtt/lib/client.js/MqttClient.prototype.publish@http://localhost:4200/pages-dashboard-dashboard-module.js:21738:14
./node_modules/aws-crt/dist.browser/browser/mqtt.js/MqttClientConnection.prototype.publish/</</<@http://localhost:4200/pages-dashboard-dashboard-module.js:1552:42
ZoneAwarePromise@http://localhost:4200/polyfills.js:6326:33
./node_modules/aws-crt/dist.browser/browser/mqtt.js/MqttClientConnection.prototype.publish/</<@http://localhost:4200/pages-dashboard-dashboard-module.js:1551:39
step@http://localhost:4200/pages-dashboard-dashboard-module.js:1304:23
verb/<@http://localhost:4200/pages-dashboard-dashboard-module.js:1285:53
./node_modules/aws-crt/dist.browser/browser/mqtt.js/__awaiter</<@http://localhost:4200/pages-dashboard-dashboard-module.js:1279:71
ZoneAwarePromise@http://localhost:4200/polyfills.js:6326:33
./node_modules/aws-crt/dist.browser/browser/mqtt.js/__awaiter<@http://localhost:4200/pages-dashboard-dashboard-module.js:1275:12
./node_modules/aws-crt/dist.browser/browser/mqtt.js/MqttClientConnection.prototype.publish@http://localhost:4200/pages-dashboard-dashboard-module.js:1546:16
publish/<@http://localhost:4200/pages-dashboard-dashboard-module.js:28539:36
__awaiter/<@http://localhost:4200/vendor.js:137258:71
ZoneAwarePromise@http://localhost:4200/polyfills.js:6326:33
__awaiter@http://localhost:4200/vendor.js:137254:12
publish@http://localhost:4200/pages-dashboard-dashboard-module.js:28538:71
startServing@http://localhost:4200/pages-dashboard-dashboard-module.js:28424:18
DashboardPage_Template_ion_button_click_58_listener@ng:///DashboardPage.js:360:22
executeListenerWithErrorHandling@http://localhost:4200/vendor.js:58430:16
wrapListenerIn_markDirtyAndPreventDefault@http://localhost:4200/vendor.js:58472:54
decoratePreventDefault/<@http://localhost:4200/vendor.js:92497:50
invokeTask@http://localhost:4200/polyfills.js:5765:35
onInvokeTask@http://localhost:4200/vendor.js:75769:33
invokeTask@http://localhost:4200/polyfills.js:5764:40
runTask@http://localhost:4200/polyfills.js:5533:51
invokeTask@http://localhost:4200/polyfills.js:5846:38
invokeTask@http://localhost:4200/polyfills.js:6987:18
globalZoneAwareCallback@http://localhost:4200/polyfills.js:7013:31
EventListener.handleEvent*customScheduleGlobal@http://localhost:4200/polyfills.js:7139:47
scheduleTask@http://localhost:4200/polyfills.js:5751:30
onScheduleTask@http://localhost:4200/polyfills.js:5638:69
scheduleTask@http://localhost:4200/polyfills.js:5744:55
scheduleTask@http://localhost:4200/polyfills.js:5576:47
scheduleEventTask@http://localhost:4200/polyfills.js:5602:29
makeAddListener/<@http://localhost:4200/polyfills.js:7294:39
addEventListener@http://localhost:4200/vendor.js:92964:17
addEventListener@http://localhost:4200/vendor.js:92201:23
listen@http://localhost:4200/vendor.js:92803:72
listenerInternal@http://localhost:4200/vendor.js:58375:44
ɵɵlistener@http://localhost:4200/vendor.js:58211:21
DashboardPage_Template@ng:///DashboardPage.js:359:26
executeTemplate@http://localhost:4200/vendor.js:49224:19
renderView@http://localhost:4200/vendor.js:48994:28
renderComponent@http://localhost:4200/vendor.js:50573:15
renderChildComponents@http://localhost:4200/vendor.js:48795:24
renderView@http://localhost:4200/vendor.js:49020:34
create@http://localhost:4200/vendor.js:69073:23
createComponent@http://localhost:4200/vendor.js:52730:55
activateWith@http://localhost:4200/vendor.js:107539:53
activateRoutes@http://localhost:4200/vendor.js:98221:40
activateChildRoutes/<@http://localhost:4200/vendor.js:98158:18
activateChildRoutes@http://localhost:4200/vendor.js:98153:29
activateRoutes@http://localhost:4200/vendor.js:98228:22
activateChildRoutes/<@http://localhost:4200/vendor.js:98158:18
activateChildRoutes@http://localhost:4200/vendor.js:98153:29
activate@http://localhost:4200/vendor.js:98016:14
activateRoutes/<@http://localhost:4200/vendor.js:97989:10
_next@http://localhost:4200/vendor.js:125794:35
next@http://localhost:4200/vendor.js:121299:18
_next@http://localhost:4200/vendor.js:128178:26
next@http://localhost:4200/vendor.js:121299:18
_next@http://localhost:4200/vendor.js:125800:26
next@http://localhost:4200/vendor.js:121299:18
notifyNext@http://localhost:4200/vendor.js:127854:26
_next@http://localhost:4200/vendor.js:120594:21
next@http://localhost:4200/vendor.js:121299:18
_next@http://localhost:4200/vendor.js:125800:26
next@http://localhost:4200/vendor.js:121299:18
subscribeToArray/<@http://localhost:4200/vendor.js:130718:20
_trySubscribe@http://localhost:4200/vendor.js:120755:25
subscribe@http://localhost:4200/vendor.js:120741:22
call@http://localhost:4200/vendor.js:125781:23
subscribe@http://localhost:4200/vendor.js:120736:31
subscribeToResult@http://localhost:4200/vendor.js:130836:23
_innerSub@http://localhost:4200/vendor.js:127830:115
_next@http://localhost:4200/vendor.js:127820:14
next@http://localhost:4200/vendor.js:121299:18
notifyNext@http://localhost:4200/vendor.js:127854:26
_next@http://localhost:4200/vendor.js:120594:21
next@http://localhost:4200/vendor.js:121299:18
_next@http://localhost:4200/vendor.js:125800:26
next@http://localhost:4200/vendor.js:121299:18
_next@http://localhost:4200/vendor.js:128178:26
next@http://localhost:4200/vendor.js:121299:18
notifyNext@http://localhost:4200/vendor.js:126039:26
_next@http://localhost:4200/vendor.js:120594:21
next@http://localhost:4200/vendor.js:121299:18
_next@http://localhost:4200/vendor.js:125800:26
next@http://localhost:4200/vendor.js:121299:18
_complete@http://localhost:4200/vendor.js:128003:29
complete@http://localhost:4200/vendor.js:121311:18
_complete@http://localhost:4200/vendor.js:121329:26
complete@http://localhost:4200/vendor.js:121311:18
_complete@http://localhost:4200/vendor.js:126034:30
complete@http://localhost:4200/vendor.js:121311:18
subscribeToArray/<@http://localhost:4200/vendor.js:130720:16
_trySubscribe@http://localhost:4200/vendor.js:120755:25
subscribe@http://localhost:4200/vendor.js:120741:22
call@http://localhost:4200/vendor.js:125988:23
subscribe@http://localhost:4200/vendor.js:120736:31
call@http://localhost:4200/vendor.js:127153:23
subscribe@http://localhost:4200/vendor.js:120736:31
call@http://localhost:4200/vendor.js:127973:23
subscribe@http://localhost:4200/vendor.js:120736:31
call@http://localhost:4200/vendor.js:125781:23
subscribe@http://localhost:4200/vendor.js:120736:31
subscribeToResult@http://localhost:4200/vendor.js:130836:23
_innerSub@http://localhost:4200/vendor.js:126026:116
_tryNext@http://localhost:4200/vendor.js:126020:14
_next@http://localhost:4200/vendor.js:126003:18
next@http://localhost:4200/vendor.js:121299:18
_next@http://localhost:4200/vendor.js:128178:26
next@http://localhost:4200/vendor.js:121299:18
subscribeToArray/<@http://localhost:4200/vendor.js:130718:20
_trySubscribe@http://localhost:4200/vendor.js:120755:25
subscribe@http://localhost:4200/vendor.js:120741:22
call@http://localhost:4200/vendor.js:128148:23
subscribe@http://localhost:4200/vendor.js:120736:31
call@http://localhost:4200/vendor.js:125988:23
subscribe@http://localhost:4200/vendor.js:120736:31
call@http://localhost:4200/vendor.js:128148:23
subscribe@http://localhost:4200/vendor.js:120736:31
call@http://localhost:4200/vendor.js:125781:23
subscribe@http://localhost:4200/vendor.js:120736:31

Documentation is confusing and lacks working links between pages

The documentation does not provide an overview of the different modules and their functionality. For example, there is a flat list of 10+ constructor methods without any way to know what they refer to. Links placeholders are not replaced with the actual link.

Cannot run pkg on windows

Hi,

I have a simple node application that uses aws-iot-device-sdk-v2. I need to package it into exe.

But I get this error.

PS C:\Code\mir-kiosk-electron\windowsSockets> .\build\ipc.exe
pkg/prelude/bootstrap.js:1614
      throw error;
      ^

Error: A dynamic link library (DLL) initialization routine failed.
\\?\C:\Code\mir-kiosk-electron\windowsSockets\node_modules\aws-crt\dist\bin\native\aws-crt-nodejs.node
    at process.dlopen (pkg/prelude/bootstrap.js:2046:30)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1127:18)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at Module.require (pkg/prelude/bootstrap.js:1593:31)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\snapshot\windowsSockets\node_modules\aws-crt\dist\native\binding.js:55:19)
    at Module._compile (pkg/prelude/bootstrap.js:1686:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)

Does aws-crt require any DLL?

I have also logged an issue with pkg
vercel/pkg#1232

Project installs its dev dependencies in my project

Dev dependencies for this project are appearing in my own project, which is breaking and otherwise slowing down my build.

Minimal steps to reproduce

mkdir ~/deleteme && cd ~/deleteme
npm init
npm i [email protected]
grep puppeteer package-lock.json
# puppeteer correctly does not appear here
ls -l node_modules/aws-crt/node_modules/ | grep puppeteer
# BUG! puppeteer appears here

Details

npm install, with or without the --only=prod flag, shouldn't install transitive dev dependencies. Even if npm installs my project's own dev dependencies, it shouldn't install other projects' dev dependencies. Nevertheless, dev dependencies for aws-crt are somehow being installed in my project.

For example, even though this project declares a dev dependency on puppeteer, installing aws-crt in my project shouldn't result in puppeteer appearing in my package-lock.json file, nor under my node_modules/ dir.

While I don't see it in package lock, I do find it under my node_modules/ dir:

$ grep puppeteer package-lock.json # nothing
$ ls -l node_modules/aws-crt/node_modules/ | grep puppeteer
drwxr-xr-x    7 greimer  staff    224 Jun 20 13:21 expect-puppeteer
drwxr-xr-x   10 greimer  staff    320 Jun 20 13:21 jest-environment-puppeteer
drwxr-xr-x    7 greimer  staff    224 Jun 20 13:21 jest-puppeteer
drwxr-xr-x   13 greimer  staff    416 Jun 20 13:22 puppeteer

...so something must be installing it.

Besides filling up disk space, the puppeteer install results in a network call to storage.googleapis.com which attempts to download a puppeteer binary, which causes an error in my CI since that particular server is isolated from the public internet. That's how I first noticed the issue.

Diagnosis

I'm confused why this is happening actually, but I'm pretty sure it's something to do with this script in package.json, since that's where my CI is throwing the error:

npm ERR! code 1
npm ERR! path /my/project/node_modules/aws-crt
npm ERR! command failed
npm ERR! command sh -c npm install npm-force-resolutions && npx npm-force-resolutions && npm install npm-force-resolutions && npx npm-force-resolutions
npm ERR! npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! npm WARN deprecated [email protected]: Version no longer supported. Upgrade to @latest
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /my/project/node_modules/aws-crt/node_modules/puppeteer
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node install.js
npm ERR! npm ERR! ERROR: Failed to set up Chromium r756035! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm ERR! npm ERR! Error: getaddrinfo ENOTFOUND storage.googleapis.com
[as oncomplete] npm ERR! npm ERR!     at GetAddrInfoReqWrap.onlookup  (node:dns:71:26)
npm ERR! npm ERR!   -- ASYNC --
npm ERR! npm ERR!     at BrowserFetcher.<anonymous> (/my/project/node_modules/aws-crt/node_modules/puppeteer/lib/helper.js:94:19)
npm ERR! npm ERR!     at fetchBinary (/my/project/node_modules/aws-crt/node_modules/puppeteer/install.js:148:8)
npm ERR! npm ERR!     at download (/my/project/node_modules/aws-crt/node_modules/puppeteer/install.js:54:9) {
npm ERR! npm ERR!   errno: -3008,
npm ERR! npm ERR!   code: 'ENOTFOUND',
npm ERR! npm ERR!   syscall: 'getaddrinfo',
npm ERR! npm ERR!   hostname: 'storage.googleapis.com'
npm ERR! npm ERR! }

Vulnerability on dependency websocket-stream

Hello,

aws-crt got a dependency with websocket-stream package not updated for last 2 years now and it appear that project owner do not contribute anymore.
As this package is not maintained and got dependency with ws who got a vulnerability.
I suggest to find alternative dependency maybe more safe.

Issue for that is already opened in source projet but nobody can update the package: max-mapper/websocket-stream#162

Vulnerability of ws version used in websocket-stream: https://app.snyk.io/vuln/SNYK-JS-WS-1296835

Thanks in advance,
Rgds
Valentin

Compilation fails on Raspbian for tag v1.1.5

uname -a
Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux

Cloned the repo with --recursive

node version v12.18.1

Run npm install

Compilation fails with errors, to be able to compile had to do following changes:

diff --git a/source/module.c b/source/module.c
index 2c8601f..dcc23ed 100644
--- a/source/module.c
+++ b/source/module.c
@@ -265,9 +265,6 @@ const char *aws_napi_status_to_str(napi_status status) {
         case napi_closing:
             reason = "napi_closing";
             break;
-        case napi_bigint_expected:
-            reason = "napi_bigint_expected";
-            break;
 #endif
     }
     return reason;
@@ -532,7 +529,7 @@ static bool s_create_and_register_function(
     return true;
 }

-/* napi_value */ NAPI_MODULE_INIT() /* (napi_env env, napi_value exports) */ {
+ napi_value  NAPI_MODULE_INIT(napi_env env, napi_value exports)  {
     s_install_crash_handler();

     struct aws_allocator *allocator = aws_napi_get_allocator();
@@ -617,3 +614,5 @@ static bool s_create_and_register_function(

     return exports;
 }
+
+NAPI_MODULE(aws_crt_nodejs, NAPI_MODULE_INIT)

Browser: Cannot read property 'messageId' of

Hello,

I tried to integrate the library as a replacement for the older aws-iot-sdk. Unfortunately, I am unable to publish messages in a browser. There is an internal callback called, but it looks like the arguments are not passed. The callback then fails when trying to access the packet (argument). Please see the screenshot of the corresponding debugging session.

spot1 Callback about the be called. Notice that the object with messageId is actually there but the callback is empty.

spot2
The actual code of the callback that tries to access messageId and fails.

Thank you for investigating.

Allow to specify location of native bindings

Hello,

I'm trying to package my application but there seems to be a hard assumption on the native bindings being located 2 directories up in a bin folder. A bit annoying to make packaged applications.

Would it be possible to allow specifying the native bindings by configuration or environment variable?

Property 'newStatic' does not exist on type 'typeof AwsCredentialsProvider'.

I am using aws-iot-device-sdk-js-v2, following the example:
https://github.com/coderbyheart/aws-iot-device-sdk-js-browser-esm/blob/cdefd5912f5e3c78fd0fe99cec7b512a4215b287/index.js
to create an MQTT client that connects to AWS IoT Hub.

Per the documentation I've found:
https://aws.github.io/aws-iot-device-sdk-js-v2/node/classes/http.AwsCredentialsProvider.html
AwsCredentialsProvider has 2 methods, newDefault(), and newStatic(). However, only newDefault() is defined, newStatic() doesn't exist.

I have aws-crt installed at version 1.14.1, and my code is using the implementation of AwsCredentialsProvider as defined at node_modules\aws-crt\dist\native\auth.d.ts

electron error Error: node_modules/aws-crt/dist/bin/darwin-x64/aws-crt-nodejs

Hi,

I am trying to use aws-iot-device-sdk-v2 in an electron app.

When I run electron-forge start I get this error:

App threw an error during load
Error: Cannot find module '/Users/jake/Code/mir-kiosk-electron/electron-kiosk/node_modules/aws-crt/dist/bin/darwin-x64/aws-crt-nodejs'
    at webpackEmptyContext (/Users/jake/Code/mir-kiosk-electron/electron-kiosk/.webpack/main/index.js:111944:10)
    at Object.<anonymous> (/Users/jake/Code/mir-kiosk-electron/electron-kiosk/.webpack/main/index.js:112436:91)
    at Object../node_modules/aws-crt/dist/native/binding.js (/Users/jake/Code/mir-kiosk-electron/electron-kiosk/.webpack/main/index.js:112445:30)

After some googling I fixed this by adding this to webpack.main.config.js

It will be good I don't have to use this. I think the problem is binding.js uses __dirname

  node: {
    __dirname: true, // I
  },
  target: "node", // in order to ignore built-in modules like path, fs, etc.
  externals: [nodeExternals()], 

The problem is I get a missing module error if I run the packaged app. I guess node_module is not packaged.

Uncaught Exception:
Error: Cannot find module 'macaddress'

Do you have any idea as to how to fix it?

https://github.com/zhex900/mir-kiosk-electron/tree/master/electron-kiosk

npm install for aws-crt-nodejs fails with CMake Error

Describe the bug

npm install for aws-crt-nodejs fails with CMake Error

Not searching for unused variables given on the command line.
-- The C compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Using submodule dependencies
CMake Error at CMakeLists.txt:38 (include):
  include could not find requested file:

    AwsFindPackage


CMake Error at CMakeLists.txt:44 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-common

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:55 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-sdkutils

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:56 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-io

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:57 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-cal

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:58 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-compression

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:59 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-http

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:60 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-auth

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:61 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-mqtt

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:62 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-checksums

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:76 (include):
  include could not find requested file:

    AwsCFlags


CMake Error at CMakeLists.txt:77 (include):
  include could not find requested file:

    AwsSharedLibSetup


CMake Error at CMakeLists.txt:78 (include):
  include could not find requested file:

    AwsSanitizers


CMake Error at CMakeLists.txt:85 (aws_set_common_properties):
  Unknown CMake command "aws_set_common_properties".


-- Configuring incomplete, errors occurred!
See also "/Users/trivikr/workspace/aws-crt-nodejs/build/darwin-x64/CMakeFiles/CMakeOutput.log".
See also "/Users/trivikr/workspace/aws-crt-nodejs/build/darwin-x64/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: Process terminated: 1
    at ChildProcess.<anonymous> (/Users/trivikr/workspace/aws-crt-nodejs/node_modules/cmake-js/lib/processHelpers.js:34:32)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! code 1
npm ERR! path /Users/trivikr/workspace/aws-crt-nodejs
npm ERR! command failed
npm ERR! command sh -c node ./scripts/install.js --production

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/trivikr/.npm/_logs/2022-07-12T21_59_13_087Z-debug-0.log

Steps to reproduce

git clone aws-crt-nodejs, and run npm install

Observed behavior

npm install fails.

Expected behavior

Either npm install is successful, or instructions are added in https://github.com/awslabs/aws-crt-nodejs/blob/main/CONTRIBUTING.md

Additional context

MqttClientConnection.connect() core dumps with exit code 134

The call to connect() is core dumping. Changing the config options doesn't matter, changing node versions doesn't matter. Happens on recent Ubuntu and very old Suse. Can anyone help troubleshoot this?

N-API call failed: napi_acquire_threadsafe_function(ctx->log_drain)
    @ /codebuild/output/src388857601/src/aws-crt-nodejs/source/logger.c:91: napi_closingAborted (core dumped)
$ echo $?
134

index.ts:

import { iotshadow, mqtt, io, iot } from 'aws-iot-device-sdk-v2';

const config_builder = iot.AwsIotMqttConnectionConfigBuilder.new_mtls_builder_from_path(cert_path, key_path);
config_builder.with_certificate_authority_from_path(undefined, ca_path);
config_builder.with_clean_session(false);
config_builder.with_client_id('test');
config_builder.with_endpoint(endpoint);

const config = config_builder.build();
const client = new mqtt.MqttClient(new io.ClientBootstrap());
const connection = client.new_connection(config);
await connection.connect();

package.json:

"devDependencies": {
    "@types/node": "^14.14.31",
    "nodemon": "^2.0.7",
    "prettier": "^2.2.1",
    "rimraf": "^3.0.2",
    "ts-node": "^9.1.1",
    "typescript": "^4.2.2"
  },
  "dependencies": {
    "aws-crt": "^1.5.2",
    "aws-iot-device-sdk-v2": "^1.4.1",
    "axios": "^0.21.1"
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.