1

The issue I am running into is that whenever I do a normal refresh or load a page from my flask server a random set of static files will get stuck in a pending state. There are no errors in the local client side console or in the flask logs.

What I see on load is:

Example Stuck State

Notice that there are a couple files stuck in pending. This tends to be different every time but always a static file.

When I hit stop and then force refresh (ctrl + F5) everything loads fine:

After Force Refresh

Flask is in dev mode but I'm not getting an errors server side or client side popping up to help me figure out what is going on. I have tried adding the option to use --with-threads. That made no difference for me. I am using Flask session if that makes any difference.

Update This isn't the solution but is a work around for the moment. By using the logic to disable cache from here. I can get everything to load normally by forcing the local client side cache to be disabled. Obviously this isn't optimal as it impacts load times.

@app.after_request
def add_header(r):
    """
    Add headers to both force latest IE rendering engine or Chrome Frame,
    and also to cache the rendered page for 10 minutes.
    """
    r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
    r.headers["Pragma"] = "no-cache"
    r.headers["Expires"] = "0"
    return r
Douglas C.
  • 56
  • 5
  • Please provide enough code so others can better understand or reproduce the problem. – Community Apr 11 '22 at 13:30
  • I had a similar issue recently due to some conflict in versions of packages installed. I resolved it by installing the latest of each package. – RyanH Jun 22 '22 at 00:55
  • I think that might have been my issue. The problem has gone away at some point and I never did pinpoint the exact cause. – Douglas C. Jun 23 '22 at 03:10

0 Answers0