Closed jcus0006 closed 6 years ago
Nope, the OAuthTokenGenerator spins up a webserver that listens on that port, so it handles that request and display a MessageBox with the configuration. So, switch back to the application and you should see the configuration.
Why was the issue closed? I have not found a solution yet. The OAuthTokenGenerator.exe application closes so I cannot return back to the application to see the configuration. Any idea why this might happen?
Sorry, I didn't realize that you weren't able to generate the tokens. It's a Winform application, so it closes only if you either close it, or it crashes.
Does the main dialog close itself when you click the OK button, but spin off the browser too?
I click OK, it redirects to the browser and the 8080 port is not found so I get the error in the browser (as explained in the question), the app seems to close on its own (it seems to disappear from the taskbar), so obviously cannot revert to it in time to see any details.
On Tue, May 15, 2018, 5:50 PM Anash P. Oommen notifications@github.com wrote:
Sorry, I didn't realize that you weren't able to generate the tokens. It's a Winform application, so it closes only if you either close it, or it crashes.
Does the main dialog close itself when you click the OK button, but spin off the browser too?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googleads/googleads-dotnet-lib/issues/164#issuecomment-389217131, or mute the thread https://github.com/notifications/unsubscribe-auth/AOOwofQH1eW_1E9wNW723qTkMREBOYFWks5tyvk9gaJpZM4T-sEz .
I checked again, these are the steps:
1) In the Adwords API / Lib folder I open the OAuthTokenGenerator.exe file 2) I insert the client ID and secret and choose the Adwords API option 3) I click OK. The browser opens up with the account options. I choose the option I want. 4) The .exe window closes, and the browser tab redirects to this error:
This site can’t be reached localhost refused to connect. Search Google for localhost 8080 ERR_CONNECTION_REFUSED
Any help would be appreciated as I am stuck.
Is there another application running on port 8080? That's the most likely suspect, so OAuthTokenGenerator crashes when attempting to open port for local webserver.
I've pushed a newer version of the library, but that converts this application to a console application. The instructions are similar. Could you try with that version to see if the issue goes away?
I've just downloaded the new binary distribution v23.4.0
When I try run the new (dot net core) OAuthTokenGenerator console app, I get this.
C:\dev\Tutorials\Adwords\adwords_dotnet_lib_v23.4.0\lib>dotnet OAuthTokenGenerator.dll
Error:
An assembly specified in the application dependencies manifest (OAuthTokenGenerator.deps.json) was not found:
package: 'Google.Apis.Auth', version: '1.33.1'
path: 'lib/netstandard1.3/Google.Apis.Auth.PlatformServices.dll'
If I clone repo and build OAuthTokenGenerator from src it runs ok.
One small thing, when you have to enter yes/no, I initially just entered 'y' and 'n', force of habit lol This meant my scope param was null and I was redirected to a 400 error page. It might be nice to check for just 'y' and 'n' as well as ''yes' and 'no'
Yeah, I was about to suggest to enter "yes" instead of "y". I'll enhance that part, and also publish the OAuthTokenGenerator as an exe instead of the DLL.
Fixed in 23.5.0
At the last bit it redirects to a link that starts like this: http://localhost:8080/?code=4/AADn-oYSjybfr.....
I did not configure any endpoint to redirect to, as there was nowhere specified within the instructions:
https://github.com/googleads/googleads-dotnet-lib/wiki/Using-OAuthTokenGenerator
Can someone kindly clarify if I missed some step?