bitnami / vms

Bitnami VMs
https://bitnami.com
Other
206 stars 44 forks source link

[CanvasLMS] Custom JS #489

Closed edtekio closed 1 year ago

edtekio commented 2 years ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

No response

bndiagnostic output

No response

bndiagnostic was not useful. Could you please tell us why?

No response

Describe your issue as much as you can

Hi,

We are experiencing issues with your Canvas LMS image deployed on AWS.

When applying custom JS - It gets overrided with an incomplete html file.

The curious fact is that when accessing the url where the file is supposed to be hosted we can see our custom JS - but if we try download it we retrieve a server error.

Please see attached video explaining the whole thing.

https://user-images.githubusercontent.com/110103175/202242419-28347df1-9500-4b4a-aa77-ffa2dc4bdcc9.mp4

Could you help us explaining why is this happening or with the source inside the linux machine in AWS where this file should be hosted?

Thank you in advance

gongomgra commented 2 years ago

Hi @edtekio,

Thanks for using Bitnami. Your question is related to the application itself and how it works internally. We recommend you to open a new question in the official CanvasLMS support forums, where people with more experience using the application can help you

https://community.canvaslms.com/

edtekio commented 2 years ago

Hi,

I can confirm it is not related to the application itself. In the SaaS version works like a charm.

Some help would be highly appreciated.

gongomgra commented 2 years ago

Hi @edtekio,

I'm afraid I don't have enough knowledge with the CanvasLMS application to try to reproduce your issue. Can you run the bndiagnostic tool so we can at least check the app logs?

https://docs.bitnami.com/general/how-to/understand-bndiagnostic/

You mentioned in the SaaS version it works fine. I understand it is the official CanvasLMS SaaS offering, is that correct? Unfortunately, there can be many differences between both solutions (app version, ruby, database and other components). It looks like it can be related to the application itself. According to the official CanvasLMS docs, using custom JavaScript can cause this kind of issues. Please open a new question in the official forums for help on how to debug it.

edtekio commented 2 years ago

The output of the tool retrieves a code (d46020e1-fa74-24be-8994-eb8820f4dd38) and the logs below:

[Mon Nov 21 11:19:49.318529 2022] [:error] [pid 2481329:tid 140070862075648] [client ip_address:51918] [client 84.123.7.252] ModSecurity: Warning. Match of "eq 0" against "REQBODY_ERROR" required. [file "/opt/bitnami/apache2/conf/modsecurity.conf"] [line "76"] [id "200002"] [msg "Failed to parse request body."] [data ""] [severity "CRITICAL"] [hostname "trial.ilerna.com"] [uri "/api/v1/courses/68/quizzes/3/submissions/44/events"] [unique_id "Y3tQxbkWuq2061gs8Rr_ewAAAR8"], referer: https://trial.ilerna.com/courses/68/quizzes/3?module_item_id=328

[Mon Nov 21 11:19:52.014301 2022] [:error] [pid 2481329:tid 140070912431872] [client ip_address:51918] [client 84.123.7.252] ModSecurity: Warning. Match

of "eq 0" against "REQBODY_ERROR" required. [file "/opt/bitnami/apache2/conf/modsecurity.conf"] [line "76"] [id "200002"] [msg "Failed to parse request body."] [data ""] [severity "CRITICAL"] [hostname "trial.ilerna.com"] [uri "/api/v1/courses/68/quizzes/3/submissions/44/events"] [unique_id "Y3tQyLkWuq2061gs8Rr_fwAAARk"], referer: https://tria/

gongomgra commented 2 years ago

Hi @edtekio,

Thanks for your message. Unfortunately, the bndiagnostic tool didn't retrieve any information from the /opt/bitnami/canvaslms/logs folder because the files were too big. Can you check them to get more information? According to the error messages you posted here there seems to be an error with the ModSecurity module and CanvasLMS. I also see other messages in the Apache logs related to CanvasLMS, but I think you will find more details in the specific log.

App 2697018 output: /opt/bitnami/canvaslms/app/controllers/application_controller.rb:2200: warning: URI.escape is obsolete
App 2719113 output: /opt/bitnami/canvaslms/vendor/bundle/ruby/2.7.0/gems/ritex-1.0.1/lib/ritex/mathml/entities.rb:55: warning: key "rightleftharpoons" is duplicated and overwritten on line 101
App 2719113 output: /opt/bitnami/canvaslms/vendor/bundle/ruby/2.7.0/gems/ritex-1.0.1/lib/ritex/mathml/entities.rb:178: warning: key "eqslantgtr" is duplicated and overwritten on line 179
App 2719113 output: /opt/bitnami/canvaslms/vendor/bundle/ruby/2.7.0/gems/ritex-1.0.1/lib/ritex/mathml/entities.rb:225: warning: key "ntrianglelefteq" is duplicated and overwritten on line 229
App 2719113 output: /opt/bitnami/canvaslms/vendor/bundle/ruby/2.7.0/gems/ritex-1.0.1/lib/ritex/mathml/entities.rb:244: warning: key "nsupseteq" is duplicated and overwritten on line 245
App 2719113 output: /opt/bitnami/canvaslms/vendor/bundle/ruby/2.7.0/gems/ritex-1.0.1/lib/ritex/mathml/functions.rb:94: warning: key "rowspan" is duplicated and overwritten on line 98
App 2719113 output: /opt/bitnami/canvaslms/vendor/bundle/ruby/2.7.0/gems/ritex-1.0.1/lib/ritex/mathml/functions.rb:93: warning: key "colspan" is duplicated and overwritten on line 99
App 2697018 output: /opt/bitnami/canvaslms/app/controllers/application_controller.rb:2200: warning: URI.escape is obsolete
github-actions[bot] commented 1 year ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 1 year ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.