pdf.js makes a request to object%Object

Related to #248100 (closed)

  1. Open Inspector -> Network in your browser.
  2. Load an LFS file in the repository view, such as https://gitlab.com/LER0ever/pdf-preview-issue/-/blob/master/PDF-LFS.pdf

image

This is showing up about 5,000 times a day (https://log.gprd.gitlab.net/goto/946df860-3eae-11ed-b0ec-930003e0679c):

image

The browser stack trace shows:

image

This is also generating a console warning:

image

What's odd is that the pdfjsWorker does appear to be loading:

image

It does seem related to https://gitlab.com/gitlab-org/gitlab/-/blob/9ab8998098f9a6b4eea215d233ca001ba844ca38/app/assets/javascripts/pdf/index.vue#L33 because if I comment out:

    pdfjsLib.GlobalWorkerOptions.workerSrc = workerSrc;

I see it tries to load a different file. Maybe something like https://stackoverflow.com/a/73467669 would help.

Edited by Stan Hu