Question Authors' Forum

Remove the warning "Ace editor not ready"

Remove the warning "Ace editor not ready"

by Shankar Jha -
Number of replies: 7

Is there any way to remove the warning "Ace editor not ready. Perhaps reload page?" as shown in the screenshot below


In reply to Shankar Jha

Re: Remove the warning "Ace editor not ready"

by Richard Lobb -

Well, one way to get rid of it is to turn off the Ace editor, i.e. set the UI to None in the question or its prototype.

But ... you should only be seeing that message very rarely, usually only after a version upgrade. After an upgrade Moodle takes typically 10 - 20 seconds to minimise all files in the Ace editor, so it's unavailable during that time. Once minimised it's cached and should be served in plenty of time. If you refresh the page, after say 30 seconds, is the message still there?

I have seen one case where a very slow server (a tiny microcontroller in a box with no heat sink) was unable to minimise the editor before the request timed out, so that message never went away. What are the specs on your server?

Richard

In reply to Richard Lobb

Re: Remove the warning "Ace editor not ready"

by Marcus Schroeder -

We have the same problem with our moodle-installation. I tried your instructions but it does not help. The ace.js-file is pending for a long time (with every request) and it ends up with a HTTP 500-error. I checked folder permissions and I set it to 777.

Do you have an idea? Many thanks in advance!

In reply to Marcus Schroeder

Re: Remove the warning "Ace editor not ready"

by Richard Lobb -

I assume from what you're saying that Ace never loads correctly, is that right? 

Please tell me a bit about your server (CPU type, number of cores, memory size, disk size). AFAIK most users don't have this problem so there must be something unusual about your server - can you think of anything yourself? [**EDIT** Please also tell me what versions of both Moodle and CodeRunner you're running.]

I also assume the problem occurs with multiple different browsers (at least Chrome and Firefox), while either editing or previewing a question. Please confirm.

Since I can't replicate the problem myself, you'll need to tell me more about the exact symptoms if I'm to help. So please do the following:

  1. Using the Chrome browser, open a Preview window for a CodeRunner question. It will presumably display the "Ace editor not ready" message. Then open a DevTools window for that preview page by typing SHIFT+CTRL+I. Select the Network pane in the DevTools window then go back to the Preview window and reload the page (CTRL+R). Make a screen dump of the entire DevTools window. It should look something like the first of the attached files.
  2. Click the ace.js line in the DevTools window and in the right-hand pane, select the Timing panel (from the Headers/Preview/Response/Cookies/Timing menu along the top). Make a screen copy of the relevant information as in the second of the attached files.

If what you're seeing is a timeout in the loading of ace.js, you could also try switching to the Firefox browser and increasing the value of network.http.connection-timeout in about:config. It defaults to 90 seconds. Try doubling it and reloading the page.


Attachment DevTools - localhost-moodle-question-preview.php?id=30826cmid=1920behaviour=adaptivemaxmark=2.0000000correctness=1marks=2markdp=2feedback=1generalfeedback=1rightanswerhistory_357.png
Attachment Selection_358.png
In reply to Richard Lobb

Re: Remove the warning "Ace editor not ready"

by Gary Newport -
Hi and sorry to jump on to this question, but not only am I having the same issue on our school site but it is appearing on your own demo site.

It does not clear at all.

Showing Ace error message on CodeRunner installation
In reply to Gary Newport

Re: Remove the warning "Ace editor not ready"

by Richard Lobb -

In our department, where thousands of students use CodeRunner every day, the message comes up only fairly rarely, usually after system upgrades or when a computer is running CodeRunner for the first time. As far as I know, it always go away when the page is reloaded; the Ace editor is then running properly. If this is not the case for you I need to know more about your environment.

I asked the previous guy the following question but never received a response:

"Please tell me a bit about your server (CPU type, number of cores, memory size, disk size). AFAIK most users don't have this problem so there must be something unusual about your server - can you think of anything yourself? [**EDIT** Please also tell me what versions of both Moodle and CodeRunner you're running.]"

Also, in your case, I see you had the problem when running quizzes on coderunner.org.nz, so could you clarify, please, if the problem there also persists when you reload the page. And if so I would also like to know  the specs of the user laptop, what operating system and what browser you are running.

I can't fix a problem if I don't have information about it.


In reply to Richard Lobb

Re: Remove the warning "Ace editor not ready"

by Gary Newport -
Of course, happy to provide further info. No, the message did not clear after a refresh of the page or with time. I am using the latest version of Chrome on a Windows 10 system (up to date, as just rebuilt the computer). It is running on an i7 processor with 8GB of RAM, a 1TB SSD and a 65Mbs internet connection (though lower once to the desktop). Hope this helps. On our own install we have Moodle 3.9 running on a virtual server behind a proxy, with a secure HTTP external connection. The server is compatible with Moodle up to 3.10 (probably beyond). CodeRunner is on the latest version (all plugins are up to date). I could get more specific details on the server if required, but would take me a little time. Oh, it is a Debian Linux server. I know we are around 38% on drive space.
In reply to Gary Newport

Re: Remove the warning "Ace editor not ready"

by Richard Lobb -

Many thanks for that, Gary. Very helpful. Your machine sounds top-of-the-line so the problem can't be its performance. Just to confirm though: you are getting the message with that machine when running a quiz on this machine (coderunner.org.nz), even when you refresh the page? Because that's very strange indeed.

I could possibly come up with theories that would explain the problems on your own server but I'd first like to understand how problems can occur on our server.

I suggest we take this conversation off-line until we've found a solution. I'm going to email your directly.

Thanks for helping out

Richard