google / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
135 stars 111 forks source link

DocList API Java Client: copying a Google Apps doc fails on larger/more complex docs using GData API #349

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Instantiate and provide credential to a valid GData DocsService (see 
attached script method provideDocsClient())
2. Get DocumentListFeed for using the DocsService (see attached script method 
getDocListFeed)
3. Locate Google Apps doc entry to copy using the DocumentListFeed
4. Copy Google Apps doc entry (see attached script method copyGoogleDoc())

What is the expected output? What do you see instead?
Expected:
The expected out is a duplicate Google Apps doc (with a different name)with 
identical content as the original Google App doc in user's doc list, every time.
Actual:
On smaller, less complex Google Apps doc copy (doc, spreadsheet, presentation), 
this method works most of the time (occasional hiccup).  However, on some 
large/more complex Google Apps docs, this copy operation fails consistently, 
with the following exception:

com.google.gdata.util.ServiceException: An unknown error has occurred.
<errors 
xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>Serv
iceException</code><internalReason>An unknown error has 
occurred.</internalReason></error></errors>

On failure, a "copy" Google Apps doc sometime appears in document list with 
either the same name or a doc name which starts with "Copy of [original doc 
name]".  Opening and visually inspecting the content of this file shows junk 
content.

What version of the product are you using? On what operating system?
- gdata-samples.java-1.45.0
- Oracle J2SE jdk1.6.0_25
- Windows 7 Home Premium 64-bit

Please provide any additional information below.

Here are 2 example Google Apps docs used in testing (publicly shared)

"Simple Presentation"  (copying this file works most of the time)
https://docs.google.com/present/edit?id=0AQXC4rVVtJhQZHdwdnNkbl8xNDEzZDZ3bXFtaGY
&hl=en_US

More Complex Presentation (copying this file fails consistently)
https://docs.google.com/present/edit?id=0AQXC4rVVtJhQZHdwdnNkbl8xNDE0aGJobm02Z2Q
&hl=en_US

Attached is a partial test script used to reproduce this bug.  The method used 
to copy Google Apps doc is copyGoogleDoc().  This method is constructed based 
on information in the Protocol Documentation -> 
http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html 
('Coping document' section).  This same method works or fails, depending on 
size/complexity of the source Google Apps doc.

Original issue reported on code.google.com by taop...@gmail.com on 16 Jun 2011 at 6:26

Attachments:

GoogleCodeExporter commented 9 years ago
I'm also seeing similar behavior in Python.

Original comment by ric...@onixnet.com on 16 Dec 2011 at 7:05

GoogleCodeExporter commented 9 years ago
I'm seeing this as well using the Python API. 

Original comment by jus...@cloudlock.com on 7 Feb 2012 at 6:11

GoogleCodeExporter commented 9 years ago
This is also a problem for us.  In addition, performing copy operations on the 
problem documents inside the Google docs interface also often results in 
unpredictable errors.

To date we have only seen this as a blocking issue on presentations, other 
failures have been recoverable, or the copy has succeeded after multiple 
attempts.

Original comment by andrew.s...@cloudsolutions.co.uk on 9 Aug 2012 at 4:31