Skip to content
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

JSDoc-Preview hangs on "Loading JSDoc..." #1

Closed
prayaggandhi1080 opened this issue Sep 16, 2016 · 9 comments
Closed

JSDoc-Preview hangs on "Loading JSDoc..." #1

prayaggandhi1080 opened this issue Sep 16, 2016 · 9 comments
Assignees
Labels

Comments

@prayaggandhi1080
Copy link

prayaggandhi1080 commented Sep 16, 2016

  1. Open JavaScript file with JSDoc notation comments in Atom
  2. Click Packages->JSDoc Preview-> Toggle Prview
  3. Get a Preview screen on right side of Atom editor with white background and message "Loading JSDoc.."

image

@benderTheCrime
Copy link
Owner

Hey there,

I'll try to reproduce later today, thanks.

@benderTheCrime
Copy link
Owner

@prayaggandhi1080, I've done a quick repro on my machine and it looks like all is working well. This may be an environment issue. It looks like your using a windows machine. Can you please provide me with the version of windows you're using, a sample of the JSDocs you are trying to generate, and (if any) any errors thrown in the atom console? To see the atom console, go to View -> Developer -> Toggle Developer Tools in your atom menus.

@benderTheCrime benderTheCrime self-assigned this Sep 23, 2016
@benderTheCrime
Copy link
Owner

benderTheCrime commented Sep 24, 2016

This appears to be caused by the rather rudimentary way I've been storing generated JSDoc files. Linux/OSX machines do not seem to care when I write to the root folder of the package, but windows does. I will have to sort out a better way of storing those temp files across the board.

virtualbox_msedge - win10_preview_24_09_2016_14_15_13

https://github.com/benderTheCrime/jsdoc-preview/blob/develop/lib/renderer.coffee#L11

@benderTheCrime
Copy link
Owner

#2

@benderTheCrime
Copy link
Owner

A new version of the package has been published: https://atom.io/packages/jsdoc-preview. Let me know if this resolution satisfies this issue.

@prayaggandhi1080
Copy link
Author

@benderTheCrime thanks for fixing this quickly. Sorry wasn't able to reply to your initial comments as I was out of country. I appreciate your timely attention to the issue. I confirmed that it is fixed. Only thing is that I wasn't able to do to straight upgrade. I had to uninstall the previous version and reinstall it again.

@brettz9
Copy link

brettz9 commented Jun 29, 2018

I'm getting this message now... (First time install) :-(

@brettz9
Copy link

brettz9 commented Jun 29, 2018

I'm on the Mac--here's the console error I get...

renderer.coffee? [sm]:35 Uncaught (in promise) TypeError: Cannot read property 'querySelectorAll' of null
    at Object.toDOMFragment (renderer.coffee? [sm]:17)
    at _Class.module.exports._Class.renderJSDocText (view.coffee? [sm]:62)
    at view.coffee? [sm]:46
    at <anonymous>
toDOMFragment @ renderer.coffee? [sm]:35
module.exports._Class.renderJSDocText @ view.coffee? [sm]:118
(anonymous) @ view.coffee? [sm]:107
Promise resolved (async)
module.exports._Class.renderJSDoc @ view.coffee? [sm]:107
(anonymous) @ view.coffee? [sm]:53
module.exports._Class.resolveEditor @ view.coffee? [sm]:58
module.exports._Class.attached @ view.coffee? [sm]:22
View.element.attached @ /Users/brett/.atom/packages/atom-webbrowser/node_modules/space-pen/lib/space-pen.js:164
CustomElementPrototype.attachedCallback @ /Users/brett/.atom/packages/atom-webbrowser/node_modules/space-pen/lib/space-pen.js:51
activeItemChanged @ /Applications/Atom.app/Contents/Resources/app.asar/src/pane-element.js:152
module.exports.Emitter.simpleDispatch @ commitCommentContainer_item.graphql.js:112
module.exports.Emitter.emit @ commitCommentContainer_item.graphql.js:112
setActiveItem @ commitCommentContainer_item.graphql.js:112
addItem @ commitCommentContainer_item.graphql.js:112
activateItem @ commitCommentContainer_item.graphql.js:112
open @ commitCommentContainer_item.graphql.js:112
async function (async)
open @ commitCommentContainer_item.graphql.js:112
addPreviewForEditor @ index.coffee? [sm]:72
toggle @ index.coffee? [sm]:52
atom.commands.add.jsdoc-preview:toggle @ index.coffee? [sm]:17
handleCommandEvent @ commitCommentContainer_item.graphql.js:112
dispatch @ commitCommentContainer_item.graphql.js:112
dispatchApplicationMenuCommand @ commitCommentContainer_item.graphql.js:112
outerCallback @ commitCommentContainer_item.graphql.js:112
emitThree @ events.js:136
emit @ events.js:217

Actually, this hanging "Loading JSDoc..." was only after I addressed an error complaining that an index.html file didn't exist in /var/folders/... (I created an empty file and got the above message)

@brettz9
Copy link

brettz9 commented Jun 30, 2018

Well it turns out that adding a <nav> element to the index.html file makes the error go away, but now I see "No JSDocs to Preview", so apparently it is not saving some Markdown-to-HTML content to the /var/folders/...index.html path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants