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

RCE cannot access Course Files #1583

Open
sodiumchl opened this issue Mar 2, 2020 · 2 comments
Open

RCE cannot access Course Files #1583

sodiumchl opened this issue Mar 2, 2020 · 2 comments

Comments

@sodiumchl
Copy link

Summary:

Try to add/link to media files from Course Files in the new RCE, an error occurs: "Something went wrong. Cannot read property 'length' of undefined.

The log files the following lines:

ActionController::RoutingError (No route matches [GET] "/api/folders"):
ActionController::RoutingError (No route matches [GET] "/api/session"):
app/middleware/request_context_generator.rb:49:in `call'
app/middleware/prevent_non_multipart_parse.rb:33:in `call'

Steps to reproduce:

OS ubuntu 18.04.1
canvas stable/2020-02-12
psql (PostgreSQL) 10.12
ruby 2.4.9p362 (2019-10-02 revision 67824) [x86_64-linux-gnu]
Bundler version 1.17.3
gem 2.7.10
node v10.19.0

Installed per "Production Start" document.

Additional Notes:

If "new features" in RCE is disabled, i.e., the old RCE interface is used, the "Files" tab in insert links is greyed out.

Cannot Access Media

@sodiumchl
Copy link
Author

I see this from Production Start:

Canvas includes a new rich content editor component to support a consistent editor experience across multiple applications in the Canvas ecosystem. To make use of this component you need to run a supporting API server. See the Canvas RCE API Documentation for information on running the service and configuring Canvas to make use of it.

Got it to work this way:

Added to Apache2 conf:

Listen 3000
<VirtualHost *:3000>
  ServerName my.domain.com
  ServerAlias localhost 

  SSLEngine on
  SSLCertificateKeyFile /etc/ssl/xxxx.key
  SSLCertificateFile /etc/ssl/xxxx.crt
  SSLCertificateChainFile /etc/ssl/xxxx.ca-bundle

  PassengerAppRoot /var/canvas-rce-api
  PassengerAppType node
  PassengerStartupFile app.js
</VirtualHost>

/var/canvas/config/dynamic_settings.yml

production:
  config:
    canvas:
      canvas:
        encryption-secret: "mysecrete-afdasdfsadfdsafsda"
        signing-secret: "mysecrete-afdasdfsadfdsafsda"
      rich-content-service:
        app-host: "my.domain.com:3000"

/var/canvas-rce-api/.env

PORT=3000
NODE_ENV=production
STATSD_HOST=127.0.0.1
STATSD_PORT=8125
STATS_PREFIX=rceapi
ECOSYSTEM_SECRET="mysecrete-afdasdfsadfdsafsda"
ECOSYSTEM_KEY="mysecrete-afdasdfsadfdsafsda"
CIPHER_PASSWORD="Notused"

@danielblignaut
Copy link

see this instructure/canvas-rce-api#12

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