This support forum is no longer in use. Please use the Cloudinary Community at https://community.cloudinary.com/ to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

error: {message : 'Stale request'

Comments

8 comments

  • Avatar
    Nitzan Jaitman

    Hi Emmanuel,

     

    Getting the "Stale request" error usually means that either your computer's clock is in the past or the timestamp was not calculated in GMT. See this post for more information.

     

    Let me know if this helps.

    Nitzan

     

    0
    Comment actions Permalink
  • Avatar
    emmanuel

    thanks for the reply. I don't understand. I'm currently in Ghana; does that mean I need to reset my clock to a different time? 

    0
    Comment actions Permalink
  • Avatar
    Nitzan Jaitman

    Hi Emmanuel,

     

    You don't need to change your computer's clock.

    The Api calls to Cloudinary should have a timestamp parameter with the current unix time in gmt. The error you received means that the timestamp you set in your request was too old (or perhaps in a local time zone instead of gmt)

    If you are sure the timestamp you sent is correct and you can't get it to work please submit a support request, I will go over you account logs and find where the problem is.

     

    Regards, 

    Nitzan

     

     

     

    0
    Comment actions Permalink
  • Avatar
    charlie

    Hi Nitzan,

     

    How to specify a timestamp on request?

    Here is the .net code:

    var uploadResult = new ImageUploadResult();

    if (file.Length >0)
    {

    using (var stream = file.OpenReadStream())
    {
    var uploadParam =newImageUploadParams()
    {
    File = new FileDescription(file.Name, stream),
    Transformation = new Transformation().Width(500).Height(500).Crop("fill").Gravity("face")
     
    };

        uploadResult = _cloudinary.Upload(uploadParam);
    }
    }
     
    Thanks,
    Charlie
    0
    Comment actions Permalink
  • Avatar
    Shirly Manor

    Hi Charlie, You don't need to set it in the code, we are taking it from your server.

    0
    Comment actions Permalink
  • Avatar
    charlie

    Hi Shirly,

    I was just running it in my local machine. My machine datetime is Dec 9, 2018 2:31AM  CST. and here is my error

    {{
    "error": {
    "message": "Stale request - reported time is 2018-12-09 07:31:11 +0000 which is more than 1 hour ago"
    }
    }}

    0
    Comment actions Permalink
  • Avatar
    Shirly Manor

    Hi Charlie,

    The timestamp should be calculated in GMT.

    Can you please open a support ticket at support@cloudinary.com with your cloud name for further investigations.

    Thanks,

    Shirly

    0
    Comment actions Permalink
  • Avatar
    nyola mike

    I had the same error and slept off trying to configure my docker-machine with several commands, in the morning ...

    What worked for me was to go to the time setting of my MacBook air and set my time zone to Botswana and the first day of the week as Monday, Then checked to set time automatically.

    Once I did that and tried to send a request to my local PHP backend, the upload was successful.

     

     

    0
    Comment actions Permalink

Post is closed for comments.