Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFP protocol generator shows 'too many errors' on edit page but no errors on main page #1338

Closed
becky-gilbert opened this issue Jan 16, 2024 · 1 comment

Comments

@becky-gilbert
Copy link
Contributor

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.

@becky-gilbert
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant