Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
URGENT: Document uploads fail with status 400
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christoph Z.  
View profile  
 More options May 8 2010, 5:39 pm
From: "Christoph Z." <christop...@gmail.com>
Date: Sat, 8 May 2010 14:39:58 -0700 (PDT)
Local: Sat, May 8 2010 5:39 pm
Subject: URGENT: Document uploads fail with status 400
Hi,

I've posted this question already on the Document List API forum
(where it seems to belong), but just in case this is related to some
protocol changes which aren't implemented in the obj-c API yet, I'm
posting it here as well.

As of couple of days ago (or so), document uploads fail (most of the
time) with status 400. Occasionally they do succeed though, but very
rarely (at least today). I've tested couple of accounts and got
numerous support cases from users hitting this problem in our iPhone
app.

Here's an example of the request/response. This code worked without
any problems for months. Is this a know issue that's being
investigated? Has something changed that will require a code change?
Are there any workarounds?

Any help is much appreciated as this affects our users in production.

Thanks,
Christoph

:: REQUEST

POST URL:
http://docs.google.com/feeds/default/private/full/folder%3A0BzTjld1Cz...

{
    Accept = "application/atom+xml, text/xml";
    Authorization = "GoogleLogin auth=xxx";
    "Cache-Control" = "no-cache";
    "Content-Length" = 538;
    "Content-Type" = "multipart/related; boundary=\"END_OF_PART\"";
    "Gdata-Version" = "3.0";
    "Mime-Version" = "1.0";
    "User-Agent" = "GData-ObjectiveC/1.10 iPhone_Simulator/3.1.3
(gzip)";

}

--END_OF_PART
Content-Type: application/atom+xml; charset=UTF-8

<entry xmlns:gd="http://schemas.google.com/g/2005" xmlns:app="http://
www.w3.org/2007/app" xmlns:docs="http://schemas.google.com/docs/2007"
xmlns="http://www.w3.org/2005/Atom"><title>Bar</title><category
term="http://schemas.google.com/docs/2007#document" scheme="http://
schemas.google.com/g/2005#kind"/><published>2010-05-08T14:13:33-07:00</
published></entry>
--END_OF_PART
Content-Transfer-Encoding: binary
Content-Type: text/plain

Some text.
--END_OF_PART--

:: RESPONSE

status: 400

{
    "Cache-Control" = "private, max-age=0";
    "Content-Encoding" = gzip;
    "Content-Type" = "application/vnd.google.gdata.error+xml";
    Date = "Sat, 08 May 2010 21:15:58 GMT";
    Expires = "Sat, 08 May 2010 21:15:58 GMT";
    Server = GSE;
    "Transfer-Encoding" = Identity;
    "X-Content-Type-Options" = nosniff;
    "X-Frame-Options" = SAMEORIGIN;
    "X-Xss-Protection" = "1; mode=block";

}

<errors xmlns='http://schemas.google.com/g/2005'>
<error>
<domain>GData</domain>
<code>InvalidEntryException</code>
<internalReason>Could not convert document.</internalReason>
</error>
</errors>

--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objectivec-client@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-client+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gdata-objectivec-client?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Robbins  
View profile  
 More options May 8 2010, 7:10 pm
From: Greg Robbins <grobb...@google.com>
Date: Sat, 8 May 2010 16:10:47 -0700
Local: Sat, May 8 2010 7:10 pm
Subject: Re: URGENT: Document uploads fail with status 400

Your upload is being done with the older multipart MIME upload protocol,
rather than the newer chunked protocol, but the old protocol should continue
to work.

When I try to reproduce this with the DocsSample application, I'm seeing
timeouts (CFNetwork error -1001). With the library's automatic retry on, and
under chunked uploads, the library's retry attempt is correctly requesting
the position from which to upload the next chunk (a PUT with
header Content-Range = "bytes */7") and the upload server is sending back
the status 400, "Could not convert document"

With chunked uploads disabled, as is shown in your message (that is, the
upload body is multipart/related), I'm just seeing the timeout, CFNetwork
error -1001. The library can't successfully retry multipart uploads because
it builds them with NSInputStream, but that doesn't affect chunked uploads.

In any case, I suspect you're seeing a problem with timeouts from the
server. Does that mesh with your http logs of the problem?

--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objectivec-client@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-client+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gdata-objectivec-client?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Robbins  
View profile   Translate to Translated (View Original)
 More options May 8 2010, 7:31 pm
From: Greg Robbins <grobb...@google.com>
Date: Sat, 8 May 2010 16:31:22 -0700
Local: Sat, May 8 2010 7:31 pm
Subject: Re: URGENT: Document uploads fail with status 400

I've opened a bug internally for the Docs API team (2669039).

--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objectivec-client@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-client+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gdata-objectivec-client?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Robbins  
View profile   Translate to Translated (View Original)
 More options May 8 2010, 7:38 pm
From: Greg Robbins <grobb...@google.com>
Date: Sat, 8 May 2010 16:38:03 -0700
Local: Sat, May 8 2010 7:38 pm
Subject: Re: URGENT: Document uploads fail with status 400

This is on the public issue tracker as
http://code.google.com/p/gdata-issues/issues/detail?id=2061

Plus add a star to that issue to be notified of changes.

--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objectivec-client@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-client+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gdata-objectivec-client?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoph Z.  
View profile  
 More options May 8 2010, 11:17 pm
From: "Christoph Z." <christop...@gmail.com>
Date: Sat, 8 May 2010 20:17:26 -0700 (PDT)
Local: Sat, May 8 2010 11:17 pm
Subject: Re: URGENT: Document uploads fail with status 400
Hi Greg,

Thanks for the follow up. Most of the time when I hit this issue, I
was getting status 400, however I've seen timeouts (-1001) as well.

Here are the relevant chunks of code which demonstrate precisely how
we upload text files. By the way, since these are typically short
notes (taken on an iPhone), we decided against chunked uploads to
reduce the number of server round-trips.

    GDataServiceGoogleDocs* service = [[[GDataServiceGoogleDocs alloc]
init] autorelease];

    [service setUserAgent:kGoogleUserAgent];
    [service setShouldCacheDatedData:NO];
    [service setServiceShouldFollowNextLinks:YES];
    [service setIsServiceRetryEnabled:YES];
    [service setServiceUploadChunkSize:0];
    [service setUserCredentialsWithUsername:username
password:password];

    // ...

    remoteEntry = [GDataEntryStandardDoc documentEntry];
    [remoteEntry setTitleWithString:title];
    [remoteEntry setPublishedDate:[GDataDateTime
dateTimeWithDate:localDocument.date timeZone:calendar.timeZone]];
    [remoteEntry setUploadData:uploadData];
    [remoteEntry setUploadMIMEType:@"text/plain"];

    postURL = [[self.syncedFolderFeed postLink] URL];

    self.ticket = [service fetchEntryByInsertingEntry:remoteEntry
forFeedURL:postURL delegate:self

didFinishSelector:@selector(remoteInsertTicket:finishedWithEntry:error:)];

Have a great day!
-Christoph

On May 8, 4:10 pm, Greg Robbins <grobb...@google.com> wrote:

--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objectivec-client@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-client+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gdata-objectivec-client?hl=en.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »