function send_to_logger_survey(request, sender, sendResponse)
{
var myArray=[];
var jsonResponse2;
myArray.push(email);
myArray.push(request.values); //contains chosen values
var json = JSON.stringify(myArray);
var url=szHost;
url=url.concat('/Subit_backend/logger_survey');
var xhr = new XMLHttpRequest();
xhr.onerror = function() { alert('error'); };
xhr.open('POST', url, true);
xhr.setRequestHeader("Content-type", "application/json")
xhr.setRequestHeader("X-Requested-With",'xmlhttprequest');
xhr.setRequestHeader("Access-Control-Allow-Origin", "*");
xhr.onload = function (){
if((xhr.status === 200)&&(xhr.readyState===4)) {
var jsonResponse2 = JSON.parse(xhr.responseText);
sendResponse({task: jsonResponse2});
return true; //The sendResponse callback is only valid if used synchronously, or if the event handler returns true to indicate that it will respond asynchronously.
}
};
xhr.send(json);
}
I have run it under the debugger and can see that xhr.send() is only running once. BTW, the transmission being sent twice is almost identical, juts off by a few bytes, but the payload is the same. Do you have any idea what is going on and perhaps a hint of where to look? I just want to send the packet once. The server is responding with code 200 twice too!
if (request.task =="log_results_survey"){
send_to_logger_survey(request, sender, sendResponse);
};
The log_results_survey is a message being sent from the content script.
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/6b7f955f-4b26-4876-954b-60cb8e152f44%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
HTTP 1304 POST /subcrud/Subit_backend/logger_survey HTTP 1.1 (application/json)
TLSv1.2 206 Server Hello, Change Cipher Spec, Finished
TLSv1.2 105 Change Cipher Spec, Finished
HTTP 1304 POST /subcrud/Subit_backend/logger_survey HTTP 1.1 (application/json)
TCP 60 443 -> 49681 [ACK] Seq=153 Ack=1851 Win 30528 Len=0
TCP 60 443 -> 49681 [ACK] Seq=153 Ack=1851 Win 30528 Len=0
HTTP 687 HTTP/1.1 200 OK (application/json)
see the two POSTS?
On the Network tab of the Chrome debugger I am only seeing one request from the browser. This is the request header:
POST /sub_crud/Subit_backend/logger_survey HTTP/1.1
Host: www.antiation.com
Connection: keep-alive
Content-Length: 649
Pragma: no-cache
Cache-Control: no-cache
Access-Control-Allow-Origin: *
Origin: chrome-extension://jgnodlhfmhghjhbkkkaa
X-Requested-With: xmlhttprequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Content-type: application/json
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: XDEBUG_SESSION=XDEBUG_ECLIPSE; cisession=ic10vmohovjquoh5jubk7ki6ul5d9qap
On the permissions question in manifest, I already have that. Could the Cipher change be causing it?
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/737ccef7-41b8-4eea-b7ef-591f672ee22a%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/6565dee7-6f94-45c0-a68c-dc6b32dc8f91%40chromium.org.
"You could try disabling PageSpeed and OPCache. Let us know if that solves the issue!"
I disabled OPCache without a change. I don't know where Pagespeed is. I couldn't find it in the php.ini file.
I have found some mention of a Chrome bug where a second port (at port n-1) sends a second buffer, but it is blank . In my case I have a second port opening at port n-1 but the 2nd buffer is not blank. https://productforums.google.com/forum/#...-gfRJLCCjg
There seems to be many complaints about this second port opening too.
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/80af656e-174c-4e55-bcd5-9e4f63d2137b%40chromium.org.
Forget the message, initiate the HTTP request from another website by running (copying and pasting) the code from your message handler in the console of the Developer Tools.No specific documentation, as the console simply runs whatever you enter in it, that is its job (and showing logs).If you do not see the second request in the network panel of the Developer Tools, then perhaps it is initiated from a different context (a content script in a tab, rather than a script in the background page, for example).Can you share your manifest?☆PhistucK
On Mon, Dec 17, 2018 at 4:49 PM Richard Bernstein <rich...@gmail.com> wrote:
Thanks again. I have NO IDEA how to send the same message from the Chrome debugger itself, but I am willing to try. Do the doc's for the debugger say how to do that? Also, I did get this suggestion from bitnami:
"You could try disabling PageSpeed and OPCache. Let us know if that solves the issue!"
I disabled OPCache without a change. I don't know where Pagespeed is. I couldn't find it in the php.ini file.
I have found some mention of a Chrome bug where a second port (at port n-1) sends a second buffer, but it is blank . In my case I have a second port opening at port n-1 but the 2nd buffer is not blank. https://productforums.google.com/forum/#...-gfRJLCCjg
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
I was actually under the impression that I could ONLY initiate it from the background task! So I am pretty positive that is the only place I am doing a send(). One more odd thing. I ran Wireshark on the PC while I am debugging under Chrome Dev Tools. Wireshark sees two buffers, but Chrome Dev tools only sees one. These are the headers to the send():
xhr.open('POST', url, true);xhr.setRequestHeader("Content-type", "application/json")xhr.setRequestHeader("X-Requested-With",'xmlhttprequest');xhr.setRequestHeader("Access-Control-Allow-Origin", "*");I am at a loss. Is there anyway that I could put a breakpoint in the send() command or somewhere deeper? I already put a breakpoint on the send() itself and it is only being triggered once in my code.
On Monday, December 17, 2018 at 11:22:22 AM UTC-5, PhistucK wrote:
Forget the message, initiate the HTTP request from another website by running (copying and pasting) the code from your message handler in the console of the Developer Tools.No specific documentation, as the console simply runs whatever you enter in it, that is its job (and showing logs).If you do not see the second request in the network panel of the Developer Tools, then perhaps it is initiated from a different context (a content script in a tab, rather than a script in the background page, for example).Can you share your manifest?☆PhistucK
On Mon, Dec 17, 2018 at 4:49 PM Richard Bernstein <rich...@gmail.com> wrote:
Thanks again. I have NO IDEA how to send the same message from the Chrome debugger itself, but I am willing to try. Do the doc's for the debugger say how to do that? Also, I did get this suggestion from bitnami:
"You could try disabling PageSpeed and OPCache. Let us know if that solves the issue!"
I disabled OPCache without a change. I don't know where Pagespeed is. I couldn't find it in the php.ini file.
I have found some mention of a Chrome bug where a second port (at port n-1) sends a second buffer, but it is blank . In my case I have a second port opening at port n-1 but the 2nd buffer is not blank. https://productforums.google.com/forum/#...-gfRJLCCjg
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/80af656e-174c-4e55-bcd5-9e4f63d2137b%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/2b1dc8c8-fce5-46ae-9cc2-5b8bc7983703%40chromium.org.
I think this should be moved to crbug.com. Just create an issue there and a Chrome engineer will investigate. It would help if you attached a sample extension that reproduces the problem to the created issue.Thank you.☆PhistucK
On Thu, Dec 20, 2018 at 11:17 PM Richard Bernstein <rich...@gmail.com> wrote:
I was actually under the impression that I could ONLY initiate it from the background task! So I am pretty positive that is the only place I am doing a send(). One more odd thing. I ran Wireshark on the PC while I am debugging under Chrome Dev Tools. Wireshark sees two buffers, but Chrome Dev tools only sees one. These are the headers to the send():
xhr.open('POST', url, true);xhr.setRequestHeader("Content-type", "application/json")xhr.setRequestHeader("X-Requested-With",'xmlhttprequest');xhr.setRequestHeader("Access-Control-Allow-Origin", "*");I am at a loss. Is there anyway that I could put a breakpoint in the send() command or somewhere deeper? I already put a breakpoint on the send() itself and it is only being triggered once in my code.
On Monday, December 17, 2018 at 11:22:22 AM UTC-5, PhistucK wrote:
Forget the message, initiate the HTTP request from another website by running (copying and pasting) the code from your message handler in the console of the Developer Tools.No specific documentation, as the console simply runs whatever you enter in it, that is its job (and showing logs).If you do not see the second request in the network panel of the Developer Tools, then perhaps it is initiated from a different context (a content script in a tab, rather than a script in the background page, for example).Can you share your manifest?☆PhistucK
On Mon, Dec 17, 2018 at 4:49 PM Richard Bernstein <rich...@gmail.com> wrote:
Thanks again. I have NO IDEA how to send the same message from the Chrome debugger itself, but I am willing to try. Do the doc's for the debugger say how to do that? Also, I did get this suggestion from bitnami:
"You could try disabling PageSpeed and OPCache. Let us know if that solves the issue!"
I disabled OPCache without a change. I don't know where Pagespeed is. I couldn't find it in the php.ini file.
I have found some mention of a Chrome bug where a second port (at port n-1) sends a second buffer, but it is blank . In my case I have a second port opening at port n-1 but the 2nd buffer is not blank. https://productforums.google.com/forum/#...-gfRJLCCjg
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/80af656e-174c-4e55-bcd5-9e4f63d2137b%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.