0
Answered

GoogleApps Error - Stream was not readable

Monash 7 years ago in UNIFYBroker/Google Apps updated by anonymous 7 years ago 11

Hi

Today we are seeing the following error in gapps contacts and calendar

20150602,23:59:55,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed.
Change detection engine import all items for connector gappsCalendarConnector failed with reason Stream was not readable.. Duration: 00:00:00.7488192
Error details:
System.ArgumentException: Stream was not readable.

20150602,23:59:55,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed.
Change detection engine import all items for connector gappsSharedContactConnector failed with reason Stream was not readable.. Duration: 00:00:00.6240160
Error details:
System.ArgumentException: Stream was not readable.

Our developer has tested the fim-svc credentials with oauth 2.0 and he says the credentials are fine.

We are seeing this in our DEV and QAT google environments.. but not with users..
Any idea on what is causing this?

Now there is a new error.. 404.. Our dev when he testing simple oauth bind worked fine for him..

20150603,02:59:42,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed.
Change detection engine import all items for connector gappsCalendarConnector failed with reason Execution of authentication request returned unexpected result: 404. Duration: 00:00:00.7890928
Error details:
Google.GData.Client.GDataRequestException: Execution of authentication request returned unexpected result: 404
at Google.GData.Client.Utilities.getAuthException(TokenCollection tokens, HttpWebResponse response)
at Google.GData.Client.Utilities.QueryClientLoginToken(GDataCredentials gc, String serviceName, String applicationName, Boolean fUseKeepAlive, IWebProxy proxyServer, Uri clientLoginHandler)
at Google.GData.Client.GDataGAuthRequest.QueryAuthToken(GDataCredentials gc)
at Google.GData.Client.Service.QueryClientLoginToken()
at Unify.Product.IdentityBroker.GoogleAgent.GetCalendarResourceService(String googleDataDomain, String googleDataUsername, String googleDataPassword)
at Unify.Product.IdentityBroker.GoogleAgent.<CalendarGetPages>d__23.MoveNext()
at Unify.Product.IdentityBroker.GoogleCalendarConnector.<GetAllEntities>d__15.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Unify.Framework.Collections.ActionOnExceptionEnumerator`1.MoveNext()
at Unify.Framework.Collections.EnumerableExtensions.<ActionOnLast>d__19`1.MoveNext()
at Unify.Framework.Collections.EnumerableExtensions.<ProduceAutoPages>d__a`1.MoveNext()
at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.Visit()
at Unify.Framework.Visitor.VisitEvaluateOnThreadPoolT(IEnumerable`1 visitCollection, Action`2 visitor, Int32 maxThreads)
at Unify.Framework.Visitor.VisitEvaluateOnThreadPoolT(IEnumerable`1 visitCollection, Action`1 visitor, Int32 maxThreads)
at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetection(IEnumerable`1 connectorEntities)
at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.ImportAllChangeProcess()
at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.RunBase()
at Unify.Framework.JobBase.Run()
at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
at Unify.Product.IdentityBroker.ConnectorJobExecutor.<>c_DisplayClass29.<Run>b_27()
at Unify.Framework.ActionJob.RunBase()
at Unify.Framework.JobBase.Run()
at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)",Normal

Looks like Google have broken the API https://code.google.com/p/google-gdata/issues/detail?id=716 without providing any information on a path forward. From what I've read we might be able to get it working with pretty minimal changes by swapping the authentication routine to do the same thing as the other connectors (e.g. user).

Beau Harrison, please investigate whether we can use the authentication routine of the other connectors and inject the resultant token into the contact API. There are details here.

Hi Monash, we're about 10 minutes from being able to test if the change has worked. Once we're happy with it we'll push out a new version. I'll keep you updated.

Thanks.

Hi Monash, we were able to connect. I will do up a new version in the morning as there are a few things to clean up now that it's not using the data username/password.

Thanks.

Hi Monash,

I have uploaded a development version to SUBIDBGA:Downloads (v4.1.2.12). It's a development version because there's a point that will need testing again, which is the CAPTCHA exception on MONASH-55. It's come up again because the authentication routine has completely changed, so I'm not sure whether it'll trigger the same issue again.

Required configuration changes:

  • None.

Required service account changes:

Please let me know if there are any issues.

Hi Adam

The new build works. we are able to import contacts / calendar.

Will need to test for CAPTCHA issue

Also will this change in google API affect repermissioning module?

Huu Tran, will the re-permissioning module be affected by this issue? Google appears to have shut down https://www.google.com/accounts/ClientLogin.

Waiting on Huu to confirm

SitePermission is using GDATA v2.2 and I think it is affected. However, in the latest test in the last week, there was no such error. I recommend Monash to re-test the module in the wake of this event and raise appropriate JIRA tickets for any issue arisen.

Regards,
Huu

If you are using a module which is being closed by Google, shouldn't you change it to a more latest API? I can test now and not broken but what if it breaks in a week becuse as you say it is going to be affected?? maybe google is doing a gradual rollout of deprecation?