close

[Solved] Chrome violation : [Violation] Handler took 83ms of runtime

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Chrome violation : [Violation] Handler took 83ms of runtime in javascript. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Chrome violation : [Violation] Handler took 83ms of runtime Error Occurs?

Today I get the following error Chrome violation : [Violation] Handler took 83ms of runtime in javascript.

How To Solve Chrome violation : [Violation] Handler took 83ms of runtime Error ?

  1. How To Solve Chrome violation : [Violation] Handler took 83ms of runtime Error ?

    To Solve Chrome violation : [Violation] Handler took 83ms of runtime Error Perhaps a little off topic, just be informed that these kind of messages can also be seen when you are debugging your code with a breakpoint inside an async function like setTimeout like below:
    [Violation] 'setTimeout' handler took 43129ms

  2. Chrome violation : [Violation] Handler took 83ms of runtime

    To Solve Chrome violation : [Violation] Handler took 83ms of runtime Error Perhaps a little off topic, just be informed that these kind of messages can also be seen when you are debugging your code with a breakpoint inside an async function like setTimeout like below:
    [Violation] 'setTimeout' handler took 43129ms

Solution 1


“Chrome violations” don’t represent errors in either Chrome or your own web app. They are instead warnings to help you improve your app. In this case, Long running JavaScript and took 83ms of runtime are alerting you there’s probably an opportunity to speed up your script.

(“Violation” is not the best terminology; it’s used here to imply the script “violates” a pre-defined guideline, but “warning” or similar would be clearer. These messages first appeared in Chrome in early 2017 and should ideally have a “More info” prompt to elaborate on the meaning and give suggested actions to the developer. Hopefully those will be added in the future.)

Solution 2

Perhaps a little off topic, just be informed that these kind of messages can also be seen when you are debugging your code with a breakpoint inside an async function like setTimeout like below:

[Violation] 'setTimeout' handler took 43129ms

That number (43129ms) depends on how long you stop in your async function

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment