My build process started failing some time ago and I cannot pin point where the error is originating. Somehow Electron Builder tries to parse some JSON and fails doing so. On other platforms (local environment, Flathub) the build runs through smoothly.
Is there anyone around who could take a quick look at the report and maybe point me towards a solution?
It looks like this problem comes from npm or peggy (I can’t tell which right now) dropping Launchpad’s proxy settings. Launchpad sets the http_proxy, https_proxy, HTTP_PROXY, and HTTPS_PROXY environment variables when performing a remote build, and build tools are expected to respect them. An upstream feature request or bug report would have to be opened with the responsible tool.
(my two cents makes me guess it’s probably peggy’s fault, since npm was able to successfully download peggy)
But as far as I read the log, Peggy runs through successfully and then the process continues with vite building the app. I don’t really spot any indication, that Peggy cases this tbh.
@ogra Hey Oliver, you’ve been helping out with sleek quite a bit in the past and I was wondering if you could take a look at the launchpad log. Unfortunately sleek’s build is now 2 releases behind in Snapcraft store, since I am unable to build it any longer
:: > npx peggy --format es --dts --output ./src/main/Filters/FilterLang.ts ./src/main/Filters/FilterLang.pegjs
::
:: vite v7.1.4 building SSR bundle for production...
:: transforming...
:: ✓ 1248 modules transformed.
:: rendering chunks...
:: out/main/index.js 1,509.98 kB
:: ✓ built in 6.55s
:: vite v7.1.4 building SSR bundle for production...
:: transforming...
:: ✓ 1 modules transformed.
:: rendering chunks...
:: out/preload/index.mjs 1.11 kB
:: ✓ built in 25ms
:: vite v7.1.4 building for production...
:: transforming...
:: ✓ 1382 modules transformed.
:: rendering chunks...
:: ../../out/renderer/index.html 0.44 kB
:: ../../out/renderer/assets/index-ha3tsHeN.css 27.51 kB
:: ../../out/renderer/assets/index--q8HEarD.js 2,569.15 kB
:: ✓ built in 7.99s
:: • electron-builder version=26.0.12 os=6.8.0-71-generic
:: • loaded configuration file=/build/sleek/parts/sleek/build/electron-builder.yml
:: • executing @electron/rebuild electronVersion=38.0.0 arch=arm64 buildFromSource=false appDir=./
:: • installing native dependencies arch=arm64
:: • completed installing native dependencies
:: • packaging platform=linux arch=arm64 electron=38.0.0 appOutDir=dist/linux-arm64-unpacked
:: • downloading url=https://github.com/electron/electron/releases/download/v38.0.0/electron-v38.0.0-linux-arm64.zip size=115 MB parts=8
:: • downloaded url=https://github.com/electron/electron/releases/download/v38.0.0/electron-v38.0.0-linux-arm64.zip duration=15.074s
[14/Sep/2025:09:11:23 +0000] "CONNECT release-assets.githubusercontent.com:443 HTTP/1.1" 200 14385517 "-" "Go-http-client/1.1"
[14/Sep/2025:09:11:23 +0000] "CONNECT release-assets.githubusercontent.com:443 HTTP/1.1" 200 14386406 "-" "Go-http-client/1.1"
[14/Sep/2025:09:11:23 +0000] "CONNECT release-assets.githubusercontent.com:443 HTTP/1.1" 200 14386234 "-" "Go-http-client/1.1"
[14/Sep/2025:09:11:23 +0000] "CONNECT release-assets.githubusercontent.com:443 HTTP/1.1" 200 14386206 "-" "Go-http-client/1.1"
[14/Sep/2025:09:11:23 +0000] "CONNECT release-assets.githubusercontent.com:443 HTTP/1.1" 200 14386601 "-" "Go-http-client/1.1"
[14/Sep/2025:09:11:23 +0000] "CONNECT release-assets.githubusercontent.com:443 HTTP/1.1" 200 14385963 "-" "Go-http-client/1.1"
[14/Sep/2025:09:11:23 +0000] "CONNECT release-assets.githubusercontent.com:443 HTTP/1.1" 200 14386163 "-" "Go-http-client/1.1"
[14/Sep/2025:09:11:23 +0000] "CONNECT release-assets.githubusercontent.com:443 HTTP/1.1" 200 14386157 "-" "Go-http-client/1.1"
[14/Sep/2025:09:11:23 +0000] "CONNECT github.com:443 HTTP/1.1" 200 8703 "-" "Go-http-client/1.1"
:: ⨯ Unexpected end of JSON input failedTask=build stackTrace=SyntaxError: Unexpected end of JSON input
:: at JSON.parse (<anonymous>)
:: at NpmNodeModulesCollector.parseDependenciesTree (/build/sleek/parts/sleek/build/node_modules/app-builder-lib/src/node-module-collector/npmNodeModulesCollector.ts:68:17)
:: at NpmNodeModulesCollector.getDependenciesTree (/build/sleek/parts/sleek/build/node_modules/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts:48:17)
:: at processTicksAndRejections (node:internal/process/task_queues:105:5)
:: at NpmNodeModulesCollector.getNodeModules (/build/sleek/parts/sleek/build/node_modules/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts:16:21)
:: at computeNodeModuleFileSets (/build/sleek/parts/sleek/build/node_modules/app-builder-lib/src/util/appFileCopier.ts:181:16)
:: at /build/sleek/parts/sleek/build/node_modules/app-builder-lib/src/platformPackager.ts:500:34
:: at async Promise.all (index 0)
:: at AsyncTaskManager.awaitTasks (/build/sleek/parts/sleek/build/node_modules/builder-util/src/asyncTaskManager.ts:65:25)
:: at LinuxPackager.doPack (/build/sleek/parts/sleek/build/node_modules/app-builder-lib/src/platformPackager.ts:317:5)
'override-build' in part 'sleek' failed with code 1.
The invocation of npx peggy --format es --dts --output ./src/main/Filters/FilterLang.ts ./src/main/Filters/FilterLang.pegjs is still running when the process fails.
Honestly I have no idea what’s up here. All other platforms build the app, locally everzthing is peachy and I really cannot spot the issue. It’s also quite frustrating, because sleek is desperately outdated on Snap because of this.