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

"bna new" fails #39

Open
radhaz opened this issue Nov 12, 2023 · 3 comments
Open

"bna new" fails #39

radhaz opened this issue Nov 12, 2023 · 3 comments

Comments

@radhaz
Copy link

radhaz commented Nov 12, 2023

Running the command "bna new" results in the following output

PS C:\Users\home> bna new
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Scripts\bna.exe_main
.py", line 7, in
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\bna\cli.py", line 180, in new
serial, secret = bna.request_new_serial(region)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\bna\http.py", line 86, in request_new_serial
response = client.enroll(encrypted_data)[8:]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\bna\http.py", line 41, in enroll
return self.post("/enrollment/enroll.htm", data=data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\site-packages\bna\http.py", line 28, in post
conn.request("POST", path, data)
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1041, in _send_output
self.send(msg)
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 979, in send
self.connect()
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 945, in connect
self.sock = self._create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 827, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 962, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 11001] getaddrinfo failed

@dgnuff
Copy link

dgnuff commented Dec 18, 2023

I know what's causing this. A quick run with WireShark shows that it's doing an address lookup for an A record for mobile-service.blizzard.com. That's configured in constants.py where the correct address should be mobile-service.battlenet.com

Please fix this and issue an update.

@Peter774
Copy link

It might be related to 2FA migration regards BattleNET newsletter from December 2023.
I've migrated my TOTP to BNET App on phone and codes still matches.
I hope we could use this app after January 2024.

@Foxtrod89
Copy link

Foxtrod89 commented May 29, 2024

@dgnuff I'm getting Could not connect: mobile-service.battlenet.com returned status 403

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

No branches or pull requests

4 participants