You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our JavaScript validator for EFP protocol generator is showing a warning in the editor that says 'too many errors (28% scanned)', but there are no warnings on the main EFP study details page, so the JS is saved. The study produces an error when it tries to run. It's possible that the error at runtime is caused by problems with the protocol generator function that can't be detected by the JS validator. But given that the validator is producing a warning, we should figure out if it's possible to get any of those errors out to display to the user, or at least show some kind of warning on the study details page.
How to reproduce
I created an example study on production with ID 3294. The 'too many errors' warning shows up on line 179 in the protocol generator edit box, but the page itself doesn't display any validator warnings and the form can be saved.
Expected behavior
The study details page should show some kind of error or warning, and possibly prevent the user from saving the study details.
Additional context
I can across this issue while trying to reproduce some Sentry errors (see lookit/ember-lookit-frameplayer#358) that I thought could be related to JS errors in the user's protocol generator function. That's when I noticed that there were no warnings/errors marked on the EFP study details page, but there was this 'too many errors' message in the protocol generator edit box.
The text was updated successfully, but these errors were encountered:
As CJ explains in this PR #1339, the 'too many errors' warning message comes from the ace editor rather than jshint. So this message wasn't related to the problem with jshint not reporting undefined and unused variables in the protocol generator JavaScript. PR #1339 added a fix for undefined variables (unfortunately we weren't able to add error reporting for unused variables without producing more errors). So this issue is partially fixed by #1339.
The other part of this issue is ace's rather unhelpful 'too many errors' warning, which seems to be a bug that we have no solution for. So I'll close this issue, and we can reopen it if we come across a way to fix/improve this ace warning.
Description
Our JavaScript validator for EFP protocol generator is showing a warning in the editor that says 'too many errors (28% scanned)', but there are no warnings on the main EFP study details page, so the JS is saved. The study produces an error when it tries to run. It's possible that the error at runtime is caused by problems with the protocol generator function that can't be detected by the JS validator. But given that the validator is producing a warning, we should figure out if it's possible to get any of those errors out to display to the user, or at least show some kind of warning on the study details page.
How to reproduce
I created an example study on production with ID 3294. The 'too many errors' warning shows up on line 179 in the protocol generator edit box, but the page itself doesn't display any validator warnings and the form can be saved.
Expected behavior
The study details page should show some kind of error or warning, and possibly prevent the user from saving the study details.
Additional context
I can across this issue while trying to reproduce some Sentry errors (see lookit/ember-lookit-frameplayer#358) that I thought could be related to JS errors in the user's protocol generator function. That's when I noticed that there were no warnings/errors marked on the EFP study details page, but there was this 'too many errors' message in the protocol generator edit box.
The text was updated successfully, but these errors were encountered: