#29872: ConnectionAbortedError from Chrome cancelled preload
-------------------------------------+-------------------------------------
Reporter: hingston | Owner: nobody
Type: Bug | Status: new
Component: | Version: 2.1
Uncategorized | Keywords:
Severity: Normal | ConnectionAbortedError Preload
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
Using the following code in a
[https://developers.google.com/web/updates/2017/02/navigation-preload
service worker to preload]:
{{{
addEventListener('activate', event => {
event.waitUntil(async function() {
// Feature-detect
if (self.registration.navigationPreload) {
// Enable navigation preloads!
await self.registration.navigationPreload.enable();
}
}());
});
}}}
Gives the following error when the page is cached by the service worker
and you F5 it attempts to preload and then cancels when the service worker
boots up:
{{{
"C:\Program Files\JetBrains\PyCharm 2018.2.4\bin\runnerw.exe"
C:\Users\Will\AppData\Local\Programs\Python\Python37-32\python.exe
C:/Users/Will/PycharmProjects/lolnames.gg/manage.py runserver 8000
Performing system checks...
System check identified no issues (0 silenced).
October 21, 2018 - 12:21:51
Django version 2.1.2, using settings 'lolnamesgg.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[21/Oct/2018 12:21:56] "GET /en/ HTTP/1.1" 200 11402
Traceback (most recent call last):
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 138, in run
self.finish_response()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 180, in finish_response
self.write(data)
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 274, in write
self.send_headers()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 332, in send_headers
self.send_preamble()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 453, in _write
result = self.stdout.write(data)
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py",
line 796, in write
self._sock.sendall(b)
ConnectionAbortedError: [WinError 10053] An established connection was
aborted by the software in your host machine
[21/Oct/2018 12:21:56] "GET /en/ HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51128)
Traceback (most recent call last):
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 138, in run
self.finish_response()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 180, in finish_response
self.write(data)
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 274, in write
self.send_headers()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 332, in send_headers
self.send_preamble()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 453, in _write
result = self.stdout.write(data)
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py",
line 796, in write
self._sock.sendall(b)
ConnectionAbortedError: [WinError 10053] An established connection was
aborted by the software in your host machine
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 141, in run
self.handle_error()
File "C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\site-
packages\django\core\servers\basehttp.py", line 86, in handle_error
super().handle_error()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 368, in handle_error
self.finish_response()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 180, in finish_response
self.write(data)
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 274, in write
self.send_headers()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py",
line 647, in process_request_thread
self.finish_request(request, client_address)
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py",
line 357, in finish_request
self.RequestHandlerClass(request, client_address, self)
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py",
line 717, in __init__
self.handle()
File "C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\site-
packages\django\core\servers\basehttp.py", line 154, in handle
handler.run(self.server.get_app())
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
line 144, in run
self.close()
File
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\simple_server.py",
line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
----------------------------------------
}}}
Windows 10
Chrome 70
Django 2.1
Python 3.7
--
Ticket URL: <https://code.djangoproject.com/ticket/29872>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.5a554b39ecedb8274db4c92b0299a642%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.