PrivacyScore / privacyscanner

Privacyscanner is the new scanning backend component of a future PrivacyScore version
MIT License
20 stars 11 forks source link

getResourceContent error: No resource with given URL found #32

Open malexmave opened 4 years ago

malexmave commented 4 years ago

When scanning united.com, the following error appears:

$ privacyscanner scan -m chromedevtools http://united.com
chromedevtools> 2020-03-10 11:22:11,347: [INFO] Starting chromedevtools (scanner.py:179)
/[redacted]/venv/lib/python3.6/site-packages/pychrome/tab.py:176: UserWarning: Page.getResourceContent error: No resource with given URL found
  warnings.warn("%s error: %s" % (_method, result['error']['message']))
websocket exception
Traceback (most recent call last):
  File "/[redacted]/venv/lib/python3.6/site-packages/pychrome/tab.py", line 121, in _recv_loop
    message_json = self._ws.recv()
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_core.py", line 314, in recv
    opcode, data = self.recv_data()
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_core.py", line 331, in recv_data
    opcode, frame = self.recv_data_frame(control_frame)
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_core.py", line 344, in recv_data_frame
    frame = self.recv_frame()
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_core.py", line 378, in recv_frame
    return self.frame_buffer.recv_frame()
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_abnf.py", line 361, in recv_frame
    self.recv_header()
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_abnf.py", line 309, in recv_header
    header = self.recv_strict(2)
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_abnf.py", line 396, in recv_strict
    bytes_ = self.recv(min(16384, shortage))
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_core.py", line 453, in _recv
    return recv(self.sock, bufsize)
  File "/[redacted]/venv/lib/python3.6/site-packages/websocket/_socket.py", line 115, in recv
    "Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.
chromedevtools> 2020-03-10 11:22:35,840: [ERROR] Scan module `chromedevtools` failed. (scanner.py:197)
Traceback (most recent call last):
  File "/[redacted]/privacyscanner/privacyscanner/scanner.py", line 184, in scan_site
    mod.scan_site(result, scan_meta)
  File "/[redacted]/privacyscanner/privacyscanner/scanmodules/chromedevtools/__init__.py", line 48, in scan_site
    content = chrome_scan.scan(result, self.logger, self.options, meta, debugging_port)
  File "/[redacted]/privacyscanner/privacyscanner/scanmodules/chromedevtools/chromescan.py", line 254, in scan
    content = scanner.scan(browser, result, logger, options)
  File "/[redacted]/privacyscanner/privacyscanner/scanmodules/chromedevtools/chromescan.py", line 386, in scan
    url=response['url'])
  File "/[redacted]/venv/lib/python3.6/site-packages/pychrome/tab.py", line 177, in call_method

The error triggers two retries, which fail in the same way. Dependencies as in #27.