Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Pluto v0.19.9 notebooks appear in black and white

Open paulbthub opened this issue 2 years ago • 6 comments

After updating Pluto to v 0.19.9, notebooks appear in monochrome; cell edges are invisible -- please see first attached screengrab.

Reverting to v 0.19.8 fixes the issue (please see second screengrab)

This is with Firefox 101.0.1 and Julia 1.7.0 on Ubuntu 20.04.4 LTS with latest patches

monochrome_pluto_v0_19_9

correct_pluto_v0_19_8

(no video because I dont see how to make a video of something like this.)

paulbthub avatar Jun 17 '22 03:06 paulbthub

Thanks for reporting the error! Does it happen with all notebook files ? Could you try opening the JavaScript console (Right click -> Inspect -> Console tab) and report any error message there?

Pangoraw avatar Jun 17 '22 06:06 Pangoraw

Yes, the same thing happens with all the notebooks I've tried.

OK, there are two error messages and three warnings. Copypaste of the console messages as follows:

None of the “sha384” hashes in the integrity attribute match the content of the subresource. [edit](http://localhost:1234/edit?id=05ba2e78-ee1c-11ec-2d20-2f543211b6be)
Pluto.jl, by Fons van der Plas (https://github.com/fonsp), Mikołaj Bochenski (https://github.com/malyvsen), Michiel Dral (https://github.com/dralletje) and friends 🌈 [edit:1:9](http://localhost:1234/edit?id=05ba2e78-ee1c-11ec-2d20-2f543211b6be%20line%201%20%3E%20inlineScript)
None of the “sha384” hashes in the integrity attribute match the content of the subresource. [edit](http://localhost:1234/edit?id=05ba2e78-ee1c-11ec-2d20-2f543211b6be)
Launch parameters:  
Object { notebook_id: "05ba2e78-ee1c-11ec-2d20-2f543211b6be", statefile: undefined, statefile_integrity: undefined, notebookfile: undefined, notebookfile_integrity: undefined, disable_ui: false, preamble_html: undefined, isolated_cell_ids: undefined, binder_url: undefined, slider_server_url: undefined, … }
[editor.09b442e5.js:895:1259](http://localhost:1234/editor.09b442e5.js)
Waiting for socket to open... 5:01:23 PM [editor.a4bae9c2.js:1:18637](http://localhost:1234/editor.a4bae9c2.js)
Socket opened 5:01:24 PM [editor.a4bae9c2.js:1:18532](http://localhost:1234/editor.a4bae9c2.js)
Hello? [editor.a4bae9c2.js:1:20730](http://localhost:1234/editor.a4bae9c2.js)
Hello! [editor.a4bae9c2.js:1:20787](http://localhost:1234/editor.a4bae9c2.js)
Client object:  
Object { send: async u(s, n, o, a)
, session_options: {…}, version_info: {…}, notebook_exists: true, kill: null }
[editor.a4bae9c2.js:1:20927](http://localhost:1234/editor.a4bae9c2.js)
Hottt 0 false [editor.09b442e5.js:1:14713](http://localhost:1234/editor.09b442e5.js)
null [editor.a4bae9c2.js:1:21014](http://localhost:1234/editor.a4bae9c2.js)
New restart recommended message: null [editor.09b442e5.js:736:21694](http://localhost:1234/editor.09b442e5.js)
New restart required message: null [editor.09b442e5.js:736:21966](http://localhost:1234/editor.09b442e5.js)
This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://firefox-source-docs.mozilla.org/performance/scroll-linked_effects.html for further details and to join the discussion on related tools and features! [edit](http://localhost:1234/edit?id=05ba2e78-ee1c-11ec-2d20-2f543211b6be)
Loading mathjax!!

paulbthub avatar Jun 17 '22 09:06 paulbthub

UPDATE --

OK, so those failed sha384 hashes made me think that something got scrambled in the update/download? I already tried reloading/re-updating, (by first removing Pluto and then installing older versions, all of which worked as expected) but this time I tried flushing as well (by renaming what appears to be the v0.19.9 folder in .julia/packages/Pluto/ ) and that seems to have done the trick! The timestamps in the Pluto folder dont seem to be self-consistent(!??), but Pluto v 0.19.9 itself pre-compiled properly and is working normally now. The sha384 hash errors have gone away.

So [transient?] problem solved, I guess?

paulbthub avatar Jun 17 '22 09:06 paulbthub

@Pangoraw this was the first release to include https://github.com/fonsp/Pluto.jl/pull/2132 and https://github.com/fonsp/Pluto.jl/pull/2150 . It looks like this issue is about the codemirror CSS file not loading.

@paulbthub What do you mean with:

I tried flushing as well

and

The timestamps in the Pluto folder dont seem to be self-consistent

Did you ever install a branch/fork of Pluto, or always just ] add Pluto?

fonsp avatar Jun 17 '22 10:06 fonsp

The .julia/packages/Pluto folder contains several folders with names like 9ZgI7. From the timestamp, I identified what I figured to be the v0.19.9 update. (ie the folder's timestamp matched the time I did the update) So to try to 'flush' this folder, I renamed it to xxx-broken and then removed Pluto and did an update from the package manager. After this flush and update, everything worked -- no more hash errors, and no more monochrome notebook. However, even though the Pluto folder (in .julia/packages) had the new timestamp that matched the time of the update, none of the timestamps on any the folders within the Pluto folder had changed. This includes the timestamp on xxx-broken. (fwiw Im not entirely sure how this is even possible, but in any case, I would normally have expected a new folder to have been created with the correct timestamp.)

I'm not sure exactly what it means to install a branch or fork, but I always did either an ] add Pluto or an ] add Pluto #v0.19.8 (or other earlier version number)

paulbthub avatar Jun 17 '22 11:06 paulbthub

Oh actually it's probably the light_color.css file that got removed... weird

fonsp avatar Jun 17 '22 11:06 fonsp

@Pangoraw not sure what to do for this issue, let's close?

fonsp avatar Nov 09 '22 10:11 fonsp

cc @dralletje

fonsp avatar Nov 09 '22 10:11 fonsp

We talked it over again, and we think that this was a Pkg.jl issue, or a strange network issue.

Some additional questions:

  • Are you on a corporate laptop? On a corporate network?
  • Do you have a VPN, a school firewall, or something similar?
  • Have you experienced other internet stability issues?

We are closing this issue since we cannot reproduce it anymore, but we are curious to hear more information if you still have it! Thanks for using Pluto, have a great day!

fonsp avatar Nov 15 '22 18:11 fonsp

Fwiw my bet would be a strange, one-time-only network issue. Especially since it turned out to be so hard to reproduce.

re the additional questions below, the answer is no to all of them. I'm running Ubuntu 20.04 at home on a desktop machine with a dedicated wired (ethernet) ADSL internet connection and a dynamic IP

At 02:42 AM 11/16/2022, Fons van der Plas wrote:

We talked it over again, and we think that this was a Pkg.jl issue, or a strange network issue.

Some additional questions:

  • Are you on a corporate laptop? On a corporate network?
  • Do you have a VPN, a school firewall, or something similar?
  • Have you experienced other internet stability issues?

We are closing this issue since we cannot reproduce it anymore, but we are curious to hear more information if you still have it! Thanks for using Pluto, have a great day!

­ Reply to this email directly, https://github.com/fonsp/Pluto.jl/issues/2181#issuecomment-1315720563view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AVFVYMIH42MD7HDPV7XRI5DWIPKPTANCNFSM5ZA4IF5Aunsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

paulbthub avatar Nov 16 '22 01:11 paulbthub

We talked it over again, and we think that this was a Pkg.jl issue, or a strange network issue.

Some additional questions:

  • Are you on a corporate laptop? On a corporate network?
  • Do you have a VPN, a school firewall, or something similar?
  • Have you experienced other internet stability issues?

We are closing this issue since we cannot reproduce it anymore, but we are curious to hear more information if you still have it! Thanks for using Pluto, have a great day!

Hello @fonsp, maybe my issue is related to this.

I'm in a corporate environment and getting 5 errors in the javascript console when I try to load a notebook. I'm not at liberty to share anything from my work computer (writing from phone), but all the errors are of the form:

Failed to find a valid digest in the 'integrity' attribute for resource 'http://localhost:1234/editor.STUFF.js' with computed SHA-384 integrity {...}. The resource has been blocked.

Where STUFF is an alphanumerical string.

As a result, the notebook never loads.

I have tried on Edge Chromium and Google Chrome.

One workaround I have found is to put Pluto in develop mode with ] dev Pluto. The assets seems to be loaded differently in that mode. However, it is not ideal to keep Pluto up to date that way.

huguesmp avatar Nov 22 '22 14:11 huguesmp

Thanks for the feedback @huguesmp !

Your case could be SUPER helpful in fixing this issue! It would be extremely helpful if you could send one of the files for which you get an error. We need to see the file exactly as it exists on your computer, including whitespace changes.

If that's not possible, you could run the comparison yourself, and send us a summary of your findings. I wrote a notebook that will automatically check each file against a downloaded version from our CDN, and if they differ, it displays the git diff of the two files.

https://github.com/fonsp/disorganised-mess/blob/main/compare%20local%20dist%20files%20with%20CDN.jl

Could you run this on your computer? If all the files match according to the notebook, then that might be because the notebook is using a fixed version of Pluto. Add a cell with this code:

begin
import Pkg
Pkg.activate()
end

To enable the global package environment (or whichever environment you installed Pluto in), and restart the notebook.

Thank in advance! Hopefully this will help us find something.

fonsp avatar Nov 23 '22 15:11 fonsp

Hi @fonsp, sorry for not responding sooner!

Here is what I tried:

  • In normal mode, the notebook you prepared does not load (not surprising but I still tried)
  • In develop mode, the notebook loads fine, but I'm not able to run the cell that downloads the assets off the CDN.

Downloads.download is blocked by the proxy. It seems very strict and probably only lets the browser through.

When I use Pluto in dev mode, an "info" message is printed in the REPL:

[ Info: It looks like you are developing the Pluto package, using the unbundled frontend...

Maybe a temporary workaround would be to be able to start Pluto in this manner in normal mode through something like a keyword argument to Pluto.run()?

I think that would get around my overly restrictive environment.

Sorry if that sounds like a bad idea, I've no clue how Pluto works under the hood 🙂

huguesmp avatar Dec 15 '22 17:12 huguesmp