Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
weboob
weboob
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 174
    • Issues 174
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 48
    • Merge Requests 48
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • weboob
  • weboobweboob
  • Merge Requests
  • !480

Closed
Opened Aug 11, 2020 by Ludovic LANGE@llange
  • Report abuse
Report abuse

[edf] Update browser UserAgent (Firefox ESR Profile) to help edf.fr

  • Overview 1
  • Commits 1
  • Pipelines 1
  • Changes 1

I noticed that I could not use edf.fr around June 20, 2020 - it failed with a timeout:

2020-06-20 16:02:19,551:WARNING:urllib3.connectionpool:1.0.0:connectionpool.py:744:urlopen Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='particulier.edf.fr', port=443): Read timed out. (read timeout=10.0)")': /services/rest/edoc/getMyDocuments
2020-06-20 16:02:29,637:WARNING:urllib3.connectionpool:1.0.0:connectionpool.py:744:urlopen Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='particulier.edf.fr', port=443): Read timed out. (read timeout=10.0)")': /services/rest/edoc/getMyDocuments
Bug(edf): HTTPSConnectionPool(host='particulier.edf.fr', port=443): Max retries exceeded with url: /services/rest/edoc/getMyDocuments (Caused by ReadTimeoutError("HTTPSConnectionPool(host='particulier.edf.fr', port=443): Read timed out. (read timeout=10.0)"))

In fact, this timeout is caused by the UserAgent, and it seems that edf.fr stopped accepting Firefox 68 (ESR) UserAgent string around that time.

Updating the UserAgent string fixes the issue, no more timeout. 100% reproducible, even if it sounds strange...

As Firefox 78 (ESR) has been updated around June 30, 2020, I believe it's possible to update the Firefox profile. Of course, there is a risk of impact, but the comment in the code seems to allow this kind of update ... Ideally, it should follow the current ESR Firefox ...

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch "https://git.weboob.org/llange/weboob.git" "edf-fix-useragent"
git checkout -b "llange/weboob-edf-fix-useragent" FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "origin/master"
git merge --no-ff "llange/weboob-edf-fix-useragent"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: weboob/weboob!480