-
Notifications
You must be signed in to change notification settings - Fork 61
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
Unable to authenticate with tools/credentials_builder.py #30
Comments
It's been a while since I used this script, but sounds like the RequestHandler is hanging. First thing I would do is add some debug print statements to the script inside of get_access_code_from_web_interface(...) and RequestHandler::OnResourceRedirect(...) to confirm its an issue with cefpython3. If that's not the issue you may be able to use the --access-code-out switch to dump the raw access code to a file. If it is an issue w/ cefpython3 you'll probably need to use a different approach to get the access code, which I see you tried w/ get-access-code.html. If TDA is blocking it you may need to delete the developer app and create a new one. If you are able to get the access code manually you can create the credentials file w/ creds_from_access_code.py |
So I was able to see (partially) what's going on. When using the --redirect-uri set to http://127.0.0.1 I was NOT able to get past the line I changed my app at TDA to use https://127.0.0.1 and then called credential_builder.py without the redirect-uri and with a print statement to print the code directly after the parse line. The code was printed, but it appears control was never returned from the RequestHandler because a print statement for the code after I was able to grab the code and then use creds_from_access.py to create a credential file. I was then able to reference that credential file when running the Java test at test/java/Test.java. Edit: I also tried using --access-code-out but it was hanging up before getting there. |
I'm trying to get a credential file saved but having trouble.
As it was suggested as the easiest method, I'm using the python/tools credential_builder.py.
I ran the dependencies
python setup.py install
(from project's python directory)and
pip install cefpython3
Then I tried the credentials_builder.py and after it brings up the dialog and I enter creds, do 2FA, allow all the things, click Allow and then I get a blank page in that window and the credentials file is never saved as my ~/tda-creds is still a zero byte file. I'm getting the following (had to kill it to get it to stop); I tried this three times, same result (G...I is my edited Consumer Key):
`➜ tools git:(master) ✗ python credential_builder.py --redirect-uri http://127.0.0.1 [email protected] ~/tda-creds re******
Library Path: N/A
Redirect URI: http://127.0.0.1
Client ID: [email protected]
Credential Path: /Users/myuser/tda-creds
Credential Password: re******
DevTools listening on ws://127.0.0.1:58598/devtools/browser/e8fe8456-08d9-4606-905f-b5c94c0af902
[0115/041242.037414:ERROR:BudgetService.cpp(160)] Unable to connect to the Mojo BudgetService.
[0115/041307.352655:ERROR:BudgetService.cpp(160)] Unable to connect to the Mojo BudgetService.
[0115/041309.341600:ERROR:BudgetService.cpp(160)] Unable to connect to the Mojo BudgetService.
[0115/041323.484688:ERROR:BudgetService.cpp(160)] Unable to connect to the Mojo BudgetService.
[0115/041341.099560:ERROR:BudgetService.cpp(160)] Unable to connect to the Mojo BudgetService.
^C`
My developer app at TDAmeritrade uses http://127.0.0.1.
I'm using Python 3.7.2. And I also built the library on MacOS (works great, btw) and installed it in /user/local/lib as both .so and .dylib (as the Java test/java/Test.java ends up looking for that extension on a Mac/Darwin; python finds the .so as seen above), not sure if that's an issue. Any idea what the issue is? Is this Mojo BudgetService an indicator of a problem?
I also tried opening tools/get-access-code.html in a browser but apparently I tried too many times with credential_builder.py as TDA says something like someone may be trying to log in to your account unauthorized; give us a call if you have questions.
The text was updated successfully, but these errors were encountered: