Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix Login crash (May 2017). Add USER_AGENT setting. #40

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

chris001
Copy link

@chris001 chris001 commented May 22, 2017

Use the plain HTML version of the LOGIN page.
Add USER_AGENT setting, defaults to a Firefox browser.
@Geremia
Copy link

Geremia commented Jun 6, 2017

Using EspaceNetworks:master, I still can't login.

@chris001
Copy link
Author

chris001 commented Jun 6, 2017

@Geremia What's the full text of the error message?

@Geremia
Copy link

Geremia commented Jun 7, 2017

@chris001 Here's the output (email address changed to preserve my identity):

$ gvoice
DEBUG:PyGoogleVoice:e.com/ServiceLogin?continue=https://www.google.com/voice&rip=1&nojavascript=1&followup=https://www.google.com/voice&service=grandcentral&ltmpl=open&flowName=GlifWebSignIn&flowEntry=Identifier? - {'Content-type': 'application/x-www-form-urlencoded;charset=utf-8', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36'}
DEBUG:PyGoogleVoice:e.com/signin/challenge/sl/password?service=grandcentral&continue=https://www.google.com/voice/redirection/voice&followup=https://www.google.com/voice&ltmpl=open?Passwd=thdhcvozwixhajhc&gxf=AFoagUW1t6SRtgwASz5_kFsfbXI4q_iPcA%3A1496856471083&GALX=R6lgnq15e34&Email=myemail%40gmail.com - {'Content-type': 'application/x-www-form-urlencoded;charset=utf-8', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36'}
Login failed. Retry?[Y/n] 

I used an app password generated by Google.

Anything other logs I can report?

@chris001
Copy link
Author

chris001 commented Jun 7, 2017

This app was made before app passwords existed. It can currently sign in using your real password. I agree the app password would be a much more secure way to sign in, and it (probably) should work to sign in. Looking into it now.

@chris001
Copy link
Author

chris001 commented Jun 9, 2017

@Geremia What happens when you try to sign in on the web with your app password instead of your G account password. Does it work?

@Geremia
Copy link

Geremia commented Jun 9, 2017

@chris001 The issue was that I cannot have 2-factor authentication enabled and I must use the master password for the Google account. Is that expected?

@chris001
Copy link
Author

chris001 commented Jun 9, 2017

@Geremia It definitely works with the G account password. There's also a feature for SMS code (2-factor authorization) which I haven't tested - it used to work, maybe it still does.
Let me ask you - What happens when you try to sign in on the web site with your app password. Does login on the website work with your app password?

@iannesbitt
Copy link

@chris001 As far as I can tell, logging into the website with an app password does not work.

@chris001
Copy link
Author

@iannesbitt @Geremia
I suspect the App password works only when logging into the various G APIs for software, such as IMAP, POP3, SMTP, G Maps Geocoding, G Maps, etc. However we're using HTTP to communicate with GVoice as a real user with a browser would, so I think the Account password is the only one accepted by the web browser. Would be nice to get the App password to work. If you have any ideas to try, please share.

chris001 added 3 commits June 20, 2017 01:04
Remove GALX token. Was removed by GV from the page in june 2017.
In case users download the package, run it, and wish to submit changes, ignore the compiled python files.
pettazz#31
by @threynol
"Python 3 added a few keyword arguments to the get() method of ConfigParser. An error is generated in Config whenever ConfigParser tries to pass an argument to the get() method that Config's get() method does not support. (This occurs when the email and password are read from the .gvoice file.) This correction adds keyword arguments to Config's get() method and passes them through to ConfigParser's get() method so that these errors are avoided."
Tested and works in python 2.7.
@iannesbitt
Copy link

I may have missed this but is there a way to make the account password work with 2-step auth enabled?

@chris001
Copy link
Author

@iannesbitt
When you try to login with 2-step auth enabled on your G account, does it give you an error message? What does the error message say?

@iannesbitt
Copy link

iannesbitt commented Jun 21, 2017

@chris001
Using credentials entered live or from ~/.gvoice I just get the standard login failed message:
Login failed. Retry?[Y/n]

Perhaps I am missing a way to increase verbosity?

@chris001
Copy link
Author

@iannesbitt
The two-step auth is broken, and appears to need rewriting, in light of the major new version of GVoice.

Now is as good time as any to announce that I invite a everyone who is using this software and enjoying my recent bug fixes and feature additions, to visit my gofundme page, where anyone who is interested in supporting my serious efforts to fix and develop this software further, can make a contribution to help cover my running costs.

Thank you to everyone who will support. It's because of you that I can do this and make this software work again!

https://www.gofundme.com/espacenetworks-pygooglevoice

seansweda added a commit to seansweda/pygooglevoice that referenced this pull request Aug 18, 2017
pettazz#40 (commits)
  077b106 Fix LOGIN error. Add USER_AGENT.
  984e343 Use settings USER_AGENT
  f6f5df1 Add USER_AGENT setting.
seansweda added a commit to seansweda/pygooglevoice that referenced this pull request Jun 28, 2018
pettazz#40 (commits)
  077b106 Fix LOGIN error. Add USER_AGENT.
  984e343 Use settings USER_AGENT
  f6f5df1 Add USER_AGENT setting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants