Shared workers XHR request
Reported by
kamilada...@gmail.com,
Nov 17 2016
|
||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36
Steps to reproduce the problem:
1. Go into website with shared workers and XHR request
2. Wait for request it is indeterminist
3.
What is the expected behavior?
Send PUT request to server.
What went wrong?
I have a litle problem with shared workes in Chrome. When i run shared workes, which is synchronous in Google Chrome i have indeterminate behavior. In JS code I'm doing something like:
var xhr = new XMLHttpRequest();
xhr.open('PUT', 'server/method/parameter', false);
xhr.setRequestHeader('Content-Type', 'application/json' );
xhr.send( JSON.stringify(data));
This code generate randomly behavior sometimes it send PUT request normaly, but sometimes it return
"Failed to execute 'send' on 'XMLHttpRequest"
Could you give me any tip to solve this problem?
It occurs only in Chrome, other browsers don't have problem with this request.
Did this work before? N/A
Chrome version: 54.0.2840.99 Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 23.0 r0
It's spoiled connection to server for other browsers since we refresh page or close Chrome.
,
Nov 25 2016
Thank you for reporting this. yhirano@, can you take a look at this?
,
Dec 21 2016
Sorry for the long delay. Can you see chrome://inspect, inspect the shared worker and see what the devtools (specifically the Network tab) is saying about the failed XHR? Also, the net-internals log (https://dev.chromium.org/for-testers/providing-network-details) is very useful. Thanks,
,
Dec 21 2016
Chrome inspect log from shared workers:
Uncaught DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://147.214.15.57:35376/emgbe/emgbe_srv/subscribers/20161221080423243480'.
at doRequest (https://147.214.15.57:35376/emgui/webpush/ConnectionManager.js:615:9)
at sendSubscriptionsToServer (https://147.214.15.57:35376/emgui/webpush/ConnectionManager.js:456:9)
at https://147.214.15.57:35376/emgui/webpush/ConnectionManager.js:423:13
,
Dec 21 2016
The net-internals log says the resource is requested with GET method, is that correct?
38463: URL_REQUEST
https://147.214.15.57:35376/emgbe/emgbe_srv/stream/20161221080423243480
Start Time: 2016-12-21 17:04:23.221
t=66852912 [st= 0] +REQUEST_ALIVE [dt=4219047+]
--> has_upload = false
--> is_pending = true
--> load_flags = 33024 (MAYBE_USER_GESTURE | VERIFY_EV_CERT)
--> load_state = 15 (READING_RESPONSE)
--> method = "GET"
--> net_error = -1 (ERR_IO_PENDING)
--> status = "IO_PENDING"
--> url = "https://147.214.15.57:35376/emgbe/emgbe_srv/stream/20161221080423243480"
t=71040860 [st=4187948] -HTTP_TRANSACTION_READ_BODY
t=71040860 [st=4187948] URL_REQUEST_JOB_BYTES_READ
--> byte_count = 33
t=71040860 [st=4187948] HTTP_TRANSACTION_READ_BODY [dt=10000]
t=71050861 [st=4197949] URL_REQUEST_JOB_BYTES_READ
--> byte_count = 33
t=71050861 [st=4197949] HTTP_TRANSACTION_READ_BODY [dt=10001]
t=71060862 [st=4207950] URL_REQUEST_JOB_BYTES_READ
--> byte_count = 33
t=71060862 [st=4207950] HTTP_TRANSACTION_READ_BODY [dt=10002]
t=71070864 [st=4217952] URL_REQUEST_JOB_BYTES_READ
--> byte_count = 33
t=71070864 [st=4217952] +HTTP_TRANSACTION_READ_BODY [dt=1095+]
t=71071959 [st=4219047]
It seems
,
Dec 21 2016
Yes is correct.
,
Dec 21 2016
So the problem is not about uploading. Could you confirm if it's happening on other workers or on the main document? The request is sent to the browser. Could you look at the server log, and see if the request is arrived and the response is sent? Thanks,
,
Dec 21 2016
Yes request is sent, in server i can see action. I'am not sure but it's happen on the main document. It ussualy happen when i refresh page or click go back button and forward button. Sometimes when i refresh page again it starts working, but usually I have to close all tabs with my pages and go in again.
,
Jan 11 2017
It would be appreciated if you could provide any reproduction code. > It ussualy happen when i refresh page or click go back button and forward button. Is the worker shared by another page? If the page is the only page connecting to the worker, the worker should be torn down.
,
Aug 28 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by schenney@chromium.org
, Nov 17 2016