New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't close PDF preview #4968

Closed
oparoz opened this Issue May 19, 2017 · 11 comments

Comments

Projects
None yet
@oparoz
Member

oparoz commented May 19, 2017

Steps to reproduce

  1. Search for PDF
  2. Click on PDF
  3. If PDF did not open, click on it in the list
  4. Click on close button

Server configuration

Nextcloud version: 12rc1

Logs

Uncaught ReferenceError: webpackJsonp is not defined
    at 0.editor.js:1
(anonymous) @ 0.editor.js:1
Error: Loading chunk 0 failed.
    at HTMLScriptElement.n (editor.js?v=f77ee4e…-45:1)

@oparoz oparoz added the bug label May 19, 2017

@nickvergessen

This comment has been minimized.

Show comment
Hide comment
@nickvergessen

nickvergessen May 19, 2017

Member

Problem by the pdfviewer:

Warning: Deprecated API usage: PDFJS.openExternalLinksInNewWindow, please use "PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK" instead.  pdf.js:368:5
#Close is undefined.  l10n.js:829:7
#Close is undefined.  l10n.js:901:7
#close_label is undefined.  l10n.js:829:7
#close_label is undefined.  l10n.js:901:7
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf self blockiert ("script-src 'nonce-UlZ6cjh2dGY4eUhmbHdFQ2s5dXc4R09XVTRkaUVsZEw2cm1zWlYzQ1c0QT06SHhLZXNZc1VoeE9KMlhoSC9KakN2QTNzQk1FMUtoc2ZwOENIVjJ1QkUrdz0='"). Source: call to eval() or related function blocked by CSP. (unbekannt)
PDF 588ee6e86a6f2bc3dd2844e4e88ca442 [1.5 IT Department Eurowings / pdfTeX-1.10b, LaTeX with hyperref] (PDF.js: 1.4.20)  viewer.js:6879:7   

cc @LukasReschke since its content security stuff

Member

nickvergessen commented May 19, 2017

Problem by the pdfviewer:

Warning: Deprecated API usage: PDFJS.openExternalLinksInNewWindow, please use "PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK" instead.  pdf.js:368:5
#Close is undefined.  l10n.js:829:7
#Close is undefined.  l10n.js:901:7
#close_label is undefined.  l10n.js:829:7
#close_label is undefined.  l10n.js:901:7
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf self blockiert ("script-src 'nonce-UlZ6cjh2dGY4eUhmbHdFQ2s5dXc4R09XVTRkaUVsZEw2cm1zWlYzQ1c0QT06SHhLZXNZc1VoeE9KMlhoSC9KakN2QTNzQk1FMUtoc2ZwOENIVjJ1QkUrdz0='"). Source: call to eval() or related function blocked by CSP. (unbekannt)
PDF 588ee6e86a6f2bc3dd2844e4e88ca442 [1.5 IT Department Eurowings / pdfTeX-1.10b, LaTeX with hyperref] (PDF.js: 1.4.20)  viewer.js:6879:7   

cc @LukasReschke since its content security stuff

@MorrisJobke MorrisJobke added this to the Nextcloud 12.0 milestone May 19, 2017

@JSoko

This comment has been minimized.

Show comment
Hide comment
@JSoko

JSoko May 21, 2017

Member

Problem persists in 12RC4...

Member

JSoko commented May 21, 2017

Problem persists in 12RC4...

@q269015385

This comment has been minimized.

Show comment
Hide comment
@q269015385

q269015385 Jun 1, 2017

nc v12.0.0 finish init, and login first,open nextcloud.mp4,can't close it.i use chrome

q269015385 commented Jun 1, 2017

nc v12.0.0 finish init, and login first,open nextcloud.mp4,can't close it.i use chrome

@9662

This comment has been minimized.

Show comment
Hide comment
@9662

9662 Jul 17, 2017

Bugger, I run NC12.0.0 on a staging server for two weeks and did not notice this one. Move to production and … 😢 😢

Oh, well. That's life. 😜

9662 commented Jul 17, 2017

Bugger, I run NC12.0.0 on a staging server for two weeks and did not notice this one. Move to production and … 😢 😢

Oh, well. That's life. 😜

@TheMrApostel

This comment has been minimized.

Show comment
Hide comment
@TheMrApostel

TheMrApostel Jul 27, 2017

@9662
That's why i always wait for the next update befor upgrading my production :)
When this bug is fixed i will update from 11.03 to 12.02

TheMrApostel commented Jul 27, 2017

@9662
That's why i always wait for the next update befor upgrading my production :)
When this bug is fixed i will update from 11.03 to 12.02

@umgfoin

This comment has been minimized.

Show comment
Hide comment
@umgfoin

umgfoin Jul 27, 2017

fixed in current 12.0.1 RCx

umgfoin commented Jul 27, 2017

fixed in current 12.0.1 RCx

@oparoz

This comment has been minimized.

Show comment
Hide comment
@oparoz

oparoz Sep 28, 2017

Member

Still not fixed when following the steps detailed in the OP.

Member

oparoz commented Sep 28, 2017

Still not fixed when following the steps detailed in the OP.

@oparoz oparoz reopened this Sep 28, 2017

@j-ed

This comment has been minimized.

Show comment
Hide comment
@j-ed

j-ed Sep 29, 2017

Contributor

This might be of interest for the root cause analysis (tested with NC 12.0.3 and FF 55.0.3):

Opening and closing a pdf file is working, if

  1. your current folder contains a pdf file.
  2. you initiate a search for pdf files.
  3. you select a pdf files which exists in the current directory.
  4. If you click on such a pdf file it is opened instantly and also closed on request.

Opening and closing a pdf file doesn't work, if

  1. you initiate a search for pdf files.
  2. you select a pdf files which exists in an other directory than the current one.
  3. If you click on such a pdf file the opening routine navigates to the directory in which the pdf files was found - that's it. The pdf file isn't opened automatically.
  4. You have to click on the desired pdf file again to get it displayed on the screen. If you then want to close the file again, it doesn't work.
Contributor

j-ed commented Sep 29, 2017

This might be of interest for the root cause analysis (tested with NC 12.0.3 and FF 55.0.3):

Opening and closing a pdf file is working, if

  1. your current folder contains a pdf file.
  2. you initiate a search for pdf files.
  3. you select a pdf files which exists in the current directory.
  4. If you click on such a pdf file it is opened instantly and also closed on request.

Opening and closing a pdf file doesn't work, if

  1. you initiate a search for pdf files.
  2. you select a pdf files which exists in an other directory than the current one.
  3. If you click on such a pdf file the opening routine navigates to the directory in which the pdf files was found - that's it. The pdf file isn't opened automatically.
  4. You have to click on the desired pdf file again to get it displayed on the screen. If you then want to close the file again, it doesn't work.
@oparoz

This comment has been minimized.

Show comment
Hide comment
@oparoz

oparoz Sep 29, 2017

Member

Awesome job @j-ed

Member

oparoz commented Sep 29, 2017

Awesome job @j-ed

@juliushaertl

This comment has been minimized.

Show comment
Hide comment
@juliushaertl

juliushaertl Jan 16, 2018

Member

A possible fix for this issue is in nextcloud/files_pdfviewer#49

Member

juliushaertl commented Jan 16, 2018

A possible fix for this issue is in nextcloud/files_pdfviewer#49

@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

MorrisJobke Jan 18, 2018

Member

Fixed and will be available in 12.0.5 and 13.

Member

MorrisJobke commented Jan 18, 2018

Fixed and will be available in 12.0.5 and 13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment