Forum Discussion

Tom N.16's avatar
Tom N.16
New member | Level 2
11 years ago

-34018 Client has neither application-identfier nor keychain-access-groups entitlements

When attempting to initiate oAuth with our in production app, I'm receiving this error below.  Have not had an issue with this until today.

SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))

 

Any help would be appreciated.

8 Replies

  • Tom N.16's avatar
    Tom N.16
    New member | Level 2
    11 years ago

    Full error...

     

    Error Domain=ASMHttpConnectionDomain Code=401 "Connection Error" UserInfo=0x3ba6ba0 {NSLocalizedRecoverySuggestion=unauthorized, Www-Authenticate=OAuth realm="https://api.dropbox.com/", Server=nginx, Transfer-Encoding=Identity, Connection=keep-alive, X-Dropbox-Request-Id=af86d3f0f923b0e2b184ca53918f429d, Content-Type=application/json, Date=Wed, 09 Sep 2015 17:24:45 GMT, NSLocalizedDescription=Connection Error}

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    This 401 Unauthorized error should indicate that the oauth_signature is invalid, and I can't reproduce the error with a test implementation of OAuth 1 HMAC-SHA1 signing here. 

    HMAC-SHA1 signatures are intentionally opaque though and difficult to debug though. That being the case, we recommend using PLAINTEXT signing instead:

    https://www.dropbox.com/developers/blog/20/using-oauth-in-plaintext-mode

    Switching to PLAINTEXT would likely be the easiest solution. If you need to debug the HMAC-SHA1 signing though, please share the relevant code so we can take a look.

     

  • Tom N.16's avatar
    Tom N.16
    New member | Level 2
    11 years ago

    I'm not sure what changed.  We have several desktop apps that we publish on Mac and Windows and they all started failing oauth today.  Can't go Plaintext plus we would have to go back and update a lot of different products and versions.  I'll see about getting some code but I would think it would be something on the API oauth side that changed since this has been working for years and is failing on old versions as well as new of our apps.

  • Tom N.16's avatar
    Tom N.16
    New member | Level 2
    11 years ago

    Not sure if this is going to help at all given nothing changed on our end but this is what we use on Mac.  Our windows apps are failing oauth as well though.

    BTW - thanks so much for your help.

     

    We use the openssl library on mac
     
    static CPString GenerateSignature(CPString Key, CPString Value)
    {
        CPData keyData = Key;
        CPData valueData = Value;
        HMAC_CTX hmacContext;
        HMAC_CTX_init(&hmacContext);
        HMAC_Init_ex(&hmacContext, keyData.Bytes(), keyData.Length(), EVP_sha1(), NULL);
        HMAC_Update(&hmacContext, reinterpret_cast<const unsigned char*>(valueData.Bytes()), valueData.Length());
        unsigned char hashResult[EVP_MAX_MD_SIZE];
        unsigned int  hashResultLength;
        HMAC_Final(&hmacContext, hashResult, &hashResultLength);
        return CPBase64Encoder::EncodeData(CPData::DataWithBytesOfLength(hashResult, hashResultLength));
    }
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    (That is, like the one in your second post, but including your key so we can try to compare.)

  • Tom N.16's avatar
    Tom N.16
    New member | Level 2
    11 years ago

    Thanks Gregory.  I'll post up via a API ticket given the key in the sample request.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!