vscode-latex-preview icon indicating copy to clipboard operation
vscode-latex-preview copied to clipboard

Can't open preview

Open Bebotron opened this issue 8 years ago • 19 comments
trafficstars

When I try to preview a file I get the error: Unable to open 'Preview "filename.tex"': Cannot read property 'map' of undefined.

Windows 10 v.1.15.1

Bebotron avatar Aug 20 '17 09:08 Bebotron

Are you using latexmk? If so, do you have Perl installed?

ajshort avatar Aug 20 '17 11:08 ajshort

No I’m using pdflatex

From: Andrew Short Sent: Sunday, August 20, 2017 6:27 AM To: ajshort/vscode-latex-preview Cc: Bebotron; Author Subject: Re: [ajshort/vscode-latex-preview] Can't open preview (#17)

Are you using latexmk? If so, do you have Perl installed? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Bebotron avatar Aug 20 '17 21:08 Bebotron

I have the same issue. OSX 10.12.6 . Latex preview 0.5.1, latex workshop 3.5.3. I haven't changed any of the default settings. The same issue happens if I switch "latex-preview.command" to latexmk (and I do have perl installed).

btracey avatar Sep 19 '17 20:09 btracey

I realized that clicking the "view PDF file in new tab" does work (and updates properly on save), it's just the "Open Preview" button that gives the error.

btracey avatar Sep 19 '17 20:09 btracey

I've got the same problem. Unable to open 'Preview "filename.tex"': Cannot read property 'map' of undefined. Using the default settings, with perl, Tex Live, Latex Workshop installed. Win10.

LLJJDD avatar Sep 20 '17 19:09 LLJJDD

Same problem on Mac OS 10.13.1.

joshuagruenstein avatar Nov 13 '17 22:11 joshuagruenstein

same problem macos 10.13.2, visual studio code, latex workshop and latex preview

LucasAmos avatar Dec 21 '17 01:12 LucasAmos

Same problems on macos 10.13.2

Jue-Xu avatar Dec 25 '17 06:12 Jue-Xu

Same problem on mac os 10.12.6

xindiguo avatar Jan 12 '18 22:01 xindiguo

Windows 10, Pearl, TeX Live and LaTeX workshop installed - Same Problem. Also the "View LaTeX PDF File in new tab" Does not work for me. Apart from the "Cannot read property 'map' of undefined" error when clicking "Open Preview"

Edit: The same happens for both on Void Linux with TeX Live.

Nexolight avatar Jan 23 '18 16:01 Nexolight

Same problem on mac os 10.11.6

gurkang avatar Jan 29 '18 18:01 gurkang

Any update?

johndebord avatar Mar 12 '18 00:03 johndebord

Unfortunately I'm unable to replicate this issue. If someone has a basic example project they can zip up and attach to the issue it would be appreciated.

Or if someone can run the extension under the vscode extension debugger and capture a stack trace that would be even better. All you need to do is clone the extension repository, open the folder in vscode and run the project using F5.

ajshort avatar Mar 12 '18 00:03 ajshort

@ajshort I just tried running it using the extension debugger, but it returns another error (in German):

C:\Program Files\Microsoft VS Code\Code.exe --debugBrkPluginHost=47755 --debugId=1da735a0-a508-4f76-a037-d4efca185c26 --extensionDevelopmentPath=C:\Users\const\git\vscode-latex-preview 
Fehler beim Aktivieren der Erweiterung "ajshort.latex-preview": Cannot find module 'C:\Users\const\git\vscode-latex-preview\out\src\extension'.
extensionHostProcess.js:673
Activating extension `ajshort.latex-preview` failed:  Cannot find module 'C:\Users\const\git\vscode-latex-preview\out\src\extension'
extensionHostProcess.js:418
Here is the error stack:  Error: Cannot find module 'C:\Users\const\git\vscode-latex-preview\out\src\extension'
extensionHostProcess.js:418
	at Function.Module._resolveFilename (module.js:470:15)
	at Function.Module._load (module.js:418:25)
	at Function.J.Z.t.getExtensionPathIndex.then.o._load (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:653:398)

BUT somehow it works when using it while I have the folder opened when I try to open the preview.
Since I don't know anything about VS code - I actually just looked for a Hi-DPI alternative to running gummi inside WSL using an X-server šŸ˜… - I don't know how to provide more information on this topic, sorry šŸ˜• (This is on Windows, obviously)

C1710 avatar Apr 15 '18 20:04 C1710

can confirm @C1710 , this issue only appears when you open the file directly, it wont once you open the folder (File -> Open Folder), select the tex file - everything works. if you open the file directly without the folder it will throw the mentioned error

eisenwinter avatar Apr 17 '18 09:04 eisenwinter

Can confirmed @eisenwinter at vscode 1.21.0, using open folder and the issue didn't come up again.

mlouielu avatar Apr 17 '18 10:04 mlouielu

@eisenwinter , you're right. Opening the complete folder instead of just the .tex file solved the problem. I guess that's because it uses others files that are created with the .tex file.

reisdev avatar Apr 24 '18 23:04 reisdev

ERROR: command 'vscode.previewHtml' not found.

Now, vscode.previewHtml has been removed? You also can see https://github.com/Microsoft/vscode-cosmosdb/issues/1070 .

qingdujun avatar Apr 12 '19 14:04 qingdujun

More to the point vscode.previewHtml was replaced by the webview api: https://github.com/Microsoft/vscode/issues/62630. All the sudden, latex preview has stopped working because I think it finally disappeared in the current update to vscode?

jmussman avatar Apr 16 '19 17:04 jmussman