-
Notifications
You must be signed in to change notification settings - Fork 526
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
Execute and ExecuteAsync freeze when using Service Account #606
Comments
Ok may be it's not the appropriate place for this, I go on Stack Overflow. |
Thanks for reporting this. |
I am using VS2015 entreprise in an Orchard CMS project (MVC like) using framework 4.51 (we expect to go 4.5.2 soon). |
I made a small project, simply MVC, not Orchard and I have same problem. |
Have you tried this after #604 was fixed? It looks like this could be caused by the same issue. |
Yes I reloaded all the packages after cleaning my project. The assembly dependencies are solved but not my problem. |
I try thanks |
I am blocked by Visual Studio refusing this constructor It complains that the type BaseClientService.Initializer is defined in another assembly : Google.Api 1.9.2 , even with a reference to Google.Api 1.9.3 which contains the definition for BaseClientService.Initializer ???? I directly attached the Google VS projects to my project and took the references from the solution. Severity Code Description Project File Line Source Any idea ? |
As I can't see how to use the GitHub cloned code to generate the correct assemblies for my .Net 4.51 project, I reverted to using the Nuget package for 1.9.3 and overrided the methods modified by PR #612 in a derived class to add the ConfigureAwait(false);
Fiddler shows me that the OAuth2 token is received.... 2 little requests:
Still expecting some fix, thanks |
CSurieux, I'm sorry to hear that you are still struggling with a solution... I would try to use the latest GitHub assemblies (you will have to build them yourself), and change the app.config assemblies section, as in https://github.com/google/google-api-dotnet-client-samples/blob/master/Tasks.CreateTasks/app.config#L41 Just remember to include your own version number, I think it should solve the issue you mentioned before Please let us know. |
Well, I think that I have found the bug in the code. I don't know exactly how to solve this because it could depend on local threading conditions. |
It should work for you since there are already MVC and WPF samples, that Just to confirm, you are creating a ASP.NET MVC with Service Account? Thanks, On Sat, Oct 17, 2015 at 6:14 PM CSurieux notifications@github.com wrote:
Eyal |
Isn't this MVC code is 2 years old ? Does it works with package 1.9.3, I am not sure.
and do some duplicating for private methods then rewrite this as
where GetAccessTokenForRequest2Async is just a duplication of the ServiceCredential.GetAccessTokenForRequestAsync method. It works. |
I didn't check that with 1.9.3, sorry... Thanks, On Sat, Oct 17, 2015 at 6:48 PM CSurieux notifications@github.com wrote:
Eyal |
CSurieus, can you also try to change the following line I believe it might solve it. It is worth giving it a try. Thanks again, |
From what I read here, too many async/await/ConfigureAwait cascaded methods is playing with hell in MVC |
Replacing as you suggest is not valid for compiler. |
calling
The problem is somewhere else in the code, supposedly where the top-most level await is used with ConfigureAwait(false) - the user code that invokes the client library from the MVC controller should decide if the async call should resume in the same synchronization context, the library has no way of knowing that. |
Jan, I'm still not sure why did it work before 1.9.3. CSurieux, Can you also attach the calling code? Do you use ConfigureAwait(false) or not? I think you shouldn't by the way... Thanks! |
I totally agree but that's the only way I found to solve the issue for me. And I have something to deliver asap. My working code is just as indicated before, using
Which I agree is bad. |
Can you provide the callstack at the point where GetAccessTokenForRequest gets invoked? |
Sorry I was down for a long time due to crashed ssd on another project |
No worries. Any update on this one? We currently trying to solve it, but we need your help, since we can't really reproduce it. |
My code is an Orchard CMS module, I could share it on Bitbucket, would it be of any help for you ? |
CSurieux, please share your code, it can be very helpful... Jan, Do you think that http://stackoverflow.com/questions/33618284/google-calendar-api-not-returning-from-execute-c-sharp is related to this problem? Thanks, |
Another issue with Service Account: We should investigate it before releasing 1.10 |
Just to confirm that reverting the code back to 1.9.2 fixes for me as well. Anyone trying to also never the code will need to all related dependentAssembly from any app.config AND web.config files as bindingRedirect will try and force to use 1.9.3 if once upgraded. |
Do you use an installed app auth scenario? I just want to reproduce it myself, so I can start working on fixing it. Thanks, On Thu, Nov 12, 2015, 1:25 PM eddieyanez-immediate notifications@github.com
|
I just ran https://github.com/google/google-api-dotnet-client-samples/tree/master/Plus.ServiceAccount sample and it worked fine for me. I also created a ASP.NET sample that uses ServiceAccount and it works as well. Apparently I'm missing something. Please help me in reproducing it. Any sample code that currently stuck will be helpful. Thanks |
Create a new ASP.Net Web app using MVC and then install the Google.Apis.Admin.Directory_v1 Client library NuGet package. I will also install versions 1.9.2 of Google APIs Auth Client Library, Google APIs Client Library, and Google APIs Core Client Library. Add the following code inside a controller:
Here's a sample code for GoogleGroupMembershipAuthorisationHelper:
Run the solution, and the code should work fine. Then fire up the NuGet management window and go take a look under Updates. Google APIs Auth Client Library, Google APIs Client Library, and Google APIs Core Client Library will be listed. Update all three (these will be updated to versions 1.9.3). Run the solution. The code execution will hang when this line is called:
|
OK. Good news everyone!
eddieyanez-immediate@ nad others, I would be happy to see if you can check the latest version, by running the following:
Please verify it, then we can close this issue, and start working on new release that fixes this issue. Thanks! |
@peleyal Thanks Eyal for taking the time to test this thoroughly! Should we close this issue now? |
I prefer to leave it open for the next few days. I'm still waiting for someone (besides me) to test that it works as expected. |
Sorry guys, I've been caught up at work this week. I'll be testing this properly on Friday. |
No worries. Please keep us updated |
I'm closing this one. No one complained about it. I checked it myself and it seems to work now as I commented 11 days ago. |
Well done 1.10 solved my problem and I could reverse all the work around I had installed. |
Good to hear, thank you for keeping us updated! |
Config: all nugets for 1.9.3, even the one not visible from Visual Studio directly downloaded.
Last Calendar available which is 1.9.2.142.
I tried everything to connect on a fresh calendar: API Key, Cliend ID, Server Account. Nothing has been working. I correctly get the token but as soon as I try
EventsResource.InsertRequest request = service.Events.Insert(ev, calendarSettings.GoogleCalendarIds);
Event ev2 =request.Execute();
the execution freeze on Execute, nothing is sent.
So I reverted to 1.9.2 and there, the code is reduced, the only way to have it working is with ServerAccount using P12 certificate.
Has anybody succeeded with calendar and 1.9.3 ??? With which assembly config ?
The text was updated successfully, but these errors were encountered: