Skip to content

[WebProfilerBundle] Fix JS error when toolbar is reloaded #44179

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

Merged
merged 1 commit into from
Nov 21, 2021

Conversation

jderusse
Copy link
Member

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #44142
License MIT
Doc PR -

@carsonbot carsonbot changed the title Fix JS error when toolbar is reloaded [WebProfilerBundle] Fix JS error when toolbar is reloaded Nov 21, 2021
@derrabus
Copy link
Member

Thanks, that patch fixes the main problem already. But when the app fires multiple concurrent AJAX requests, I get a new error now:

Uncaught TypeError: can't access property "id", sfwdt is null
    loadToolbar https://localhost:8000/:31
    load https://localhost:8000/:31
    onreadystatechange https://localhost:8000/:31
    request https://localhost:8000/:31
    load https://localhost:8000/:31
    loadToolbar https://localhost:8000/:31
    finishAjaxRequest https://localhost:8000/:31
    fetch https://localhost:8000/:31
    promise callback*window.fetch https://localhost:8000/:31
    fetchContent https://localhost:8000/:16
    setTimeout handler* https://localhost:8000/:26
localhost:8000:31:22660

I've pushed a commit to the reproducer repository that reproduces this problem.

@derrabus
Copy link
Member

The race condition is gone as well now. Thank you very much!

@derrabus
Copy link
Member

Thank you Jérémy.

@derrabus derrabus merged commit d593a14 into symfony:5.4 Nov 21, 2021
This was referenced Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JS TypeError when replacing the debug toolbar
3 participants