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

Logging in with email address fails, username succeeds #35

Closed
tdryer opened this issue Nov 10, 2014 · 12 comments
Closed

Logging in with email address fails, username succeeds #35

tdryer opened this issue Nov 10, 2014 · 12 comments
Labels

Comments

@tdryer
Copy link
Owner

tdryer commented Nov 10, 2014

@gabx reported in #33 that logging in with an email address fails, but using just a username succeeds.

@tdryer
Copy link
Owner Author

tdryer commented Nov 27, 2014

To clarify this issue, logging in with an email address should work, but for some reason it doesn't in this case, which I haven't been able to reproduce.

tdryer added a commit that referenced this issue Dec 24, 2014
As well as being less code, this implementation should be more reliable.

Possibly fixes #35 and #43.
@tdryer
Copy link
Owner Author

tdryer commented Dec 24, 2014

@gabx

There's a new auth implementation on the robobrowser-auth branch that might be more reliable. Switching to this branch will require a re-install because of dependency changes.

If it still doesn't work, try logging in from python -m hangups.auth and post the log output from stdout.

@fiiim
Copy link

fiiim commented Jan 5, 2015

I got the same problem. Heres some of the output of python -m hangups.auth:

DEBUG:requests.packages.urllib3.connectionpool:"GET /?pli=1 HTTP/1.1" 200 None
DEBUG:main:SecondFactor response: 200 https://myaccount.google.com/?pli=1
Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.4/site-packages/hangups/auth.py", line 199, in
print(get_auth_stdin('cookies.json'))
File "/usr/lib/python3.4/site-packages/hangups/auth.py", line 194, in get_auth_stdin
return get_auth(get_credentials_f, get_pin_f, cookie_filename)
File "/usr/lib/python3.4/site-packages/hangups/auth.py", line 170, in get_auth
_send_credentials(session, email, password, galx, get_pin_f)
File "/usr/lib/python3.4/site-packages/hangups/auth.py", line 82, in _send_credentials
_send_second_factor(session, get_pin_f(), timestamp, sec_token)
File "/usr/lib/python3.4/site-packages/hangups/auth.py", line 109, in _send_second_factor
raise GoogleAuthError('Second factor failed')
main.GoogleAuthError: Second factor failed

@tdryer
Copy link
Owner Author

tdryer commented Jan 5, 2015

@headfim Thanks. Can you try again with the latest version from the master branch?

@fiiim
Copy link

fiiim commented Jan 5, 2015

It fails on installing robobrowser.

@fiiim
Copy link

fiiim commented Jan 5, 2015

Searching for robobrowser==0.5.1
Reading https://pypi.python.org/simple/robobrowser/
Best match: robobrowser 0.5.1
Downloading https://pypi.python.org/packages/source/r/robobrowser/robobrowser-0.5.1.tar.gz#md5=83a63db75efa904b8a40502b14918c34
Processing robobrowser-0.5.1.tar.gz
Writing /tmp/easy_install-kmkf4zso/robobrowser-0.5.1/setup.cfg
Running robobrowser-0.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-kmkf4zso/robobrowser-0.5.1/egg-dist-tmp-wgma8him
Traceback (most recent call last):
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 106, in save_modules
yield saved
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 157, in setup_context
yield
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 201, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 232, in run
return func()
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 200, in runner
_execfile(setup_script, ns)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-kmkf4zso/robobrowser-0.5.1/setup.py", line 38, in
'Development Status :: 2 - Pre-Alpha',
File "/tmp/easy_install-kmkf4zso/robobrowser-0.5.1/setup.py", line 37, in
classifiers=[
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "setup.py", line 66, in
'hangups=hangups.ui.main:main',
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run()
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 376, in run
self.easy_install(spec, not self.no_deps)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 600, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 651, in install_item
self.process_distribution(spec, dist, deps)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 699, in process_distribution
[requirement], self.local_index, self.easy_install
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/pkg_resources/init.py", line 753, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/pkg_resources/init.py", line 1005, in best_match
return self.obtain(req, installer)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/pkg_resources/init.py", line 1017, in obtain
return installer(requirement)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 619, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 649, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 839, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1061, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1046, in run_setup
run_setup(setup_script, args)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 205, in run_setup
raise
File "/usr/lib/python3.4/contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 157, in setup_context
yield
File "/usr/lib/python3.4/contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 128, in save_modules
compat.reraise(new_cls, new_exc, tb)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 106, in save_modules
yield saved
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 157, in setup_context
yield
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 201, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 232, in run
return func()
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 200, in runner
_execfile(setup_script, ns)
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-kmkf4zso/robobrowser-0.5.1/setup.py", line 38, in
'Development Status :: 2 - Pre-Alpha',
File "/tmp/easy_install-kmkf4zso/robobrowser-0.5.1/setup.py", line 37, in
classifiers=[
File "/home/fim/.virtualenvs/hangups/lib/python3.4/site-packages/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'

@tdryer
Copy link
Owner Author

tdryer commented Jan 5, 2015

What version of pip are you using?

@fiiim
Copy link

fiiim commented Jan 5, 2015

archlinux, python 3.4 and pip 6.0.6

@tdryer
Copy link
Owner Author

tdryer commented Jan 5, 2015

You might have to downgrade to pip 1.5.x. It looks like pip 6 made a change that breaks some packages including robobrowser.

@tdryer
Copy link
Owner Author

tdryer commented Jan 5, 2015

Related pip issue: pypa/pip#2286

@fiiim
Copy link

fiiim commented Jan 5, 2015

pip install pip==1.5.4 did the trick and hangups works fine too.
A suggestion: is it possible to make use of googles app passwords as an option to two step passwords?

@tdryer
Copy link
Owner Author

tdryer commented Jan 6, 2015

Great, thanks for verifying.

Google restricts where application specific passwords can be used, so I'm not aware of a way hangups can log in with one.

@tdryer tdryer closed this as completed Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants