pdf.worker.min.js is 404
It's unclear when the issue arose, but PDF rendering is broken (tested on Gitlab-ce version 17.5 and 17.5.1). The call to the asset /assets/webpack/pdfjs/pdf.worker.min.js
results in a 404, but the asset can be found under a different path on the system:
root@git:~# find /opt/gitlab/ -name "*pdf.worker.min.js"
/opt/gitlab/embedded/service/gitlab-rails/public/assets/webpack/pdfjs/3.11.174/legacy/build/pdf.worker.min.js
Update
Fix is deployed to gitlab.com and ready for release in upcoming patch releases for 17.5 and 17.4, stay tuned.
In the meantime, this workaround has been identified:
Hey, for anyone looking here for workaround until 17.5.2 gets released (i guess in 2 weeks?), this addition to
/etc/gitlab/gitlab.rb
works on Omnibus v17.5.1:nginx['custom_gitlab_server_config'] = "\nlocation =/assets/webpack/pdfjs/pdf.worker.min.js { alias /opt/gitlab/embedded/service/gitlab-rails/public/assets/webpack/pdfjs/3.11.174/legacy/build/pdf.worker.min.js; }\n"
Edited by André Luís