/1.1/statuses/home_timeline.json returning 404 for some users


#1

Hi,

An app for API1.1 has been released today.

Some users have reported 404 errors when updating the home timeline and Mentions timeline.
Based on these user reports, there are no problems with Messages and Lists.

Some users have also reported that things went back to normal if the account is re-certified after a while.
Please check if you have any problems.

e.g.
https://api.twitter.com/1.1/statuses/home_timeline.json?include_entities=1&count=100&include_rts=1&since_id=252980529492811776


#2

Thanks for the report – can you provide more details about the 404s you’re getting? Have you captured this error happening? Was it happening to specific users and not others? Are you sure they were 404 errors and not some other 40X error like 401?


#3

Thank you for your reply.

>Have you captured this error happening?
We can’t reproduce the bug.

But we have received error reports from over ten users.
And the number of users who updated yesterday is around 20,000.
There have been several of similar reports as reviews on App Store as well.

>Was it happening to specific users and not others?
It seems that it is happening to a specific, small number of users.
Some reported that the bug disappeared over time.

>Are you sure they were 404 errors and not some other 40X error like 401?
We are sure that the error code is 404, and the Content-Type is “application/json”.

The reason is that if the Content-Type was not “application/json” (e.g., “text/html”), then our app would display another error that is different from 404.

We assume that the following error is displayed to specific users:
{“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}


#4

HI,

“/1.1/statuses/statuses/mentions.json” now always returns 404 error.

Please see this images via https://dev.twitter.com/console .
http://janetter.net/tmp/error_01.jpg
http://janetter.net/tmp/error_02.jpg

Request:
GET /1.1/statuses/mentions.json HTTP/1.1
Authorization:
OAuth oauth_consumer_key=“",oauth_signature_method=“HMAC-SHA1”,oauth_timestamp=“1349406133”,oauth_nonce="-376557355",oauth_version=“1.0”,oauth_token="”,oauth_signature="**********************"
Host:
api.twitter.com
X-Forwarded-For:
10.203.10.109
X-Target-URI:
http://api.twitter.com
Connection:
Keep-Alive

Response:
HTTP/1.1 404 Not Found
X-Frame-Options:
SAMEORIGIN
X-Rate-Limit-Limit:
15
Date:
Fri, 05 Oct 2012 03:02:13 GMT
X-Transaction:
b04cf7913b8006e8
Content-Length:
68
X-Rate-Limit-Remaining:
14
X-Rate-Limit-Reset:
1349407033
Content-Type:
application/json; charset=utf-8
Connection:
close
Server:
tfe

{
“errors”: [
{
“message”: “Sorry, that page does not exist”,
“code”: 34
}
]
}

“/1/statuses/statuses/mentions.json” is operating normally.

Please check if you have any problems.


#5

Sorry, “/1.1/statuses/mentions.json” always returns 404 is our bug.

“/1.1/statuses/mentions_timeline.json” is right path.


#6

Yes, that seems like what the issue was. Glad you got it figured out.


#7

We’re switching over to the 1.1 API and now seeing this exact same problem (404 for statuses/home_timeline.json), but only for my account (@HumanCompiler and not the other 4 accounts we’ve tried). Is this some sort of API issue? I tried revoking access to the app and giving it again, but that didn’t help. I can’t think of anything else to try. Ideas?!?! Thanks!


#8

Can you share some details from the request that you’re getting a 404 on?

  • The exact URL you’re executing
  • The authorization header or OAuth parameters you are sending
  • The response you get back

#9

Hi,
I get a 404 when submitting a request against home_timeline as well. The error is

Twitter error, HTTP response: 404 <NSHTTPURLResponse: 0x1eea3370>
{“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}

I am able to consistently reproduce the issue on my account (haven’t tried others). The first request against home_timeline.json works fine (I am using TWRequest on iOS Simulator)

https://api.twitter.com/1.1/statuses/home_timeline.json?adc=phone&count=40&include_entities=1&application_id=com.yourcompany.YYY

Results are returned correctly with the request above. After this, if I try to submit a new TWRequest against the home_timeline, it always 404's until I quit and restart the app (in Simulator, I haven't tried on device as yet). Sample url's I have tried are with max_id and since_id set

https://api.twitter.com/1.1/statuses/home_timeline.json?adc=phone&include_entities=1&max_id=265501724784091136&application_id=com.yourcompany.YYY

https://api.twitter.com/1.1/statuses/home_timeline.json?adc=phone&include_entities=1&since_id=265552886791020544&application_id=com.yourcompany.YYY

I don’t think supplying max_id or since_id is causing the issue - as I get the 404 error in my tests, even if I submit the original query again at this point

https://api.twitter.com/1.1/statuses/home_timeline.json?adc=phone&count=40&include_entities=1&application_id=com.yourcompany.YYY

If I quit and restart the app, the first request again loads fine, with subsequent requests 404’ing.

Thanks
George


#10

Hi George,

Thanks for this report. It’s an odd one. Have you only ever experienced this when working with iOS’s TWRequest stack? Are you table to reproduce in any other environment?


#11

Hi Taylor,
I have only seen this with TWRequest (and again only with v1.1 of the API - v1 of the API seems to work fine). If I submit the request directly through apigee.com it doesn’t 404 - so, it may not be directly related to my account. For now, I’ve switched back to v1. Once I get my iOS dev account set up (might be a few weeks), I could try on device and see if it is any different. In the meantime, if there is anything else you would like me to try, just let me know

Thanks
George


#12

https://api.twitter.com/1/statuses/home_timeline.json works fine
https://api.twitter.com/1.1/statuses/home_timeline.json returns 404 error


#13

Can you provide a captured request-and-response cycle of getting a HTTP 404 on /1.1/statuses/home_timeline.json?


#14

Code snippet I’m using (still testing on simulator iPhone 6.0) …still haven’t been able to test on device

TWRequest *request = [[TWRequest alloc] initWithURL:self.baseURL
parameters:allParams
requestMethod:TWRequestMethodGET];
request.account = self.authenticatingAccount;

  NSLog(@"TWRequest: %@", request);
  NSURLRequest *urlRequest = request.signedURLRequest;
  NSLog(@"URL Request: %@", urlRequest);
  NSLog(@"URL Request string: %@", urlRequest.URL.absoluteString);
  [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error)
   {
       if ([urlResponse statusCode] == 200)
       {
           NSURL *url = [[NSURL alloc] initWithString:@""];
       }
       else {
           NSString *dataString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
           NSLog(@"Twitter error, HTTP response: %i %@\n %@", [urlResponse statusCode], urlResponse.debugDescription, dataString);
           //TODO display UI Alert of failure
           //TODO dismiss refresh bar if loadtype was refresh
           NSString *errorMessage = nil;
           if (urlResponse.debugDescription == nil)
               errorMessage = @"Could not connect";
           else
               errorMessage = urlResponse.debugDescription;
           
           [self informDelegatesOfError:[[NSString alloc] initWithFormat:@"Error - %@", errorMessage]];
       }
      [appDelegate setNetworkActivityIndicatorVisible:NO];
   }];

Response log
2013-01-18 17:18:23.855 Twittily[8045:c07] I restkit:RKLog.m:33 RestKit initialized…
Request works
2013-01-18 17:18:24.004 Twittily[8045:c07] RMTWNetworkedTableModel loadType: Initial
2013-01-18 17:18:24.009 Twittily[8045:c07] TWRequest: <TWRequest: 0x11933a10>
2013-01-18 17:18:24.013 Twittily[8045:c07] URL Request: <NSMutableURLRequest https://api.twitter.com/1.1/statuses/home_timeline.json?adc=phone&count=40&include_entities=1&application_id=com.yourcompany.Twittily>
2013-01-18 17:18:24.013 Twittily[8045:c07] URL Request string: https://api.twitter.com/1.1/statuses/home_timeline.json?adc=phone&count=40&include_entities=1&application_id=com.yourcompany.Twittily

Following request fails
2013-01-18 17:18:58.088 Twittily[8045:c07] RMTWNetworkedTableModel loadType: More
2013-01-18 17:18:58.185 Twittily[8045:c07] TWRequest: <TWRequest: 0xbca43f0>
2013-01-18 17:18:58.188 Twittily[8045:c07] URL Request: <NSMutableURLRequest https://api.twitter.com/1.1/statuses/home_timeline.json?adc=phone&include_entities=1&max_id=292204576424218624&application_id=com.yourcompany.Twittily>
2013-01-18 17:18:58.189 Twittily[8045:c07] URL Request string: https://api.twitter.com/1.1/statuses/home_timeline.json?adc=phone&include_entities=1&max_id=292204576424218624&application_id=com.yourcompany.Twittily
2013-01-18 17:19:00.027 Twittily[8045:491f] Twitter error, HTTP response: 404 <NSHTTPURLResponse: 0x14815940>
{“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}


#15

I’ll keep looking into this, thanks. Can you verify whether your HTTP layer is sending any cookies/session data along with the request? You may want to restrict that from happening.


#16

The only header I see on the request is the “Authorization” header for OAuth

NSDictionary *headers = request.signedURLRequest.allHTTPHeaderFields; for (id key in headers.allKeys) NSLog(@"%@=%@", key, [headers objectForKey:key]);

Authorization=OAuth oauth_nonce=“D4752B4C-153B-4C65-B3D4-8F5E8C11DD1F”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1358552315”, oauth_consumer_key="*****", oauth_token="", oauth_signature="", oauth_version=“1.0”

There aren’t too many options on TWRequest. So, unless it’s doing something in the background while actually sending the request, it seems to be ok


#17

Did anyone ever resolve this issue? I am seeing the same behaviour.


#18

I believe this issue to be fixed. Are you receiving this on requests to /1.1/statuses/home_timeline.json while leveraging an end user’s access token?


#19

Hi, i am also experiencing the same error although using a different URL.

Twitter sent status 404 for URL: 1.1/statuses/timeline.json using parameters …

I am currently using the twitter api for python (https://pypi.python.org/pypi/twitter) and i am using this code.

see “Authentication” section below for tokens and keys

t = Twitter(
auth=OAuth(OAUTH_TOKEN, OAUTH_SECRET,
CONSUMER_KEY, CONSUMER_SECRET)
)

Get your “home” timeline

t.statuses.home_timeline() # <- i am getting error on this line.

i already added all the tokens and keys.

Anyone know how to solve this problem?