Minting site crashing
smwein opened this issue · 4 comments
When I try to access the minting site spun up by yarn dev I get this error.
<--- Last few GCs --->
[1402:0x5192bc0] 27608 ms: Mark-sweep (reduce) 485.8 (495.3) -> 485.8 (496.3) MB, 677.6 / 0.0 ms (average mu = 0.078, current mu = 0.003) allocation failure scavenge might not succeed
[1402:0x5192bc0] 28281 ms: Mark-sweep (reduce) 486.8 (493.3) -> 486.8 (495.3) MB, 671.0 / 0.0 ms (average mu = 0.041, current mu = 0.004) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa25510 node::Abort() [/usr/bin/node]
2: 0x9664d3 node::FatalError(char const*, char const*) [/usr/bin/node]
3: 0xb9a8be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
4: 0xb9ac37 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
5: 0xd56ca5 [/usr/bin/node]
6: 0xd5782f [/usr/bin/node]
7: 0xd6566b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node]
8: 0xd6922c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/bin/node]
9: 0xd2e9fd v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/usr/bin/node]
10: 0xd28884 v8::internal::FactoryBasev8::internal::Factory::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [/usr/bin/node]
11: 0xd29323 v8::internal::FactoryBasev8::internal::Factory::NewByteArray(int, v8::internal::AllocationType) [/usr/bin/node]
12: 0xc84b6d v8::internal::Handlev8::internal::ByteArray v8::internal::SourcePositionTableBuilder::ToSourcePositionTablev8::internal::Isolate(v8::internal::Isolate*) [/usr/bin/node]
13: 0x1a310e8 v8::internal::compiler::CodeGenerator::FinalizeCode() [/usr/bin/node]
14: 0x1ac2a5b v8::internal::compiler::PipelineImpl::FinalizeCode(bool) [/usr/bin/node]
15: 0x1ac3b27 v8::internal::compiler::PipelineCompilationJob::FinalizeJobImpl(v8::internal::Isolate*) [/usr/bin/node]
16: 0xc64a20 v8::internal::OptimizedCompilationJob::FinalizeJob(v8::internal::Isolate*) [/usr/bin/node]
17: 0xc654b5 [/usr/bin/node]
18: 0xc66f9d v8::internal::Compiler::CompileOptimized(v8::internal::Handlev8::internal::JSFunction, v8::internal::ConcurrencyMode) [/usr/bin/node]
19: 0x106696e v8::internal::Runtime_CompileOptimized_NotConcurrent(int, unsigned long*, v8::internal::Isolate*) [/usr/bin/node]
20: 0x1426919 [/usr/bin/node]
Aborted
This is a memory error on your computer, not related to this project, I think. Can you try on another computer, please?
Got the site to start but now I get the following error on the web page.
Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'digest')
Source
src/utils/candy-machine.ts (166:20) @ _callee4$
164 | });
165 |
166 | const idl = await anchor.Program.fetchIdl(
| ^
167 | CANDY_MACHINE_PROGRAM,
168 | provider
169 | );
Call Stack
getCandyMachineState
src/utils/candy-machine.ts (157:33)
_callee2$
src/hooks/use-candy-machine.ts (83:12)
eval
src/hooks/use-candy-machine.ts (73:4)
probably your CANDY_MACHINE_PROGRAM is not defined (I mean, the variable that creates it).
@smwein I can assist here!
You're likely not connecting to localhost, but another machine, yes? If so and you're connecting over unsecured HTTP, you're likely running into this issue: cannot read property digest of undefined
Basically, you're being bitten by your browser, as "Access to the WebCrypto API is restricted to secure origins", which is to say https:// pages, and localhost. Either install a certificate and use HTTPS, or there's another solution linked in the above issue.
Bizzare error with a completely unhelpful message -- good times!
(@kevinfaveri ^^ probably needs addressed or documented - i'll write up an issue and dig in)