Some recent CI builds have failed with the following error:
> Task :spring-boot-project:spring-boot-docs:antora
throw er; // Unhandled 'error' event
^
Error: unexpected end of file
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at Zlib.zlibOnError [as onerror] (node:zlib:191:17)
Emitted 'error' event on Cloneable instance at:
at emitErrorNT (/home/runner/work/spring-boot/spring-boot/spring-boot-project/spring-boot-docs/build/.gradle/nodeproject/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/destroy.js:78:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -5,
code: 'Z_BUF_ERROR'
}
Node.js v20.17.0
> Task :spring-boot-project:spring-boot-docs:antora FAILED
> Task :spring-boot-project:spring-boot-tools:spring-boot-antlib:checkArchitectureMain
> Task :spring-boot-project:spring-boot-testcontainers:dockerTest
> Task :spring-boot-project:spring-boot-actuator-autoconfigure:antora
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
FAILURE: Build failed with an exception.
Unfortunately there's not a lot to go on in the error message. We probably need to increase logging or find a way to get a better stacktrace. This search will find failures via Devlocity.
Comment From: philwebb
The error is similar to https://github.com/spring-io/antora-zip-contents-collector-extension/issues/7. If it is coming from our collector I would expect a better message. It could be failing with the UI zip download.
Comment From: foreverfl
I encountered the same problem while building the Spring Security documentation translated into Korean.
Initially, the relevant section of my code in antora-playbook.yml looked like this:
ui:
bundle:
url: ../ui-bundle.zip
snapshot: true
I customized the UI bundle and placed this zip file in the same Git repository.
On my localhost, this configuration built without any errors.
However, when attempting to build the same project on Vercel, I ran into the same issue.
To resolve this, I switched the path from../ui-bundle.zip to a direct download link on Cloudflare R2 (e.g., https://~~).
I think there is a path issue 'cause a path can be recongnized differently in windows and linux.
I believe this issue is related to how paths are interpreted differently on Windows and Linux. Though I'm not entirely sure of the exact reason, this workaround seems to be effective.
Comment From: wilkinsona
Thanks for the info, @foreverfl. Unfortunately, I think we're facing a different problem as ours only occurs intermittently. As such, I don't think it's due to Windows and Linux handling paths differently. If it was, I'd expect to see it consistently on CI where we build the documentation of both Windows and Linux.
Comment From: philwebb
We've not seen this for a while. I'll leave the patch in place and close this for now.