intellij-pdf-viewer icon indicating copy to clipboard operation
intellij-pdf-viewer copied to clipboard

Cannot load PDF when there is a # in the project directory name

Open jml96 opened this issue 4 years ago • 18 comments
trafficstars

Hi, I installed your plugin in Pycharm (2021.1.2 RC) but all pdf documents open as a blank document. My iOS is MacOS Big Sur 11.3.1. Thank you.

jml96 avatar May 25 '21 15:05 jml96

Works fine for me with 0.11.1 in PyCharm 2021.1.1 on Linux, so maybe a Mac problem? @cl445

PHPirates avatar May 25 '21 18:05 PHPirates

The description is a bit unspecific. @jml96 Did you got an empty PDF or is it just displayed empty inside Pycharm? Are you able to open your PDF with an external viewer? Could you provide an example?

cl445 avatar May 26 '21 10:05 cl445

Hi Claas, It is displayed blank inside Pycharm. Example attached. Thank you.

example

jml96 avatar May 26 '21 10:05 jml96

Is it also empty in a viewer outside of Pycharm?

cl445 avatar May 26 '21 11:05 cl445

I tried with different pdf files. They open normally in finder

jml96 avatar May 26 '21 12:05 jml96

I am sorry, I cannot reproduce the error. At my setup, the PDF files are loading without any problems. This does not mean that there is no bug, but we need more information.

cl445 avatar May 26 '21 12:05 cl445

Which information do you need from me to further investigate the issue? Thank you.

jml96 avatar May 26 '21 13:05 jml96

At the moment you are the only one with the bug, i.e. it is not yet clear whether the bug could also be outside of Pycharm. For documentation, it would be helpful to know versions of Mac OS, Pycharm and the plugin. And if you don't have any more ideas yourself, then unfortunately the only thing to do is to wait.

cl445 avatar May 26 '21 14:05 cl445

I've tested the current plugin version (0.11.1) with both IDEA and PyCharm 2021.1.2-RC and it works fine.

Which information do you need from me to further investigate the issue? Thank you.

Have you edited your pdfs with Preview app (i. e. deleting pages)? Can you provide any document that could be used to reproduce the issue? Please, also attach full IDE version infomation in this format:

PyCharm 2021.1.2 RC (Professional Edition)
Build #PY-211.7442.13, built on May 20, 2021
Licensed to JetBrains Team

Runtime version: 11.0.11+9-b1341.57 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Registry: ide.balloon.shadow.size=0
Non-Bundled Plugins: com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer (0.11.1)

FirstTimeInForever avatar May 26 '21 17:05 FirstTimeInForever

I get the same problem with any pdf. I send below a template pdf. sample.pdf

PyCharm 2021.1.2 RC (Professional Edition) Build #PY-211.7442.13, built on May 20, 2021 Runtime version: 11.0.11+9-b1341.57 x86_64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. macOS 11.3.1 GC: ParNew, ConcurrentMarkSweep Memory: 4933M Cores: 8 Non-Bundled Plugins: com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer (0.11.1), R4Intellij (211.6693.5)

Thanks.

jml96 avatar May 26 '21 18:05 jml96

@jml96 Can you try an alpha build mentioned here? It has different implementation of web-view, so it might help.

FirstTimeInForever avatar May 26 '21 19:05 FirstTimeInForever

I tried it and I got a fatal error. I also sent a report to author.

com.intellij.diagnostic.PluginException: [Plugin: com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer] at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.instantiate(ActionManagerImpl.java:250) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:220) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getActionImpl(ActionManagerImpl.java:551) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.preloadActions(ActionManagerImpl.java:1601) at com.intellij.openapi.actionSystem.impl.ActionPreloader.preload(ActionPreloader.java:14) at com.intellij.openapi.application.Preloader.lambda$preload$0(Preloader.java:84) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165) at com.intellij.openapi.application.Preloader.lambda$preload$1(Preloader.java:74) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27) at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.instantiate(ActionManagerImpl.java:240) ... 23 more Caused by: java.lang.NoClassDefFoundError: com/firsttimeinforever/intellij/pdf/viewer/model/HistoryNavigationDirection at com.firsttimeinforever.intellij.pdf.viewer.actions.navigation.PdfNavigateByHistoryAction$Forward.(PdfNavigateByHistoryAction.kt:14) ... 28 more Caused by: java.lang.ClassNotFoundException: com.firsttimeinforever.intellij.pdf.viewer.model.HistoryNavigationDirection PluginClassLoader(plugin=PluginDescriptor(name=PDF Viewer, id=com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/PyCharm2021.1/plugins/plugin-0.12.0-alpha.1.jar, version=0.12.0-alpha.1, package=null), packagePrefix=null, instanceId=5, state=active) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:215) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 29 more

jml96 avatar May 26 '21 19:05 jml96

I'm also having a problem with blank documents, using 0.12.0-alpha.4 on Windows, IJ 2021.2 EAP, on any pdf. Interestingly, it's only blank in right split, I can see the document when I open it in left split. Pretty interesting, but I don't have the time to debug it now. image

PHPirates avatar Jun 09 '21 07:06 PHPirates

I tried different splitting option in iOS and I see a blank file in all of them

jml96 avatar Jun 09 '21 12:06 jml96

Hi, In the new alpha version 0.12.0-alpha.4. instead of a blank document like in the previous versions now I get the following message when I try to open a pdf in pycharm.

Screenshot 2021-09-07 at 16 01 13

In more information it says "PDF.js v2.6.347 (build: 3be9c65f) Message: Missing PDF + PATH TO FILE"

Does it help you to try to fix the issue?

Thank you.

jml96 avatar Sep 07 '21 15:09 jml96

I had the same problem. No PDF was displayed in my PyCharm built-in viewer. The problem I had was probably because my project folder started with a "#", so ".../path/to/project/#thesis/document.pdf".

Cele3x avatar Nov 13 '22 12:11 Cele3x

Same error as https://github.com/FirstTimeInForever/intellij-pdf-viewer/issues/29#issuecomment-914388144 here, on version 0.14.0. The folder has an &.

StevenRoodhorst avatar Nov 14 '22 09:11 StevenRoodhorst

I can confirm this is still an issue (e.g. project directory starting with a # or an = in the file name)

PHPirates avatar May 03 '23 17:05 PHPirates

Please check the artifacts plugin https://github.com/FirstTimeInForever/intellij-pdf-viewer/pull/112/checks

I have checked with name pdftest - _ . ! ~ * ' ( ) ; ? : @ & = + $ , # [ ] ✨.pdf on macOS.

liudongmiao avatar Sep 11 '24 02:09 liudongmiao