api-platform / admin

A beautiful and fully-featured administration interface builder for hypermedia APIs
https://api-platform.com/docs/admin/
MIT License
480 stars 130 forks source link

fixed: random error message about apiSchema being null #506

Closed slim closed 1 year ago

slim commented 1 year ago
Q A
Branch? main
Tickets
License MIT
Doc PR

You randomly get a message saying apiSchema is null. This happened when the window lost and retrieved focus twice because the first time it lost focus it reconnected to the api endpoint and re-instantiated dataProvider without updating the Schema by reconnecting to /. Next time it tries to connect to the api endpoint, apiSchema which was a local variable was already lost.

This bug was notably happening in api-platform demo

dunglas commented 1 year ago

Thanks for the fix! Could you add a non-regression test for that?

dunglas commented 1 year ago

test failures look related

alanpoulain commented 1 year ago

Thank you Slim!