Getting Please check the 'exp' claim Exception

回答済み
新規投稿

コメント

10件のコメント

  • Murtza

     This error happens when the Unix time on your local machine and the Box server are out of sync. 

     

    To fix this error, update the Unix time on your machine to match the Unix time from this site. Then retry your request to generate the App User access token.

     

    Please let me know if that fixes the error?

    0
    コメントアクション Permalink
  • Datta

     Thanks for your reply. I am a bit confused where I can update the unix time, I am using windows environment. And I have never faced this issue before in the server where it was running fine from few months.

    0
    コメントアクション Permalink
  • Datta

    ,

     

    Thanks for the solution, that actually worked for us. But I have another query, If my servers are in different time zone and I shouldnot change the time on the server machine where my Bo code is running then how can I fix this issue.

    0
    コメントアクション Permalink
  • narendraN

    HI ,

     

    how do you fix this isssue  in windows environment , i am similar issue .

     

    Thanks,

    Narendra 

    0
    コメントアクション Permalink
  • fpxdevs

    I'm getting this error only during deployment, which is confusing.  We use the Box client as a custom storage backend for a Django-based app, and in the initialization stages, Django seems to be creating instances of the client.  Since the client is coded as recommended in the Python SDK documentation:

     

    from boxsdk import JWTAuth
    
    auth = JWTAuth(
        client_id='YOUR_CLIENT_ID',
        client_secret='YOUR_CLIENT_SECRET',
        enterprise_id='YOUR_ENTERPRISE_ID',
        jwt_key_id='YOUR_JWT_KEY_ID',
        rsa_private_key_file_sys_path='CERT.PEM',
        store_tokens=your_store_tokens_callback_method,
    )
    
    access_token = auth.authenticate_instance()
    
    from boxsdk import Client
    
    client = Client(auth)

     

    , a call to "authenticate instance" happens during this initialization process.  Only during deployment does this "Please check the 'exp' claim" error happen and we get build failures as a result.  All subsequent requests to the Box client are successfully authenticated, so I don't believe a Unix system clock issue could explain this. 

    0
    コメントアクション Permalink
  • rbratton

    I don't know if you solved your issue on a Windows system, but I'll go ahead and post what I did in case someone else has a similar problem.

     

    I was a bit confused with the Unix-centric response, but once I realized we are just dealing with Internet time-syncing and could see that the computer running my Box app was about 30+ seconds out of sync, it became clear.

     

    What I do is (if possible) get on the computer which is showing the 'exp' claim exception and open a browser to https://www.time.gov/ which is the NIST sponsored time server.  Check the time displayed in the browser with the local time on your computer (hopefully, displayed in the tray).  At a new minute, both times should change within a second or two.  If your computer is out of sync by more than a few seconds, ensure Windows is using a timeserver to get the current time and make sure it updates regularly.  Windows will sometimes fail to tell you it hasn't connected with its designated timeserver in a while, so sometimes you need to "kick start it".  I have 3 desktop computers, a Comcast cable box, and an iPhone -- all are in sync within about a second, so it's not that hard.  If you have any questions, I'll try to help.

    0
    コメントアクション Permalink
  • HarishaAchar

    This worked for me. Thanks 

    0
    コメントアクション Permalink
  • Al41

    I know this post is a bit old, but it did help me solve the same problem.

    My clocks were < 1 minute but > 30 seconds. I checked time.gov and adjusted my server time to match then my Box connection was successful.

    Thanks for the post.

    0
    コメントアクション Permalink
  • AlbertoDaniel

    I know this is an old issue, but I have the same problem but I can't make it work. I tried sync with windows time server but I get an error every time I try

    0
    コメントアクション Permalink
  • Kumar Thirumalai

    My clock where your clock is off by: 58 second when checked time.gov. Reset date and time auto. in my mac and checked again time.gov, the time off changed to +0.108 s. Then its good to connect box.

    0
    コメントアクション Permalink

サインインしてコメントを残してください。