Closed matthiaschung closed 6 years ago
Any information on how to reproduce this error?
Sorry, for not providing more information. It is reproducible. Every time I compile a latex document (via atom-latex using command-s) will lead to this error.
Since I can't debug - could I request you to?
console.log(msg)
right before the data = JSON.parse msg
line in viewer.coffee
let me know what msg looks like?
I got to 4. in your description. I am running Atom on Mac and the short cut for debug console does not work. How do I start it? Thanks so much for looking into this
View
-> Developer
-> Toggle Developer Tools
Is this what you are looking for? Thanks!
No deserializer found for http://127.0.0.1:57248/viewer.html?file=preview.pdf
deserialize @ <embedded>:21133
<embedded>:121025 IntersectionObserver.observe(target): target element is not a descendant of root.
TreeView @ <embedded>:121025
latextools.coffee [sm]:304 requiring if needed: snippet-manager
snippet-manager.coffee [sm]:10 Created SnippetManager
snippet-manager.coffee [sm]:13 Set snippet service
snippet-manager.coffee [sm]:14 Object
index.html:1 WebSocket connection to 'wss://ws-mt1.pusher.com/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.2&flash=false' failed: WebSocket is closed before the connection is established.
/Users/mcchung/.atom/packages/teletype/lib/teletype-package.js:42 teletype: Using pusher key: f119821248b7429bece3
/Users/mcchung/.atom/packages/teletype/lib/teletype-package.js:43 teletype: Using base URL: https://api.teletype.atom.io
<embedded>:1037 EACCES: permission denied, symlink '/Applications/Atom.app/Contents/Resources/app/atom.sh' -> '/usr/local/bin/atom'
(anonymous) @ <embedded>:1037
<embedded>:1042 EACCES: permission denied, symlink '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm' -> '/usr/local/bin/apm'
(anonymous) @ <embedded>:1042
viewer.coffee [sm]:128 The provided value 'moz-chunked-arraybuffer' is not a valid enum value of type XMLHttpRequestResponseType.
viewer.coffee [sm]:18 {"type":"open","path":"preview.pdf"}
viewer.coffee [sm]:18 {"type":"loaded"}
viewer.coffee [sm]:128 PDF 7e8a4a715c47881fc3ae1b1300ec601d [1.5 pdfTeX-1.40.18 / LaTeX with Beamer class] (PDF.js: 1.9.426 [WebGL])
2viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa9841000]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa891e600]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa896ae00]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa90f0200]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
2viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa90c6800]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa80d1e00]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa90e2400]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa992dc00]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
viewer.coffee [sm]:128 [.Offscreen-For-WebGL-0x7fefa818e800]GL ERROR :GL_INVALID_OPERATION : glUniform4fv: wrong uniform function for type
Interesting - would you be able to share the (minimal) source files that leads to this error?
Also, can you try setting in the file viewer/viewer.js
"enableWebGL": true,
to "enableWebGL": false,
and refresh atom and check if you still have this issue?
Weird, while trying to set up a minimal example with reproducible error, I now cannot reproduce the error at all.
On Feb 12, 2018, at 9:36 AM, Ash notifications@github.com wrote:
Interesting - would you be able to share the (minimal) source files that leads to this error?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James-Yu/Atom-LaTeX/issues/139#issuecomment-364940731, or mute the thread https://github.com/notifications/unsubscribe-auth/ARFV0j-I-EJbRue9-86I8D_QmpE7ilanks5tUEx-gaJpZM4SA4mz.
This is with WebGL
enabled or disabled?
How do I find that out? I essentially didn’t make any “conscious” changes. Thanks for the help.
On Feb 13, 2018, at 4:41 AM, Ash notifications@github.com wrote:
This is with WebGL enabled or disabled?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James-Yu/Atom-LaTeX/issues/139#issuecomment-365208191, or mute the thread https://github.com/notifications/unsubscribe-auth/ARFV0tBt8vJYAuWUf22GUbj_w2DYeGBAks5tUVjSgaJpZM4SA4mz.
Then it's enabled - you can counter check by looking at the developer console - you should see a line like PDF 7e8a4a715c47881fc3ae1b1300ec601d [1.5 pdfTeX-1.40.18 / LaTeX with Beamer class] (PDF.js: 1.9.426 [WebGL])
I could imagine that the document you were compiling had some figures that WebGL had issues rendering - leading to this error. But we can't confirm this without a MWE :-(
PDF 9c79d33407a45216c8831d52182e14de [1.5 pdfTeX-1.40.18 / LaTeX with Beamer class] (PDF.js: 1.9.426 [WebGL])
Interesting… I am not aware that I changed any involved figure. I will post if I see this error occurring again. Thanks a lot…
On Feb 13, 2018, at 4:46 AM, Ash notifications@github.com wrote:
Then it's enabled - you can counter check by looking at the developer console - you should see a line like PDF 7e8a4a715c47881fc3ae1b1300ec601d [1.5 pdfTeX-1.40.18 / LaTeX with Beamer class] (PDF.js: 1.9.426 [WebGL])
I could imagine that the document you were compiling had some figures that WebGL had issues rendering - leading to this error. But we can't confirm this without a MWE :-(
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James-Yu/Atom-LaTeX/issues/139#issuecomment-365209587, or mute the thread https://github.com/notifications/unsubscribe-auth/ARFV0sar9-b8K_ShfWYsClyui8J5lM--ks5tUVoAgaJpZM4SA4mz.
Okay, now I can reproduce the error! Just the simple document below will produce the error.: \documentclass[12pt]{article} \begin{document} Test \end{document} However, it starts with synchronizing back from the pdf (in the atom-pdf viewer) to the latex file. It first throws back the error below followed by the described error. After that each every tex document will create above's error. I hope that helps to pinpoint the error.
[Enter steps to reproduce:]
Atom: 1.23.3 x64 Electron: 1.6.15 OS: Mac OS X 10.13.2 Thrown From: atom-latex package 0.8.4
Uncaught SyntaxError: Unexpected token in JSON at position 0
At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html:1
SyntaxError: Unexpected token in JSON at position 0
at JSON.parse (<anonymous>)
at Viewer.module.exports.Viewer.wsHandler (/packages/atom-latex/lib/viewer.coffee:19:17)
at /packages/atom-latex/lib/server.coffee:23:47)
at emitOne (events.js:96:13)
at WebSocket.emit (events.js:188:7)
at Receiver._receiver.onmessage (/packages/atom-latex/node_modules/ws/lib/WebSocket.js:141:47)
at Receiver.dataMessage (/packages/atom-latex/node_modules/ws/lib/Receiver.js:389:14)
at Receiver.getData (/packages/atom-latex/node_modules/ws/lib/Receiver.js:330:12)
at Receiver.startLoop (/packages/atom-latex/node_modules/ws/lib/Receiver.js:165:16)
at Receiver.add (/packages/atom-latex/node_modules/ws/lib/Receiver.js:139:10)
at Socket._ultron.on (/packages/atom-latex/node_modules/ws/lib/WebSocket.js:138:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:551:20)
2x -4:09.0 core:save (input.hidden-input)
9x -2:13 core:backspace (input.hidden-input)
-1:57 editor:select-to-first-character-of-line (input.hidden-input)
2x -1:56.6.0 core:backspace (input.hidden-input)
-1:55.7.0 core:save (input.hidden-input)
-1:46.2.0 editor:move-to-first-character-of-line (input.hidden-input)
2x -1:45.8.0 core:backspace (input.hidden-input)
-1:44.5.0 core:move-down (input.hidden-input)
-1:44.1.0 editor:move-to-first-character-of-line (input.hidden-input)
-1:43.8.0 core:backspace (input.hidden-input)
5x -1:42 core:move-left (input.hidden-input)
-1:40.3.0 core:move-up (input.hidden-input)
-1:35.8.0 core:copy (input.hidden-input)
atom-clock 0.1.16
atom-html-preview 0.2.5
atom-latex 0.8.4
auto-detect-indentation 1.3.0
autocomplete-bibtex 1.2.0
busy-signal 1.4.3
city-lights-syntax 1.1.6
city-lights-ui 1.3.1
custom-folds 1.9.5
file-icons 2.1.16
fizzy 0.21.0
fizzy-syntax-theme 0.9.0
flatwhite-syntax 0.8.1
fonts 3.0.3
highlight-selected 0.13.1
indent-detective 0.2.0
ink 0.8.2
intentions 1.1.5
julia-client 0.6.8
language-julia 0.15.0
language-latex 1.1.1
latex 0.49.0
latex-completions 0.3.3
latextools 0.8.5
linter 2.2.0
linter-ui-default 1.6.10
minimap 4.29.7
minimap-highlight-selected 4.6.1
monokai-slate 0.6.0
pdf-view 0.65.0
script 3.17.3
split-diff 1.5.2
teletype 0.7.0
tool-bar 1.1.6
uber-juno 0.1.2
wordcount 2.10.4
What exactly do you mean by 'However, it starts with synchronizing back from the pdf (in the atom-pdf viewer) to the latex file.'?
Also, can you post whats on the debug console when this happens? (you should still have the console.log msg
line right? :-)
The console log message, which I receive when I try to sync from the pdf to the latex document (by this I mean double click on the pdf document to find the corresponding text position in the latex document. I think this uses \usepackage(pdfsync}) is below. After this happens, any time compiling will lead to the described error. Thanks.
Uncaught TypeError: Cannot read property 'file' of undefined
at Manager.module.exports.Manager.findMainSelfMagic (/Users/mcchung/.atom/packages/atom-latex/lib/manager.coffee:111:5)
at Manager.module.exports.Manager.findMainSequence (/Users/mcchung/.atom/packages/atom-latex/lib/manager.coffee:88:21)
at Manager.module.exports.Manager.findMain (/Users/mcchung/.atom/packages/atom-latex/lib/manager.coffee:54:15)
at Manager.module.exports.Manager.findPDF (/Users/mcchung/.atom/packages/atom-latex/lib/manager.coffee:145:10)
at Locator.module.exports.Locator.locate (/Users/mcchung/.atom/packages/atom-latex/lib/locator.coffee:54:31)
at Viewer.module.exports.Viewer.wsHandler (/Users/mcchung/.atom/packages/atom-latex/lib/viewer.coffee:48:37)
at WebSocket.
Hmm, any reason you don't use SyncTeX? AFAIK, pdfsync
is an obsolete package.
I use synctex and abandoned pdfsync, however, the error persists.
@matthiaschung Lets try and fix this once in for all ;-)
I. Repeat steps from previous comment if not already there:
1a. Open your Atom-LaTeX code ( Settings -> Packages -> Atom LaTeX -> Settings -> View Code)
2a. Add console.log(msg)
right before the data = JSON.parse msg
line in viewer.coffee
3a. Restart Atom (ctrlshiftf5)
4a. Open the debug console (ctrlshifti)
II. Copy paste from the debug console the message you see! (not the stack trace as in the comments above)
III. Try running the synctex
command from the console to rule out errors from there.
`
III. Provide me a small MWE if possible that causes this message?
Okay, I followed the instruction to the best of my knowledge.
Below the log I see. I ran pdflatex with synctex from the terminal and that works fine. Atom does generate the pdf file but throws back the error.
This is what I see after starting:
Hmm, the 'can't find file' errors can be negated for now by launching the 'Build Latex' while activating the editor - i.e placing your cursor in the editor. (The proper fix is scheduled for the next update)
I am still missing the msg
i.e actual JSON that is being attempted to parse and is failing from the debug console, can you try building the document with the cursor in the the document? and then report back? :-)
Thanks. Here is the JSON error:
Uncaught SyntaxError: Unexpected token � in JSON at position 0
at JSON.parse (
On Feb 19, 2018, at 5:01 PM, Ash notifications@github.com wrote:
Hmm, the can't file find of errors can be negated for now by launching the 'Build Latex' while activating the editor - i.e placing your cursor in the editor. (The proper fix is scheduled for the next update)
I am still missing the msg i.e actual JSON that is being attempted to parse and is failing from the debug console, can you try building the document with the cursor in the the document? and then report back? :-)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/James-Yu/Atom-LaTeX/issues/139#issuecomment-366812910, or mute the thread https://github.com/notifications/unsubscribe-auth/ARFV0s9-RjKp8mCmOM4ujmFuHxYYG0Smks5tWe8-gaJpZM4SA4mz.
Hi, what you have posted is the stack trace again, it would be nice to get the actual string that isn't being able to be parsed. This will be available from the debug console (https://github.com/James-Yu/Atom-LaTeX/issues/139#issuecomment-366791568) Please copy paste the output from the debug console after you get the error - unfortunately, the stack trace dones't really help in this case.
Hi Ash, I followed the instruction from above. Maybe I misunderstand a step but this is what I see after starting atom (two more error messages below):
Ah, maybe I wasn't clear enough :-) I am also having a bit of trouble understanding how you "If I double click to sync". As far as I know, the command is ctrl/cmd+click in the PDF preview to get from PDF --> TeX
For the first error (Uncaught TypeError: Cannot read property 'file' of undefined
) that you get, like I said, the fix will land in the next update, until then, please ensure that your text editor is active i.e click on the tab with the <filename.tex>
to activate it before using the menu to build.
Now for the main issue of Uncaught SyntaxError: Unexpected token LJ in JSON at position 0
<filename.tex>
editor tab console.log(msg)
that you added to viewer.coffee
before the actual error.
For example - mine looks something like thisGood luck! :-)
Closing given the silence, feel free to comment if you are still having issues!
[Enter steps to reproduce:]
Atom: 1.23.3 x64 Electron: 1.6.15 OS: Mac OS X 10.13.2 Thrown From: atom-latex package 0.8.4
Stack Trace
Uncaught SyntaxError: Unexpected token S in JSON at position 0
Commands
Non-Core Packages