ashthespy / Atom-LaTeX

The only LaTeX package you need for typesetting with Atom.
https://atom.io/packages/atom-latex
MIT License
22 stars 9 forks source link

Cannot read property 'send' of undefined #270

Closed stefaniecg closed 3 years ago

stefaniecg commented 3 years ago

[Enter steps to reproduce:]

  1. Open what ever latex file
  2. From the menu choose: Packages > Atom-Latex > Build Latex
  3. the error pops: Uncaught TypeError: line.match is not a function: /Users/USER/.atom/packages/atom-latex/lib/parser.coffee:44

Atom: 1.45.0 x64 Electron: 4.2.7 OS: Mac OS X 10.13.6 Thrown From: atom-latex package 0.9.1

Stack Trace

Uncaught TypeError: Cannot read property 'send' of undefined

At /Users/stefaniecg/.atom/packages/atom-latex/lib/viewer.coffee:26

TypeError: Cannot read property 'send' of undefined
    at Viewer.module.exports.Viewer.wsHandler (/packages/atom-latex/lib/viewer.coffee:26:20)
    at /packages/atom-latex/lib/server.coffee:25:47)
    at WebSocket.emit (events.js:182:13)
    at Receiver.receiverOnMessage (/packages/atom-latex/node_modules/ws/lib/websocket.js:825:20)
    at Receiver.emit (events.js:182:13)
    at Receiver.dataMessage (/packages/atom-latex/node_modules/ws/lib/receiver.js:437:14)
    at Receiver.getData (/packages/atom-latex/node_modules/ws/lib/receiver.js:367:17)
    at Receiver.startLoop (/packages/atom-latex/node_modules/ws/lib/receiver.js:143:22)
    at Receiver._write (/packages/atom-latex/node_modules/ws/lib/receiver.js:78:10)
    at doWrite (_stream_writable.js:410:12)
    at writeOrBuffer (_stream_writable.js:394:5)
    at Receiver.Writable.write (_stream_writable.js:294:11)
    at Socket.socketOnData (/packages/atom-latex/node_modules/ws/lib/websocket.js:900:35)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

Commands

     -1:09.9.0 atom-latex:clean (input.hidden-input)
     -1:01.8.0 tree-view:remove (span.name.icon.icon-file-zip)
     -0:46.5.0 atom-latex:preview-tab (div.tool-panel.tree-view)
  2x -0:37.7.0 tabs:split-right (div.title)
     -0:15.3.0 tabs:split-left (div.title)

Non-Core Packages

atom-folding 0.0.9 
atom-latex 0.9.1 
busy-signal 2.0.1 
highlight-selected 0.17.0 
Hydrogen 2.14.7 
intentions 1.1.5 
language-latex 1.2.0 
latex 0.50.2 
latex-folding 1.5.0 
linter 3.3.0 
linter-spell 0.15.0 
linter-spell-latex 0.11.0 
linter-ui-default 3.0.2 
markdown-folding 0.3.1 
markdown-pdf 2.3.3 
markdown-preview-plus 3.11.5 
markdown-writer 2.11.11 
pdfjs-viewer 1.0.0 
platformio-ide-terminal 2.10.1 
quick-highlight 0.13.0 
readonly-utils 0.1.0 
script 3.29.3 
thesaurus 0.3.0 
view-mode 0.1.2 
ashthespy commented 3 years ago

I am quite confused - your stack trace corresponds to the one from #245, but your description in steps to reproduce have a different error. Could you confirm what the actual issue is?

stefaniecg commented 3 years ago

Hi, @ashthespy, So the error that i described pops up when compiling a simple latex file, see screenshot. Just by pressing: Packages > Atom-Latex > Build Latex Let me know if you need further information.

Screen Shot 2021-03-08 at 20 02 22

ashthespy commented 3 years ago

Could you share the full stack trace? I'll try and have a look tomorrow.

stefaniecg commented 3 years ago

the stack trace and another screenshot showing the stack trace:

Stack Trace

TypeError: line.match is not a function at Parser.module.exports.Parser.trimLatexmk (/Users/stefaniecg/.atom/packages/atom-latex/lib/parser.coffee:44:21) at Parser.module.exports.Parser.parse (/Users/stefaniecg/.atom/packages/atom-latex/lib/parser.coffee:27:14) at Builder.module.exports.Builder.postBuild (/Users/stefaniecg/.atom/packages/atom-latex/lib/builder.coffee:112:19) at Builder.module.exports.Builder.buildProcess (/Users/stefaniecg/.atom/packages/atom-latex/lib/builder.coffee:45:8) at ChildProcess. (/Users/stefaniecg/.atom/packages/atom-latex/lib/builder.coffee:77:10) at ChildProcess.emit (events.js:200:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

Screen Shot 2021-03-08 at 20 07 55

ashthespy commented 3 years ago

In the meantime, please have a look at #78 it is the same error and there are some debugging ideas there.

ashthespy commented 3 years ago

@stefaniecg please look at the debugging hints from #78, we can continue this discussion there as it seems to be the same thing..