Javascript 404 errors for unusual URL routes when editing pages cause Loading Failed messages

Jump to solution
Community Member

Self-hosted installation. When editing a page, we see some 404 errors in the javascript console trying to load the following urls:

Not sure what the first one is for, but the second message means the "Files" tab along the right side is disabled. There are a couple other javascript errors as well, but they come after this and I believe are simply the result of missing these other script objects.

Looking further at that area on the right, in the "Links" tab, we get additional 404 errors in the javascript console if we expand any of the sections, resulting in a "Loading Failed" message. For example, expanding the "Discussions" section inside the Links area produces a 404 error in the javascript console for this address:

And we see this on the page:

313082_Loading Failed.png

77 is the correct course id, and the same thing happens for all of our courses.

This is related to these other questions, which have incomplete or no solutions posted: do I fix a Loading Failed Message?

I'm not surprised these URLs produce 404 errors, since they don't match anything in config/routes.rb... but where are they coming from? How can I fix it? What could be going on here?

1 Solution
Community Member

Was able to fix that.

1. It requires RCE API server to be up and running
2. It should be accessible from the outside:

  • I used Docker variant, and run in it on port 3333
  • I used same domain as Canvas itself with addition of "/rce/" path. In config/dynamic_setting.yml:


  app-host: ""
  • Make sure that dynamic_setting.yml starts with the right environment. It was "development:" for me, I had to change it to "production:"
  • In Apache2 config I added proxy rewrite for "/rce/" path:
    RewriteEngine     on
    RewriteRule       "^/rce/(.*)$"  "http://localhost:3333/$1"  [P]
    ProxyPassReverse  "/rce/" "http://localhost:3333/"​

3. After Apache2 restart, browser now used correct "/rce/api/session" requests which was forwarded to RCE api server.


View solution in original post