WeBWorK Main Forum

Upgrade from 2.17 to 2.18: Unknown server communication error.

Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -
Number of replies: 5

I have just upgraded from WW 2.17 to WW 2.18 on my local machine following the instruction given in the Upgrade Notes.

Things seems to be working fine: I can rending the problems of my existing courses. However, when I get the the Library Browser, I got

/webwork2/instructor_rpc

Unknown server communication error.

And when I click "View Problems" I got

Unexpected token '<', "

(see attached screenshot)

Any suggestion?

----------------------------------------------------------------------Render issue


In reply to Wai Yan Pong

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Glenn Rice -
There are a couple of things to check. First check that you don't have any local modifications that are interfering. For this run "git status" in the "/opt/webwork/webwork2" and "/opt/webwork/pg" directories. In both directories it should show

On branch main
Your branch is up to date with 'origin/main'

If it shows "Your branch and "origin/main" have diverged" or something like that, then you have local modifications.  If it shows "Changes not staged for commit:" and lists files below, then you also have local modifications.  You can ignore "Untracked files" if that shows up.  If you have local modifications, then you need to revert any of those.

If you don't have local modifications, then try running "npm ci" from the /opt/webwork/webwork2/htdocs and /opt/webwork2/pg/htdocs directories, and then restart the webwork2 app with "sudo systemctl restart webwork2".  Then see if the problem is resolved.
In reply to Glenn Rice

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -

Hi Glenn,

      git status in /opt/webwork/webwork2 shows

Changes to be committed:

  (use "git restore --staged <file>..." to unstage)

        deleted:    conf/localOverrides.conf.dist

        deleted:    conf/site.conf.dist

        new file:   htdocs/themes/math4/math4-coloring.css

and no problem in /opt/webwork/pg

I surely deleted those conf.dist file, because I accidentally modified them instead of the local conf files and saved them as conf (without the .dist)

What should I do then?

Thanks

In reply to Wai Yan Pong

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -

Just for the referrence to anyone who may have the same problem.

The issue for me was in math4/math4-coloring.css

npm ci gives the following complains.

In themes/math4/math4-overrides.css:

expected ":".

    ╷

305 │     color: #FF6600; b

    │                      ^

    ╵

Replacing math4-overrides.css by the one that comes with the distro, math4-overrides.css.dist, solves my issue.

"Note that theming is no longer done with this file." that's what said in the math4-overrides.css.dist file. 

In reply to Wai Yan Pong

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Glenn Rice -

So you had a syntax error in your math4-coloring.css file.  When the generate-assets.js script runs (it is called when you run "npm ci") it attempts to minimize the file, and fails because of the syntax error.

The math4-coloring.css file is not used at all.  There isn't even a math4-coloring.css.dist file in the distribution anymore.  If you have one, then it is a remnant from previous versions of WeBWorK.  You should just delete the math4-coloring.css and math4-coloring.css.dist files.

In reply to Glenn Rice

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -
Glenn, thanks for letting me know. I will simply delete them then.