ProvableHQ / sdk

A Software Development Kit (SDK) for Zero-Knowledge Transactions
https://provable.tools
GNU General Public License v3.0
592 stars 471 forks source link

[Bug] `npm create aleo-app@latest` JavaScript heap out of memory `max_old_space_size=4096` #838

Closed liolikus closed 10 months ago

liolikus commented 10 months ago
npm create aleo-app@latest

<--- Last few GCs --->

[1820:000001F0F44CA5F0]   242628 ms: Mark-sweep 4051.9 (4141.1) -> 4041.1 (4143.1) MB, 3406.3 / 0.0 ms  (average mu = 0.145, current mu = 0.025) task; scavenge might not succeed
[1820:000001F0F44CA5F0]   247063 ms: Mark-sweep 4054.6 (4143.1) -> 4043.4 (4145.6) MB, 4346.8 / 0.0 ms  (average mu = 0.078, current mu = 0.020) task; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF644932BCF node_api_throw_syntax_error+175519
 2: 00007FF6448B83A6 SSL_get_quiet_shutdown+64006
 3: 00007FF6448B9762 SSL_get_quiet_shutdown+69058
 4: 00007FF64535FDD4 v8::Isolate::ReportExternalAllocationLimitReached+116
 5: 00007FF64534B132 v8::Isolate::Exit+674
 6: 00007FF6451CCF8C v8::internal::EmbedderStackStateScope::ExplicitScopeForTesting+124
 7: 00007FF6451CA1AB v8::internal::Heap::CollectGarbage+3963
 8: 00007FF645170DC5 v8::internal::IndexGenerator::~IndexGenerator+22565
 9: 00007FF64484B913 ENGINE_get_load_privkey_function+4835
10: 00007FF64484A2B6 v8::CTypeInfoBuilder<void>::Build+21718
11: 00007FF64498E66B uv_update_time+491
12: 00007FF64498E1B2 uv_run+1266
13: 00007FF644960895 node::SpinEventLoop+325
14: 00007FF64486EE18 ENGINE_get_load_privkey_function+149480
15: 00007FF6448F4491 node::InitializeOncePerProcess+2897
16: 00007FF6448F5C95 node::Start+821
17: 00007FF6446F7E8C AES_cbc_encrypt+124092
18: 00007FF645955958 inflateValidate+18712
19: 00007FF8122A7344 BaseThreadInitThunk+20
20: 00007FF812F226B1 RtlUserThreadStart+33

win10, 8gb node v18.15.0

onetrickwolf commented 10 months ago

@liolikus I remember this was happening before but then stopped: https://github.com/AleoHQ/sdk/issues/729

I don't think we've changed anything that would impact this, does the last version work for you still though if you run npm create aleo-app@0.0.11?

I'll keep looking into this but not really sure what could be causing it...

liolikus commented 10 months ago

@onetrickwolf Hard to say, but now I can't install any of the versions (I tried all versions since npm created aleo-app@0.0.7). But it worked fine a few months ago when this doc was added (https://github.com/AleoHQ/welcome/blob/master/documentation/sdk/create-aleo-app/00_app_installation.md)

So, it seems the issue is on my side.