Skip to content

Broken pdf opening on master #624

@juliusknorr

Description

@juliusknorr

Steps to reproduce

  1. Open a PDF file on master 1421fe5

Expected behaviour

File should open

Actual behaviour

File is not opening

Console errors

Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”).
ConsoleLogger.js:33
Uncaught ReferenceError: OC is not defined
    t LoggerBuilder.js:35
    i index.js:19
    <anonymous> logger.js:25
    <anonymous> workersrc.js:97
    <anonymous> workersrc.js:97
LoggerBuilder.js:35:17
Loading Worker from “http://nextcloud.dev.local/index.php/apps/dashboard/” was blocked because of a disallowed MIME type (“text/html”).
[files_pdfviewer](http://nextcloud.dev.local/index.php/apps/files_pdfviewer/?file=http%3A%2F%2Fnextcloud.dev.local%2Fremote.php%2Fdav%2Ffiles%2Fadmin%2FNextcloud_Server_Administration_Manual.pdf&canDownload=1)
Warning: Setting up fake worker. util.js:400:12
Content Security Policy: The page’s settings blocked the loading of a resource at http://nextcloud.dev.local/index.php/apps/build/pdf.worker.js (“script-src”). display_utils.js:462:48
Uncaught (in promise) Error: Setting up fake worker failed: "Cannot load script at: http://nextcloud.dev.local/index.php/apps/build/pdf.worker.js".
    _setupFakeWorker api.js:2233
api.js:2233:10

@skjnldsv @danxuliu I bisected this to be caused by 58d2a50 (the latest pdf.js bump), but noticed that there were newer PRs merged as well, so I was wondering if this may be specific to my setup/browser. Do you also see that error on latest master?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions