Cannot customize canvas theme after changing storage from local to s3

300 views
Skip to first unread message

Husam Ajour

unread,
Sep 4, 2020, 9:28:59 AM9/4/20
to Canvas LMS Users

Hello everyone. After changing the storage of my canvas app from local storage to s3 bucket, I'm no longer able to customize my canvas theme. theme colors can be changed but the login screen background and nav logo cannot be saved. I also want to mention that uploading files in canvas is working and files can be accessed with no issues. Any thoughts?

Capture.PNG

Andrew Gauger

unread,
Sep 4, 2020, 10:13:04 AM9/4/20
to Canvas LMS Users
That's ironic.  When I moved to s3, I had the opposite problem.  Mine was due to CORS. I know these assets are uploaded using delayed job.  Can you post the output of delayed job while this is happening?

Husam Ajour

unread,
Sep 4, 2020, 11:23:02 AM9/4/20
to Canvas LMS Users
hey man, 
this is what appears in the delayed_job.yml file after uploading a picture and clicking on preview changes

[- -]   ^[[1m^[[36mSQL Delayed::Backend::ActiveRecord::Job Load (1.3ms)^[[0m  ^[[1m^[[37mWITH limited_jobs AS (SELECT id, ROW_NUMBER() OVER () AS row_number FROM (SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE (run_at<='2020-09-04 15:11:14.254514' AND locked_at IS NULL AND next_in_strand='t') AND ("delayed_jobs"."priority" BETWEEN 0 AND 1000000) AND "delayed_jobs"."queue" = 'canvas_queue' ORDER BY "delayed_jobs"."priority" ASC, "delayed_jobs"."run_at" ASC, "delayed_jobs"."id" ASC LIMIT 1 FOR UPDATE) subquery) UPDATE "delayed_jobs" SET locked_by = CASE row_number WHEN 1 THEN 'ip-172-31-1-21:1053' END, locked_at = '2020-09-04 15:11:14.255396' FROM limited_jobs WHERE limited_jobs.id="delayed_jobs".id RETURNING "delayed_jobs".*^[[0m  [production:1 master]



 Btw do I need to modify any other files than store_fileyml and amazon_s3.yml? because I only modified these two and set the CORS of the s3 bucket to make file upload work.

Sam Horowitz

unread,
Sep 4, 2020, 11:24:57 AM9/4/20
to canvas-l...@googlegroups.com
I have the same problem.


From: canvas-l...@googlegroups.com <canvas-l...@googlegroups.com> on behalf of Husam Ajour <husam...@gmail.com>
Sent: Friday, September 4, 2020 9:28:59 AM
To: Canvas LMS Users <canvas-l...@googlegroups.com>
Subject: [Canvas] Cannot customize canvas theme after changing storage from local to s3
 

Hello everyone. After changing the storage of my canvas app from local storage to s3 bucket, I'm no longer able to customize my canvas theme. theme colors can be changed but the login screen background and nav logo cannot be saved. I also want to mention that uploading files in canvas is working and files can be accessed with no issues. Any thoughts?

Capture.PNG

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/canvas-lms-users/aede4b56-f1e4-487a-b7cb-a863a686a074n%40googlegroups.com.

Samuel Santhosh

unread,
Sep 5, 2020, 3:29:56 AM9/5/20
to Canvas LMS Users
Hi,

Please make sure you web server and canvas delayed job are running with a same user.
If your delayed job running different user then give appropriate permission to <canvas>/app folder.
I think this will solve the problem

Husam Ajour

unread,
Sep 5, 2020, 5:53:21 AM9/5/20
to Canvas LMS Users
Hi Sam,
Thank you for your reply. Unfortunately, that did not solve the problem. do you have any other suggestions? 

Andrew Gauger

unread,
Sep 5, 2020, 4:06:51 PM9/5/20
to Canvas LMS Users
Did you restart delayed job after making the changes to your yml file?  Maybe a full reboot of the server to make sure all the processes are reloaded.

Husam Ajour

unread,
Sep 6, 2020, 7:46:57 AM9/6/20
to Canvas LMS Users
Hey Andy,
I found this message in the production log. Any idea?

QUERY_STRING: "?"
REQUEST_METHOD: POST
SERVER_NAME:  mydomain   
SERVER_PORT: ''443'' 
SERVER_PROTOCOL: HTTP/1.1 
REMOTE_ADDR: 37.202.124.232 
path_parameters: ''{:controller=>"brand_configs", :action=>"create", :account_id=>"1"}'' 
query_parameters: "{}" 
request_parameters: ''{"brand_config"=>{"variables"=>{"ic-brand-primary"=>"#e0000f",
 "ic-brand-font-color-dark"=>"#0095ff", "ic-brand-button--secondary-bgd"=>"#0095ff",
 "ic-brand-favicon"=>#<ActionDispatch::Http::UploadedFile:0x000056431995aeb8 @tempfile=#<Tempfile:/tmp/RackMultipart20200906-2948-1aztrug.png>,
 @original_filename="our method-03.png", @content_type="image/png", @headers="Content-Disposition: 
 form-data; name=\"brand_config[variables][ic-brand-favicon]\"; filename=\"our method-03.png\"\r\nContent-Type: image/png\r\n">}}, "js_overrides"=>"", "css_overrides"=>"",   "mobile_js_overrides"=>"", "mobile_css_overrides"=>""}'' 
exception_message: Access Denied 
hostname: ip-172-31-1-21 
pid: 2948 
', 'Aws::S3::Errors::AccessDenied') RETURNING "id"^[[0m [production:1 master] [bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] ^[[1m^[[36mSQL (1.1ms)^[[0m ^[[1m^[[35mCOMMIT^[[0m [production:1 master] 
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] Created ErrorReport ID 10000000000056 
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] Redis (0.172ms) get settings/collect_error_statistics [127.0.0.1:6379
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] ^[[1m^[[36mSQL ErrorReport Load (0.7ms)^[[0m ^[[1m^[[34mSELECT "error_reports".* FROM "error_reports" WHERE "error_reports"."id" = 56 LIMIT 1^[[0m [production:1$ 
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] Rendering html template 
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] Rendered html template (0.1ms) 
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] Completed 500 Internal Server Error in 167ms (Views: 0.6ms | ActiveRecord: 19.6ms) 
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] [STATSD] (sql_read: 10.00) (sql_write: 2.00) (sql_cache: 0.00) (active_record: 13.00) (cache_read: 10.00) (total: 167.42) (view: 0.64) (db: 19.60) 
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] [STAT] 813032 950372 137340 813032 0.1299999999999999 0.0
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] request throttling increment: [0.14960319199999988,-50.0,1599391796.80888,["client_identifier","user:10000000000001"],["count",50.0],["last_touched",1599391796.6359$ 
[bde0a69b38ae32aa883908660c826123 02b0b49a-8ecd-489e-8c98-079217b9f81e] Redis (0.236ms) evalsha - [127.0.0.1:6379]

Graham Ballantyne

unread,
Sep 6, 2020, 11:23:47 AM9/6/20
to canvas-l...@googlegroups.com
The error message is very clearly in what you posted: “ Aws::S3::Errors::AccessDenied”

– 
Graham Ballantyne 
Senior Software Engineer | IT Services 
Simon Fraser University | Strand Hall 1001 
8888 University Dr., Burnaby, B.C. V5A 1S6 
604-837-6698  | gra...@sfu.ca

Husam Ajour

unread,
Sep 6, 2020, 11:27:13 AM9/6/20
to Canvas LMS Users
Hello Graham,
Thank you for your reply. Yes, I've seen the error message but don't really sure how to solve this. As I mentioned before, uploading files on canvas to s3 is working perfectly and files can be accessed with no issues, that's why I'm a bit confused about this issue.

Andrew Gauger

unread,
Sep 6, 2020, 11:31:48 AM9/6/20
to Canvas LMS Users
How sure are you that the delayed job runner has re-read the changed config?  
S3 can enable debugging, but its a nightmare.  

I'd start by creating a new IAM user (aws), create tokens, apply permissions, and try again.

Husam Ajour

unread,
Sep 15, 2020, 12:01:47 PM9/15/20
to Canvas LMS Users
Hello everyone,
I had the public access blocked on my s3 bucket and that was preventing the files to go to the s3 when apply changes on the theme. So now after I unblocked the public access things are working fine.

Iván García

unread,
Jun 25, 2021, 4:11:40 PM6/25/21
to Canvas LMS Users
Hello,

Must the S3 Bucket be open to the public? 

If we have setup the access key and secret access key why the S3 Bucket should be public? And if it is public, does it need only the getObject permission right?

Thank you.

Reply all
Reply to author
Forward
0 new messages