SOMETIMES亚马逊S3的iOS SDK照片上传错误 - SignatureDoesNotMatch [英] Amazon S3 iOS SDK Photo Upload Error SOMETIMES - SignatureDoesNotMatch

查看:1449
本文介绍了SOMETIMES亚马逊S3的iOS SDK照片上传错误 - SignatureDoesNotMatch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我的iPhone应用程序成功上传照片到Amazon S3。我用同样的code与最新版本(版本1.6.0)的S3Uploader示例项目亚马逊AWS SDK为iOS。现在的问题是间歇性,我会得到SignatureDoesNotMatch误差(我们计算请求签名不您提供的签名相匹配。请检查您的密钥和签名方法)。有没有模式了。目前,我的应用程序正在解决这个错误通过做一定量的重试的委托电话didFailWithError:

So my iPhone app successfully uploads photos to Amazon S3. I used the same code as the S3Uploader example project with the latest (ver 1.6.0) Amazon AWS SDK for iOS. The problem is intermittently I'll get the SignatureDoesNotMatch error (The request signature we calculated does not match the signature you provided. Check your key and signing method.). There's no pattern to it. Currently my app is working around this error by doing a certain amount of retries on the delegate call didFailWithError:.

因此​​,与我的测试远,有足够的重试次数,因此用户不会注意到错误,但它是非常令人沮丧的知道,我得到一个签名密钥错误时,我的签名显然是正确的,因为它工作的时候。我不知道这是否是一个URL编码错误(我的签名密钥中有一个+号),但因为我使用的是iOS的SDK我看不出怎么PUT网址的处理。

So far with my tests, there are enough retries so the user will not notice the error, but it is quite frustrating to know that I am getting a signature key error when my signature is clearly correct since it works at times. I am not sure if it is a url encoding error (my signature key has a + sign in it), but since I'm using the iOS SDK I don't see how the PUT url's are handled.

另外,我验证了我的桶的名字是全部小写,和我的文件名只是数字和一些字母。我也尝试过不同的地区,它们都具有相同的结果。总之它可以在任何地方从0重至5重试获得成功的PUT没有SignatureDoesNotMatch错误。有没有人也有类似的问题?任何帮助将大大AP preciated。感谢您的阅读。

Also, I verified that my bucket name is all lower case, and my filenames are just numbers and a few alphabet letters. I also tried different regions and they all have the same result. In short it can take anywhere from 0 retries to 5 retries for to get a successful PUT without the SignatureDoesNotMatch error. Has anyone had a similar issue? Any help would be greatly appreciated. Thanks for reading.

推荐答案

确定。因此,消费在过去几天尝试新的水桶......尝试各种不同的NSString编码/ UIImage的NSData的要声明...切换从嵌入式到TVM跳...从我的项目来回的TVM演示......和阅读后页面和调试输出页......我发现它无关,与任何这些! :P

OK. So after spending the last couple days trying new buckets...trying all different NSString encoding/UIImage to NSData statements...switching from embedded to TVM...hopping back and forth from my project to the TVM demo...and reading pages and pages of debugging output...I found out it has nothing to do with any of those! :P

有一次,我意识到我无意中复制了AWS框架到我的项目文件夹,我删除它们并重新添加它们而不复制选中复选框(参考我的SDK的文件夹)。轰 - ,没有更多的签名错误

Once I realized I had inadvertently copied the AWS frameworks into my project folder, I removed them and re-added them without the copy box checked (referencing to my SDK's folder). Boom - no more signature errors.

在AWS SDK显然不喜欢在一个系统中它的框架多个实例。希望这可以帮助别人! :)

The AWS SDK apparently doesn't like have multiple instances of its frameworks on one system. Hope this helps others! :)

这篇关于SOMETIMES亚马逊S3的iOS SDK照片上传错误 - SignatureDoesNotMatch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆