bitfocus / companion-pi

Bitfocus Companion enables the reasonably priced Elgato Streamdeck to be a professional shotbox surface for an increasing amount of different presentation switchers, video playback software and broadcast equipment.
http://bitfocus.io/companion
MIT License
28 stars 8 forks source link

update.sh fails on 32bit os #2

Closed Julusian closed 1 year ago

Julusian commented 2 years ago

https://github.com/bitfocus/companion-pi/blob/bdde1083b019b867334c56097a05c830dfabe7c7/update.sh#L38

Changing 8192 to 3192 fixes it. Perhaps we can do detection for 32bit vs 64bit and pass a value accordingly?

root@CompanionPi:/usr/local/src/companionpi# ./update.sh
Fetching origin
Already up to date.
Using Node v14.19.0

> yarn@1.22.18 preinstall /opt/fnm/node-versions/v14.19.0/installation/lib/node_                          modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)

/opt/fnm/node-versions/v14.19.0/installation/bin/yarn -> /opt/fnm/node-versions/                          v14.19.0/installation/lib/node_modules/yarn/bin/yarn.js
/opt/fnm/node-versions/v14.19.0/installation/bin/yarnpkg -> /opt/fnm/node-versio                          ns/v14.19.0/installation/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.22.18
updated 1 package in 1.655s
swapon: /swapfile-upgrade: swapon failed: Device or resource busy
yarn config v1.22.18
success Set "network-timeout" to "100000".
Done in 0.80s.

<--- Last few GCs --->

[2565:0x3a3ad38]      311 ms: Mark-sweep 1.2 (3.7) -> 1.2 (3.7) MB, 3.8 / 0.0 ms                            (average mu = 0.875, current mu = 0.010) allocation failure scavenge might not                           succeed
[2565:0x3a3ad38]      316 ms: Mark-sweep (reduce) 1.2 (3.7) -> 1.2 (3.7) MB, 4.3                           / 0.0 ms  (average mu = 0.789, current mu = 0.010) last resort GC in old space                           requested
[2565:0x3a3ad38]      324 ms: Mark-sweep (reduce) 1.2 (2.7) -> 1.1 (3.7) MB, 8.1                           / 0.0 ms  (average mu = 0.574, current mu = 0.005) last resort GC in old space                           requested

<--- JS stacktrace --->

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memo                          ry
./update.sh: line 39:  2565 Aborted                 yarn update
root@CompanionPi:/usr/local/src/companionpi#
Julusian commented 1 year ago

As this is not an issue when updating to or between versions of v3, I dont think its worth spending any time on this