I have a Flask app that is only ever deployed as a local service that continuously puts out this error, in the browser console, and fails to load content. The app is basically a media collection and distribution service. I understand that there is a mismatch between the content-length value in the header but I don't know where this is coming from, how to ignore it or how to fix the issue.
The error occurs in two contexts.
- When loading the gallery view which loads files from a local folder (within the flask app).
- When posting new media through the app's API (using Flask-SocketIO).
The errors are intermittent and never consistently on the same files.
This seems to happen more often now that I have moved the app to a Docker container with the following stack:
- python:3.7-alpine
- Flask (1.0.2)
- Google Firestore (DB)
- Flask-SocketIO
- Gunicorn
- Eventlet
- (There are a bunch more packages I'm using but I don't think they are all relevant to the issue)
This is running on Windows 10 in a Docker container and all media locations are mounted as volumes using the -v Docker command.
I also seem to get a stream of BlockingIO errors but I'm not sure they are related to the issue.