vladimiry / ElectronMail

Unofficial ProtonMail Desktop App
GNU General Public License v3.0
1.48k stars 96 forks source link

Build error, occurs on tag v5.2.2 only #665

Closed CodeCracker-oss closed 6 months ago

CodeCracker-oss commented 6 months ago

Hello,

I am receiving this Javascript heap out of memory error during build, it does not occur when building v5.2.1. I have tried diagnosing it myself, but haaven't been able to address it.

I was originally using node v16 lts, tried with 18 lts as well. All with updated npm, pnpm, and yarn modules. I am not using a CI environment, building locally.

Error:

<--- Last few GCs ---> [85605:0x65cfc70] 98985 ms: Mark-sweep 1950.7 (2075.4) -> 1939.0 (2070.6) MB, 449.8 / 0.0 ms (average mu = 0.322, current mu = 0.364) allocation failure; GC in old space requested [85605:0x65cfc70] 99503 ms: Mark-sweep 1939.0 (2070.6) -> 1939.0 (2066.6) MB, 518.0 / 0.0 ms (average mu = 0.190, current mu = 0.000) allocation failure; GC in old space requested <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0xb95b60 node::Abort() [webpack] 2: 0xa9a7f8 [webpack] 3: 0xd6f2f0 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [webpack] 4: 0xd6f697 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [webpack] 5: 0xf4cba5 [webpack] 6: 0xf4daa8 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [webpack] 7: 0xf5dfb3 [webpack] 8: 0xf5ee28 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [webpack] 9: 0xf61414 v8::internal::Heap::CollectAllAvailableGarbage(v8::internal::GarbageCollectionReason) [webpack] 10: 0xf3abad v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [webpack] 11: 0xf1b0a0 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [webpack] 12: 0xf1266c v8::internal::FactoryBase::AllocateRawArray(int, v8::internal::AllocationType) [webpack] 13: 0xf127e5 v8::internal::FactoryBase::NewFixedArrayWithFiller(v8::internal::Handle, int, v8::internal::Handle, v8::internal::AllocationType) [webpack] 14: 0x11cd90e v8::internal::MaybeHandle v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Allocate(v8::internal::Isolate, int, v8::internal::AllocationType) [webpack] 15: 0x11cd9c3 v8::internal::MaybeHandle v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Rehash(v8::internal::Isolate, v8::internal::Handle, int) [webpack] 16: 0x12d7d0d v8::internal::Runtime_MapGrow(int, unsigned long, v8::internal::Isolate) [webpack] 17: 0x170deb9 [webpack]

}  ELIFECYCLE  Command failed with exit code 1.  ELIFECYCLE  Command failed with exit code 1. ERROR: "assets:webclient" exited with 1.  ELIFECYCLE  Command failed with exit code 1. ERROR: "assets" exited with 1.  ELIFECYCLE  Command failed with exit code 1.

vladimiry commented 6 months ago

It happened to me with building the WebClients at GitHub CI environment. I disabled resources compression, and some other things in their Webpack build config, and it works so far at GitHub CI.

ERROR: "assets:webclient" exited with 1.

Your case is the same as the assets:webclient script builds WebClients projects. So, if needed, the issue should be placed in https://github.com/ProtonMail/WebClients/issues.