it this repository going to be affected by this? ( Version 3 of the Google Documents List API is nearly at an end. On April 20, 2015)
Closed this issue · 19 comments
Google Documents List API version 3.0
Warning: The deprecation period for Version 3 of the Google Documents List API is nearly at an end. On April 20, 2015, we will discontinue service for this API. This means that service calls to the API are no longer supported, and features implemented using this API will not function after April 20, 2015. You must migrate to the Drive API as soon as possible to avoid disruptions to your application.
direct link to source: https://developers.google.com/google-apps/documents-list/
GDataDB depends on https://www.nuget.org/packages/Google.GData.Spreadsheets/ (the library provided by Google), and GDataDB already uses the latest version.
Furthemore, Google.GData.Spreadsheets 2.2 already uses the v3 of the API: https://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/RELEASE_NOTES.HTML#60
Hi Mauricio,
Thanks for the feedback, but are you sure? When I start your sample app in the source code, it gives the exact same error as everybody is nagging about since the last 2 days when you are using the old API :-)
An unhandled exception of type 'Google.GData.Client.GDataRequestException' occurred in Google.GData.Client.dll
Additional information: Execution of authentication request returned unexpected result: 404
It happens here: “var feed = DocumentService.Query(new SpreadsheetQuery {TitleExact = true, Title = name });”
Regards,
Pieter
GDataDB already uses the latest version of https://www.nuget.org/packages/Google.GData.Spreadsheets/ , so there's not much I can do. Try talking to the maintainer of Google.GData.Spreadsheets about this.
hi, so just to confirm on this, it is not working now right? and lets say this is really the end of all this, do you have any suggestion on finding another similar solution or alternative to your project?
but if not it is fine, just want to say thank you for providing this feature! it really rocks!
Updates: it seems like the issue is with the login, it may require OAuth version 2.
@jc70417 I've already described what to do to fix it: contact the maintainer of https://www.nuget.org/packages/Google.GData.Spreadsheets/ , ask him to upgrade his library or ask him about migration paths.
Apparently there are two issues here:
- Implement OAuth ( #14 ) as the simple auth mechanism is no longer supported.
- Replace the documents list API (Google.GData.Documents?), probably with https://www.nuget.org/packages/Google.Apis.Drive.v2/ .
I think these are indeed 2 issues the code is currently having. Next question: is there somebody who has time available, understands the code and able to fix it? :-)
Yes please can anybody fix this?
Hi, was anybody yet able to solve this?What surprises me: the code in here (http://google-gdata.googlecode.com/svn/trunk) still works. but it used Google.GData.Spreadsheets 2.1.0.0 instead of 2.2.0.0?
Good news, I got a sponsor to fix this, so I'll be working on it. However the new Google libraries are .NET 4+ and my sponsor needs to keep compatibility with .NET 2 so it'll take some time...
This is amazing news! I started myself investigating the topic last week, and after many hours googling and trying I have the impression that this might be part of the answer: http://stackoverflow.com/questions/13664731/accessing-older-gdata-apis-spreadsheet-api-using-oauth-2-and-a-service-account
I don't want to push you, but just to have an idea on the timeline: Any idea when you are expecting a fix?
Work in progress: https://github.com/mausch/GDataDB/tree/oauth2-apis
Ended up removing the Google libraries altogether, they're just awful and a waste of time.
Most of the functionality is there, just need to add the missing ones, fix a couple of things and test it thoroughly.
Hi Mauricio,
FYI, I ran a quick test:
- downloaded the key.p12 as described here (http://webapps.stackexchange.com/questions/58411/how-where-to-obtain-a-p12-key-file-from-the-google-developers-console) and stored it in GDataDB\branches\oauth2-apis\Sample\bin\Debug\
- I changed the email-address "you@gmail.com" to the one I recevied when creating the key.p12 (something like 541542861466-blablablaru08gp2k7p2dvb93vk44p@developer.gserviceaccount.com)
- I ran the application, things goes well until line "var r = all.Count > 0 ? all[0] : t.Add(new Entity {Conteudo = "some content", Amount = 5});"
-> I receive an error there in Table.cs at line "var response = http.UploadString(listFeedUri, xml.ToString());" stating:
System.Net.WebException was unhandled
Message=The remote server returned an error: (400) Bad Request.
Source=System
StackTrace:
at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
at System.Net.WebClient.UploadString(Uri address, String method, String data)
at GDataDB.Impl.Table`1.Add(T e) in c:\NET Projecten\GDataDB\branches\oauth2-apis\GDataDB\Impl\Table.cs:line 50
at Sample.Program.Main(String[] args) in c:\NET Projecten\GDataDB\branches\oauth2-apis\Sample\Program.cs:line 20
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Hope this helps you.
Regards,
Pieter
@pietergent Thanks, I'm already aware of that. Writing to a new table doesn't work at the moment because I need to write the headers "manually", whereas something took care of that in the previous implementation.
Ok thanks! I've integrated with my application and keep on testing it.
I got another error stating "An unhandled exception of type 'System.NullReferenceException' occurred" when I call GDataDB.IDatabase.GetTable, but I could fix this by giving the client email access to the google spreadsheets.
It seems to be able to read, but not to update? I receive a "An unhandled exception of type 'System.NotImplementedException' occurred in GDataDB.dll"?
I've reimplemented all features now in the https://github.com/mausch/GDataDB/tree/oauth2-apis branch.
Anyone interested should give it a try. I'll release a beta soon.
Pushed to NuGet: https://www.nuget.org/packages/GDataDB/0.6.0
Hi, it seems to work in most cases, but for some rows I receive this error when doing an update: "The remote server returned an error: (412) Precondition Failed.". No clue yet why I receive this error for some rows and not for others :-/
System.Net.WebException was unhandled
HResult=-2146233079
Message=The remote server returned an error: (412) Precondition Failed.
Source=System
StackTrace:
at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
at System.Net.WebClient.UploadString(Uri address, String method, String data)
at GDataDB.Impl.Row`1.Update() in c:\prg\GDataDB\GDataDB\GDataDB\Impl\Row.cs:line 24
@pietergent please create a separate specific issue for that.