""でポップアップウェブページからフォームを投稿しようとしています。それはChromiumでうまくいきます。ただし、Google Chromeでは、クエリはキャンセルされます。Chrome拡張機能からのHTTP投稿要求がキャンセルされました
F12コンソールスナップショット:
私はChromeで私の拡張機能をテストしてみた(Win10-x64のは、動作しません)、クロム(ArchLinux-x64のは、うまく機能)とChrome(ArchLinux- x64は動作しません)。私的使用のため、Chrome拡張ストアにアップロードしませんでした。 以下に重要な情報があります。詳細はジップとして添付しています。
-----システム情報-----
[email protected] ~/D/b/bin> yaourt -Q google-chrome chromium
local/google-chrome 57.0.2987.110-1
extra/chromium 57.0.2987.110-1
[email protected] ~/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>
-----マニフェスト。 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"
]
}
----------------------編集:
しようとしましたクロム://net-internals /#イベントとログを取得しました。
--> delegate_blocked_by = "NavigationResourceThrottle"
あなたがイベントを知ってchrome.webRequestを確認したいことがあります...
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
お試しくださいhttps://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Body –