instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.7k stars 2.51k forks source link

Race condition makes the edit assignment page not to render #1870

Closed esanzgar closed 2 years ago

esanzgar commented 3 years ago

Summary:

On Chrome Canary (v.92.0), when I have the web console open and I edit an assignment I can see the following error trace:

Uncaught Error: Minified React error #200; visit https://reactjs.org/docs/error-decoder.html?invariant=200 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Object.t.render (react-dom.production.min.js:290)
    at ke.renderAllowedAttempts (EditView.coffee:1140)
    at ke.afterRender (EditView.coffee:634)
    at ke.afterRender (EditView.coffee:18)
    at ke.t._afterRender (View.coffee:176)
    at ke.t.render (View.coffee:144)
    at ke.render (View.coffee:18)
    at t.renderView (View.coffee:327)
    at View.coffee:18
    at je (index.js:1387)

This error causes the the edit assignment form to not render.

The cause is that '#allowed-attempts-target' element doesn't exists and Reacts tries to render on the non existing target:

https://github.com/instructure/canvas-lms/blob/540fd63894bfe922c1d461958336501414916bce/ui/features/assignment_edit/backbone/views/EditView.coffee#L1139-L1140

Steps to reproduce:

  1. Use Chrome v92.0
  2. Open the web console
  3. Go to an assignment and try to edit it. The URL should look like ...instructure.com/courses/[123]/assignments/[123]/edit

Expected behavior:

The edit form should be shown

Actual behavior:

The edit form is not shown

Additional notes:

This is a race condition of some short because I sometimes don't experience the problem. When the web console is opened it happens more often.

nicolopez77 commented 3 years ago

We are experiencing the same behavior randomly, without opening the console.

designamx commented 3 years ago

is there any update in this?

lyhr00ly commented 2 years ago

use chrome v100, recive the same error, but it's seem work normally at Firefox browser

lyhr00ly commented 2 years ago

this commit has fix my question 73e471c085ffbaa8aacb7367b6937e074d9cc377

nicolopez77 commented 2 years ago

Same here, the release from 2022-01-19 where this change was introduced, worked for me.