-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Data for this panel isn't available anymore. Please reload the page and retry. #1252
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
Comments
Do the requests to the toolbar ( |
|
I'm not sure if my templates are problematic. I started a new project today and after using a free website templates' css and js, this problem just happened again. The one I'm using: |
Are you running this on a server (something not local)? If so, did you restart the web server between changes? |
I'm only running locally so far. I did try to restart the server, force reload the page and using incognito mode(chrome). |
Can you verify that the store id doesn't change from the initial response to the browser, so when the toolbar's javascript makes requests for additional content? The easiest way to do that is to open up a browser's dev tools, go to the network panel, and inspect the initial GET/POST's response, find the div with the id |
@tim-schilling I have this problem as well (Django app is hosted on AWS Lambda via Serverless Framework, with static assets in S3). I can confirm that the store ID is the same in the ....which makes me wonder if the app order is the problem... but I just checked, and |
Further confirmed that this problem doesn't occur with |
@brettdh A few questions:
|
I suspect the issue is that If that does appear to be the issue, we could introduce a configuration option that would allow users to specify regular expressions or define a filtering function that would limit which requests are instrumented. |
|
@brettdh It's on the server side. You'd have to fork the toolbar and use that in your project. Alternatively, you can try downgrading to v2.2. Turns out the History Panel was introduced in v3. You might have the panels setting |
IIRC this was happening before I upgraded to 3.1.1 (from 2.1), but I can try again. |
@brettdh @zhengyuen A thing to keep in mind about the toolbar is it stores the requests in memory. If the toolbar's ajax request hits a process that does not have the toolbar's store in memory, it will not be able to fetch the details. I was able to confirm this on a heroku app by scaling down the web dyno, then scaling it back up. Lambda in particular seems like a bad situation to try to use the debug toolbar since it's meant to be stateless. |
@tim-schilling again, though, it works just fine for the django admin UI; it fails in the DRF browsable API only. I understand why you say Lambda seems like a particularly adversarial environment for the toolbar; I guess I'm more confused about why the ajax request so reliably hits the same lambda when visiting one set of URLs and so reliably fails to find the data when visiting a different set of URLs. As a separate workaround, would it be feasible (behind a config option) to have the toolbar middleware ship all the state with the originating request, thereby eliminating the ajax requests entirely and ensuring the state is available? |
That's going to require some investigation, but if increasing the results cache doesn't alleviate the issue, I have to believe it's because the hash doesn't exist.
I think that would be a pretty dramatic change from how things work today. It might be more feasible to allow the toolbar's store to be managed by something more persistent. |
Ah, so perhaps write it to the database (only when showing the toolbar) and perhaps age them out after some time. That makes sense to me. I can look into making a PR if I have some time. Either way, though, would you like a separate issue to track that feature request? |
That would be great. |
@brettdh Regarding the difference between the admin and the browseable API, is it possible that you're hitting the browseable API unauthenticated or it's not sending the cookie along that would trigger the sticky session / session affinity with the ALB? |
AFAICT, on both the admin UI and the browsable API, the
Further, I haven't been able to find any mention of session affinity or sticky sessions in any API Gateway documentation, so I don't know if there's any attempt to achieve it. |
My pages use a lot of static files, is the toolbar being rendered everytime a static file is requested? Maybe thats why the data is no longer available (even with |
This is based off of suggestions in django-commons/django-debug-toolbar#1252 and django-commons/django-debug-toolbar#750
I'm using wagtail 2.8, debug-toolbar 2.2.
It was working well at the beginning, but after adding several apps into my project, I accidentally put
path('__debug__/', include(debug_toolbar.urls))
, belowurl(r'', include(wagtail_urls)),
and thus I got 404 errors.I fixed the problem but the toolbar is not working anymore and I got
Data for this panel isn't available anymore. Please reload the page and retry.
for every panel.Setting
RESULTS_CACHE_SIZE = 100
didn't help.The text was updated successfully, but these errors were encountered: