Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Log text response #845

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Log text response #845

merged 1 commit into from
Jan 5, 2024

Conversation

mkmer
Copy link
Contributor

@mkmer mkmer commented Jan 5, 2024

Description:

Refactor validate_response() to dump text if found in JSON response.

Related issue (if applicable): fixes #

Checklist:

  • Local tests with tox run successfully PR cannot be meged unless tests pass
  • Changes tested locally to ensure platform still works as intended
  • Tests added to verify new code works

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (3bde710) 99.86% compared to head (0309e7b) 99.72%.

Files Patch % Lines
blinkpy/auth.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #845      +/-   ##
==========================================
- Coverage   99.86%   99.72%   -0.14%     
==========================================
  Files           8        8              
  Lines        1464     1467       +3     
==========================================
+ Hits         1462     1463       +1     
- Misses          2        4       +2     
Flag Coverage Δ
unittests 99.72% <60.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mkmer
Copy link
Contributor Author

mkmer commented Jan 5, 2024

Sorry about all of the "acitivity" on the PR's. I think this will be the last logging effort - at least we will see what the message is that Blink doesn't like.
For me at the moment, Blink is returning a 406 with no body (but text encoded). It really looks like they are having issues with the backend yet my app still seems to work fine. Maybe time to re-look at what the latest android app is using for end points.

@fronzbot
Copy link
Owner

fronzbot commented Jan 5, 2024

One thought I have (since the app works fine) is that maybe the user agent we're sending is causing issues. That has not been updated in a long time

DEFAULT_USER_AGENT = (
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/71.0.3578.98 Safari/537.36"

@fronzbot fronzbot merged commit 3a30666 into fronzbot:dev Jan 5, 2024
@mkmer mkmer deleted the more-loging branch January 5, 2024 20:03
@mkmer
Copy link
Contributor Author

mkmer commented Jan 5, 2024

I'll see if I can get android emulator running again with MITM, it's a huge pain because you have to patch the app to bypass cert pinning. It's going to take some time for this one :(

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants