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

Pluto startup fails: "Uncaught TypeError: Cannot read properties of undefined (reading 'Library')" #2046

Closed
gjm-p opened this issue Apr 21, 2022 · 4 comments

Comments

@gjm-p
Copy link

gjm-p commented Apr 21, 2022

I am using Windows 10, Julia 1.7.2, Pluto 0.19.1, and Chrome 1000.4896.127.

I have just installed Pluto by doing add Pluto at a Julia pkg prompt. When I then do Pluto.run(), a browser window opens displaying a Pluto welcome notice, saying "Loading...", and a progress bar at the top of that window starts growing. The progress bar eventually reaches the right-hand side of the window, but the "Loading" notice does not go away. If I click on, say, the "new notebook" link on the welcome page, I get a blank page but no content ever appears in it.

If I point a new browser window at the same URI as the original one launched by Pluto.run(), the same thing happens.

In the Javascript console, an error appears immediately on going to that URI:

Uncaught TypeError: Cannot read properties of undefined (reading 'Library')
    at n (editor.30fdc042.js:1:21495)
    at Object.<anonymous> (editor.30fdc042.js:1:21644)
    at r (editor.30fdc042.js:1:402)
    at Object.<anonymous> (editor.30fdc042.js:1:16652)
    at r (editor.30fdc042.js:1:402)
    at index.1a7d4001.js:1:677

I attempted to capture a video recording using the Windows "Game Bar" as requested, but even though it is only 27 seconds long and shows approximately nothing happening in a single window the file is 33MB in size. I do not have a YouTube account. I am fairly sure that the only further information it provides beyond what I have written above is about timing, so: After pasting the URI into the Chrome URL bar, it takes maybe 0.5s or so before (exactly simultaneously, so far as I can see) the welcome notice appears in the browser window and the "Pluto.jl, by ..." message appears in the Javascript console. After about another 0.1s, the error above appears, I-think-simultaneously with when the title in the browser tab changes from showing the URI to saying "Pluto.jl". Another 0.1s after that, the progress bar starts doing its thing; from this point on, nothing visible happens other than the movement of the progress bar. It moves rapidly (~3 seconds) to maybe 2/3 of the way across the window and then crawls more slowly (~10s) to the right-hand side. Nothing further changes after that.

Looking at where the exception happens in the devtools, it appears to be (after prettyprinting the minified JS) here:

let e = new window.observablehq.Library;

The thing that is squiggly-underlined is "Library" but I think what this actually means is that window.observablehq is undefined.

What I expected to see

Pluto welcome screen, actual ability to create or load notebooks, no errors in Javascript console.

What actually happened

Pluto welcome screen in "loading" state, immediate error in Javascript console, never emerges from "loading" state, cannot create or load notebooks.

@gjm-p
Copy link
Author

gjm-p commented Apr 21, 2022

In case it's useful, here's the output when I did add Pluto:

(@v1.7) pkg> add Pluto
    Updating registry at `C:\Users\GMcCaughan\.julia\registries\General.toml`
   Resolving package versions...
   Installed MsgPack ────────── v1.1.0
   Installed FuzzyCompletions ─ v0.5.0
   Installed Configurations ─── v0.17.3
   Installed ExproniconLite ─── v0.6.13
   Installed MIMEs ──────────── v0.1.3
   Installed Pluto ──────────── v0.19.1
    Updating `C:\Users\GMcCaughan\.julia\environments\v1.7\Project.toml`
  [c3e4b0f8] + Pluto v0.19.1
    Updating `C:\Users\GMcCaughan\.julia\environments\v1.7\Manifest.toml`
  [5218b696] + Configurations v0.17.3
  [55351af7] + ExproniconLite v0.6.13
  [fb4132e2] + FuzzyCompletions v0.5.0
  [6c6e2e6c] + MIMEs v0.1.3
  [99f44e22] + MsgPack v1.1.0
  [c3e4b0f8] + Pluto v0.19.1
Precompiling project...
  6 dependencies successfully precompiled in 9 seconds (137 already precompiled)

@gjm-p
Copy link
Author

gjm-p commented Apr 21, 2022

It looks to me as if (1) editor.30fdc042.js is the first Javascript to be pulled in, and (2) neither it nor the welcome page itself contains anything that would cause window.observablehq to be set. Is this some sort of Javascript bundling problem?

@fonsp
Copy link
Owner

fonsp commented Apr 21, 2022

Thanks for the report! It has now been fixed, see #2045

@fonsp fonsp closed this as completed Apr 21, 2022
@gjm-p
Copy link
Author

gjm-p commented Apr 21, 2022

(I did check for pre-existing reports! But presumably 2045 was submitted between when I started writing mine and when I finished :-).)

I confirm that the problem does indeed appear to be fixed for me with 0.19.2. Thanks!

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

No branches or pull requests

2 participants