Open srdurai opened 5 years ago
Error from Firefox:
Strict-Transport-Security: The connection to the site is untrustworthy, so the specified header was ignored.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dbserver:3001/api/session. (Reason: CORS request did not succeed).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dbserver:3001/api/folders?contextType=course&contextId=1. (Reason: CORS request did not succeed).
Error: Failed to fetch from the canvas-rce-api. Did you forget to start it or configure it? Details can be found at https://github.com/instructure/canvas-rce-api
Found this error from docker. Not sure if this is still a valid ticket or it should go to RCE API.
172.17.0.1 - - [22/Jul/2019:14:22:53 +0000] "GET /api/folders?contextType=course HTTP/1.0" 499 0 "-" "curl/7.58.0"
App 41 output: [2a7626ef-b1a0-47c1-99bd-0bab9e9bf11d] 127.0.0.1 - - [22/Jul/2019:14:22:53 +0000] "GET /api/folders?contextType=course HTTP/1.1" - - "-" "curl/7.58.0"
App 41 output: (node:41) UnhandledPromiseRejectionWarning: RequestError: Error: self signed certificate
App 41 output: at new RequestError (/usr/src/app/node_modules/request-promise-core/lib/errors.js:14:15)
App 41 output: at Request.plumbing.callback (/usr/src/app/node_modules/request-promise-core/lib/plumbing.js:87:29)
App 41 output: at Request.RP$callback [as _callback] (/usr/src/app/node_modules/request-promise-core/lib/plumbing.js:46:31)
App 41 output: at self.callback (/usr/src/app/node_modules/request/request.js:185:22)
App 41 output: at Request.emit (events.js:189:13)
App 41 output: at Request.onRequestError (/usr/src/app/node_modules/request/request.js:881:8)
App 41 output: at ClientRequest.emit (events.js:189:13)
App 41 output: at TLSSocket.socketErrorListener (_http_client.js:392:9)
App 41 output: at TLSSocket.emit (events.js:189:13)
App 41 output: at emitErrorNT (internal/streams/destroy.js:82:8)
App 41 output: at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
App 41 output: at process._tickCallback (internal/process/next_tick.js:63:19)
App 41 output: (node:41) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Not handling the rejected promise is clearly a problem, but the CORS rejection should not have happened. Requests to the RCE (http://dbserver:3001/
) should have responded with an Access-Control-Allow-Origin
header permitting access from canvas. I'm not knowledgeable about how docker might impact the URI, but the api response headers would be a good place to start.
I found that the rce sidebar is trying to call /api/wikiPages?contextType=course&contextId=1
, which does not exist (missing /v1
, the cases are all wrong). Is the URL correctly built?
@Aetherus I found the same exact problem, using latest stable version. RCE feature is disabled. Did you find a solution?
Hi, I have the same issue. Did you have a solution for this? Thank you.
I ended up installing RCE, setting it up, then marking it as "disabled" feature in the account features section ... and all works. Very weird to say the least. But it works 🤷 Hope it helps @dqcuong93
Hi, I have the same issue. Did you have a solution for this? Thank you.
Hi dqccuong93 are you resolve this problem?
Summary:
Canvas fails to connect to canvas-rce-api-host. As a result, wiki side-bar have disabled links and "Loading failed" messages.
Steps to reproduce:
Running latest canvas-rce-api docker image. Command used to start docker:
sudo docker run -d -e ECOSYSTEM_KEY="key" -e ECOSYSTEM_SECRET="key" -e NODE_TLS_REJECT_UNAUTHORIZED=1 -e STATSD_PORT=8125 -e STATSD_HOST=127.0.0.1 -p 3000:80 instructure/canvas-rce-api:latest
Front end encrypted with nginx. nginx conf:
Also tried with a separate server configured for canvas rce docker. Same error.
Expected behavior:
Wiki side bar loads without error messages.
Actual behavior:
Error from browser using "inspect element":
Additional notes: