Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Expand websocket closure code handling#7

Merged
cosive-james-cooper merged 10 commits intomasterfrom
AUTO-515-insufficient-detail-in-chromewhip-reporting-of-web-socket-closures
Feb 21, 2022
Merged

Expand websocket closure code handling#7
cosive-james-cooper merged 10 commits intomasterfrom
AUTO-515-insufficient-detail-in-chromewhip-reporting-of-web-socket-closures

Conversation

@cosive-james-cooper
Copy link
Copy Markdown

@cosive-james-cooper cosive-james-cooper commented Jan 26, 2022

This commit introduces a substantially expanded error handling block for when the websocket has closed unexpectedly, leading to a timeout error. Specifically, now all 14 defined closure status codes are handled individually, rather than four of them. Furthermore, the catch-all exception handler at the end has been modified to provide (slightly) more information that should hopefully be more useful to us in debugging errors on production boxes.

This also includes a bunch of small tidying measures taken in the chrome.py file, and adjusted the initial declaration location of a couple of variables, since it was possible those variables could be used without having first been declared.

Lastly, the requirements.txt files have been updated. In requirements.txt the lxml requirement has been updated to a more recent version, while dev_requirements.txt has been changed to include requirements.txt in itself explicitly.

There will probably be several 'changes' in this PR that relate to whitespace only, so you might want to turn on the "no whitespace" option here.

This commit introduces a substantially expanded error handling block for when the websocket has closed unexpectedly, leading to a timeout error.  Specifically, now all 14 defined closure status codes are handled individually, rather than four of them.  Furthermore, the catch-all exception handler at the end has been modified to provide (slightly) more information that should hopefully be more useful to us in debugging errors on production PhishFeeder boxes.

This also includes a bunch of small tidying measures taken in the chrome.py file, and adjusted the initial declaration location of a couple of variables, since it was possible those variables could be used without having first been declared.

Lastly, the requirements.txt files have been updated.  In requirements.txt the lxml requirement has been updated to a more recent version, while dev_requirements.txt has been changed to include requirements.txt in itself explicitly.
Update setup.py to reflect the development of this branch of Chromewhip by Cosive, and better reflect the current status of our fork.  Also, bring the stated requirements listed in setup.py into line with those found in requirements.txt.  Plus, fix what appeared to be a few small errors in the development scripts.
Following the semi-automated process established to run these things, this commit updates the Chromewhip protocol to match that produced by a call to chrome's json/protocol on the latest version of the chromewhip docker container.

Unfortunately, I didn't manage to work out which version of the protocol this is.

This commit also adjusts some of the numbering in browser_protocol_patch.json.
This commit introduces a substantially expanded error handling block for when the websocket has closed unexpectedly, leading to a timeout error.  Specifically, now all 14 defined closure status codes are handled individually, rather than four of them.  Furthermore, the catch-all exception handler at the end has been modified to provide (slightly) more information that should hopefully be more useful to us in debugging errors on production PhishFeeder boxes.

This also includes a bunch of small tidying measures taken in the chrome.py file, and adjusted the initial declaration location of a couple of variables, since it was possible those variables could be used without having first been declared.

Lastly, the requirements.txt files have been updated.  In requirements.txt the lxml requirement has been updated to a more recent version, while dev_requirements.txt has been changed to include requirements.txt in itself explicitly.
Update setup.py to reflect the development of this branch of Chromewhip by Cosive, and better reflect the current status of our fork.  Also, bring the stated requirements listed in setup.py into line with those found in requirements.txt.  Plus, fix what appeared to be a few small errors in the development scripts.
…chromewhip-reporting-of-web-socket-closures' into AUTO-515-insufficient-detail-in-chromewhip-reporting-of-web-socket-closures
@cosive-james-cooper
Copy link
Copy Markdown
Author

For what it is worth, we now seem to have been through several rounds of successful testing using the head commit on this branch. I propose we consider again merging this back into master :)

This commit just bumps the stated version of Chromewhip in setup.py from 0.3.4 to 0.3.5 (something I forgot to do earlier).  It also updates the download_url field to point to the latest rolled version we have, which is currently 96.0.4664.110.
Comment thread setup.py Outdated
Comment thread setup.py Outdated
cosive-james-cooper and others added 2 commits February 22, 2022 09:11
Change the download URL to the proposed one that points to the head of the master branch.

Co-authored-by: ahosie <ahosie+github@gmail.com>
Co-authored-by: ahosie <ahosie+github@gmail.com>
@cosive-james-cooper cosive-james-cooper merged commit 0e6ed1a into master Feb 21, 2022
@cosive-james-cooper cosive-james-cooper deleted the AUTO-515-insufficient-detail-in-chromewhip-reporting-of-web-socket-closures branch February 21, 2022 20:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants