question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

l10n.js - locale.properties 404 (Not Found)

See original GitHub issue

Attach (recommended) or Link to PDF file here:

Configuration:

  • Web browser and its version: All main browsers (Edge, Chrome, Opera, Firefox)
  • Operating system and its version: Windows 7 Pro
  • PDF.js version: pdfjs-1.9.426-dist
  • Is a browser extension: ?

Steps to reproduce the problem:

  1. I have the pdf.js called in an IFrame that’s calling the following code:

<script> $(document).ready(function () { $('#fileList li').click(function (e) { var fileName = $(this).html(); var url = '~/Scripts/pdfjs-dist/Web/viewer.html?file=' + fileName $('#iframePdfViewer').attr('src', url); }); }); </script>

  1. When the pdf gets loaded, note that everything is working as expected but I would like to get rid of these errors/warning if possible but I’ll deal with this one first as the rest of my issues are warnings rather than an error. This is the error I’m getting:

/MyApp/Scripts/pdfjs-dist/web/locale/locale.properties Failed to load resource: the server responded with a status of 404 (Not Found)

The attached snapshot provides additional information:

capture

Note that my locale.properties is definitely available.

What is the expected behavior? (add screenshot)

No error generated.

Any ideas?

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

29reactions
tfierenscommented, Apr 17, 2018

@timvandermeij

I found the solution. Not only does it remove the error mentioned above (i.e. 404 - locale.properties not found), it also removes the 200+ warnings I had.

All I had to do was to add a new MIME type in IIS 7:

File name Extension: .properties MIME Type: application/octet-stream

That’s it.

2reactions
timvandermeijcommented, Apr 9, 2018

Did you run gulp locale? Either the file is not in the specified path or XHR cannot access it due to rights issues. This is an issue of the custom deployment and not something we can help with without access to a minimal example that shows the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not find "locale.properties" file from PDF.js - Stack Overflow
Adding .properties MIME type configuration inside web.config file should work: ... Reference: l10n.js - locale.properties 404 (Not Found).
Read more >
How to display pdf using pdf.js mozila - MSDN
Failed to load resource : the server responded with a status of 404 (Not Found) l10n.js:351 http://localhost:49943/pdfjs/web/locale/locale.
Read more >
Specific extension files are not found(404) - OutSystems
Hi. I'm trying to use "PDF.js" without forge, cz it isn't match my environment that i can't update by myself. then, I faced...
Read more >
742099 - Localize pdf.js strings and replace with the final ...
We used temporary strings when landing pdf.js and they can't currently be localised. We should make sure to come up with finalized strings...
Read more >
sgpatil-ngx-extended-pdf-viewer - npm
Check this page for live demos and source code examples! ... The default files pdf.js , pdf-worker.js , and viewer.js use a modern...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found