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

Critical Katex parse error, crashing production application. #1049

Closed
roker15 opened this issue Jul 2, 2022 · 3 comments
Closed

Critical Katex parse error, crashing production application. #1049

roker15 opened this issue Jul 2, 2022 · 3 comments
Labels
Milestone

Comments

@roker15
Copy link

roker15 commented Jul 2, 2022

I intentionally wrote wrong katex syntex (because any user can write wrong syntax)

ax_2+\̲x̲r̲i̲g̲h̲t̲a̲w̲w̲o̲r̲

And application crash with error
ParseError: KaTeX parse error: Undefined control sequence: \xrightawwor at position 6: ax_2+\̲x̲r̲i̲g̲h̲t̲a̲w̲w̲o̲r̲

And now I can not edit this syntax because application crashed before anything displayed on screen.

Expected behaviour -

Editor should take wrong syntax and display as text which can be edited and corrected.

Important Note -

At some point in earlier version (not sure which version) , behaviour was normal and when you put wrong syntax... it is displayed in red colour in preview and in text form in Editor. But now this behaviour is gone.

Video link showing Editor stuck when i put incomplete or wrong katex syntax. (this is from your website)
If I load wrong syntax from database whole page crash. Not even chance to view.

@roker15 roker15 changed the title Critical Katex error, crashing production application. Critical Katex parse error, crashing production application. Jul 2, 2022
@roker15 roker15 changed the title Critical Katex parse error, crashing production application. Critical Katex parse error, crashing production application having over 1000 user. Jul 2, 2022
@roker15 roker15 changed the title Critical Katex parse error, crashing production application having over 1000 user. Critical Katex parse error, crashing production application. Jul 2, 2022
@JiHong88 JiHong88 added the bug label Jul 4, 2022
@JiHong88 JiHong88 added this to the 2.43.14 milestone Jul 4, 2022
@roker15
Copy link
Author

roker15 commented Jul 5, 2022

When you are going to release 2.43.14, i need this fix immediately , my application is in production. And my clients not able to view their whole document because of a wrong tiny katex syntax. @JiHong88

@JiHong88
Copy link
Owner

JiHong88 commented Jul 5, 2022

The 2.43.14 version has been updated.
If this issue has not been resolved, please reopen this issue.
Thank you.

@roker15
Copy link
Author

roker15 commented Jul 5, 2022

The 2.43.14 version has been updated. If this issue has not been resolved, please reopen this issue. Thank you.

However issue is fixed but it is not as expected -----

  1. It's showing full red colour error ParseError: KaTeX parse error: Undefined control sequence: \xrightawwor at position 6: ax_2+\̲x̲r̲i̲g̲h̲t̲a̲w̲w̲o̲r̲ .it's good for developer but not for users.
  • You can show user understandable short error message. For example ---

       Wrong katex code, correct before submit -
        `ax_2+\̲x̲r̲i̲g̲h̲t̲a̲w̲w̲o̲r̲`
    
  • Even ax_2+\̲x̲r̲i̲g̲h̲t̲a̲w̲w̲o̲r̲ in red color is better for user experience.

  1. It would be even better (if possible) if user is allowed to submit wrong syntax in red colour in editor and user can edit it later. I guess it was available in some older version.

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

No branches or pull requests

2 participants