2

I'm trying to post a form from a popup webpage by "". It works well in Chromium. However, in Google Chrome, the query is cancelled. 

F12 Console Snapshot:

F12 Console Snapshot

I've tested my extension in Chrome (Win10-x64, doesn't work), Chromium (ArchLinux-x64, works well) and Chrome (ArchLinux-x64, doesn't work). It's for private usage so I didn't upload it to Chrome Extension Store. Here are some information that I think is important listed below. More details are attached as a zip. 

-----system info-----

recolic@RECOLICPC ~/D/b/bin> yaourt -Q google-chrome chromium
local/google-chrome 57.0.2987.110-1
extra/chromium 57.0.2987.110-1
recolic@RECOLICPC ~/D/b/bin> uname -a
Linux RECOLICPC 4.10.4-1-ARCH #1 SMP PREEMPT Sat Mar 18 19:39:18 CET 2017 x86_64 GNU/Linux

-----popup.html-----

  <form action="https://www.recolic.net/p/origin.php" method='post'>
  Domain name:<input id="insertHere" type='text' name='domainName' value=''><br>
  Key: <input type='password' name='keyForKey'><br>
  <input type='submit'>
  </form>

-----manifest.json-----

{
  "manifest_version": 2,

  "name": "Private Password Generator",
  "description": "This is Recolic's generator to securely get password.",
  "version": "1.1",
  "icons": { "16": "icon16.png",
           "48": "icon48.png",
          "128": "icon128.png" },

  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html"
  },
  "permissions": [
   "activeTab",
   "https://www.recolic.net/p/origin.php"
 ]
}

----------------------Edit:

Tried chrome://net-internals/#events and got the log.

--> delegate_blocked_by = "NavigationResourceThrottle"

I referred to (googlesource.com)[https://chromium.googlesource.com/chromium/src/+/lkgr/net/docs/crash-course-in-net-internals.md] but I don't know a lot about how to solve it...

t=2476 [st= 0] +REQUEST_ALIVE  [dt=72]
                --> priority = "HIGHEST"
                --> url = "https://www.recolic.net/p/origin.php"
t=2476 [st= 0]    DELEGATE_INFO  [dt=3]
                  --> delegate_blocked_by = "NavigationResourceThrottle"
t=2479 [st= 3]    URL_REQUEST_DELEGATE  [dt=0]
t=2479 [st= 3]   +URL_REQUEST_START_JOB  [dt=68]
                  --> load_flags = 37121 (MAIN_FRAME_DEPRECATED | MAYBE_USER_GESTURE | VALIDATE_CACHE | VERIFY_EV_CERT)
                  --> method = "POST"
                  --> upload_id = "1493551191453224"
                  --> url = "https://www.recolic.net/p/origin.php"
t=2480 [st= 4]      URL_REQUEST_DELEGATE  [dt=0]
t=2480 [st= 4]      HTTP_CACHE_GET_BACKEND  [dt=0]
t=2480 [st= 4]      HTTP_CACHE_OPEN_ENTRY  [dt=0]
                    --> net_error = -2 (ERR_FAILED)
t=2480 [st= 4]      HTTP_CACHE_CREATE_ENTRY  [dt=0]
t=2480 [st= 4]      HTTP_CACHE_ADD_TO_ENTRY  [dt=0]
t=2480 [st= 4]     +HTTP_STREAM_REQUEST  [dt=2]
t=2480 [st= 4]        HTTP_STREAM_JOB_CONTROLLER_BOUND
                      --> source_dependency = 22281 (HTTP_STREAM_JOB_CONTROLLER)
t=2482 [st= 6]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                      --> source_dependency = 22282 (HTTP_STREAM_JOB)
t=2482 [st= 6]     -HTTP_STREAM_REQUEST
t=2482 [st= 6]      UPLOAD_DATA_STREAM_INIT  [dt=0]
                    --> is_chunked = false
                    --> net_error = 0 (?)
                    --> total_size = 27
t=2482 [st= 6]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=1]
t=2482 [st= 6]        HTTP_TRANSACTION_SEND_REQUEST_HEADERS
                      --> POST /p/origin.php HTTP/1.1
                          Host: www.recolic.net
                          Connection: keep-alive
                          Content-Length: 27
                          Cache-Control: max-age=0
                          Origin: null
                          Upgrade-Insecure-Requests: 1
                          User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36
                          Content-Type: application/x-www-form-urlencoded
                          Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
                          Accept-Encoding: gzip, deflate, br
                          Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
t=2482 [st= 6]        UPLOAD_DATA_STREAM_READ  [dt=0]
                      --> current_position = 0
t=2482 [st= 6]        HTTP_TRANSACTION_SEND_REQUEST_BODY
                      --> did_merge = true
                      --> is_chunked = false
                      --> length = 27
t=2483 [st= 7]     -HTTP_TRANSACTION_SEND_REQUEST
t=2483 [st= 7]     +HTTP_TRANSACTION_READ_HEADERS  [dt=63]
t=2483 [st= 7]        HTTP_STREAM_PARSER_READ_HEADERS  [dt=63]
t=2546 [st=70]        HTTP_TRANSACTION_READ_RESPONSE_HEADERS
                      --> HTTP/1.1 200 OK
                          Server: nginx
                          Date: Sun, 30 Apr 2017 11:19:51 GMT
                          Content-Type: text/html; charset=UTF-8
                          Transfer-Encoding: chunked
                          Connection: keep-alive
t=2546 [st=70]     -HTTP_TRANSACTION_READ_HEADERS
t=2547 [st=71]      HTTP_CACHE_WRITE_INFO  [dt=0]
t=2547 [st=71]      HTTP_CACHE_WRITE_DATA  [dt=0]
t=2547 [st=71]      HTTP_CACHE_WRITE_INFO  [dt=0]
t=2547 [st=71]      URL_REQUEST_DELEGATE  [dt=0]
t=2547 [st=71]   -URL_REQUEST_START_JOB
t=2547 [st=71]   +URL_REQUEST_DELEGATE  [dt=1]
t=2547 [st=71]      DELEGATE_INFO  [dt=1]
                    --> delegate_blocked_by = "NavigationResourceThrottle"
t=2548 [st=72]   -URL_REQUEST_DELEGATE
t=2548 [st=72]    CANCELLED
t=2548 [st=72] -REQUEST_ALIVE
recolic
  • 554
  • 4
  • 18

2 Answers2

1

You may want to check chrome.webRequest to know the events that can possibly be used to cancel requests then check if you have them in your code. As mentioned in life cycle of requests, you can use these events to observe and analyze traffic. Certain synchronous events will allow you to intercept, block, or modify a request.

Try using chrome://net-internals/#events which will show you the gory detail of the request you are sending - including hidden redirects/security information about cookies being sent as suggested in this SO post.

Community
  • 1
  • 1
Teyam
  • 7,686
  • 3
  • 15
  • 22
  • I found `--> delegate_blocked_by = "NavigationResourceThrottle"` in the log (Full log attached on the question). Is it the culprit? Google didn't help me solve the problem... Where should I refer to? – recolic Apr 30 '17 at 11:30
0

This looks like something for the Geek Squad as I'm way too far over the hill to understand. But I'm betting there's a ton of 'cookies' and maybe they're sending the wrong signal.

Regina
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 13 '22 at 02:45