cloudinary_ios
cloudinary_ios copied to clipboard
CredStore - Error copying matching creds
Bug report for Cloudinary iOS SDK
Describe the bug in a sentence or two.
When uploading an unsigned image, I receive a debug console message detailing a CredStore performQuery error. This occurs on every upload. When the uploadImage is executed, the error message is printed to the debug console. In most cases, the upload is still successful, in spite of the error message
Issue Type (Can be multiple)
[ ] Build - Can’t install or import the SDK [ ] Performance - Performance issues [ ] Behaviour - Functions aren’t working as expected (Such as generate URL) [ ] Documentation - Inconsistency between the docs and behaviour [x] Debug error
Steps to reproduce
import Cloudinary
import Foundation
class ImageService {
static let shared = ImageService()
private lazy var config: CLDCloudinary = {
let config = CLDConfiguration(cloudName: API.cloudName)
let cloudinary = CLDCloudinary(configuration: config)
return cloudinary
}()
public func uploadImage(publicId: String, imageData: Data) {
let params = CLDUploadRequestParams().setUploadPreset(API.cloudName).setPublicId(publicId).setFolder(API.folder)
config.createUploader().upload(data: imageData, uploadPreset: API.uploadPreset, params: params) { response, _ in
if let cloudinaryImage = response?.secureUrl {
print(cloudinaryImage)
}
}
}
}
Error screenshots or Stack Trace (if applicable)
CredStore - performQuery - Error copying matching creds. Error=-50, query={
"m_Limit" = "m_LimitAll";
ptcl = htps;
srvr = "api.cloudinary.com";
sync = syna;
}
Build/Dependency management
[ ] Cocoa-Pods [ ] Carthage [ ] Manual import [x] SPM
Is the issue reproducible only on a specific device?
[x] No [ ] Yes (specify model + iOS version)
Versions and Libraries (fill in the version numbers)
iOS Cloudinary SDK version - 2.9.0 OSX (on the dev environment) - 10.14.6 XCode - 11.3.1 Swift - 5.2 Target iOS - 13.3
@barclayd Can you please let us know if this is happening in your code or in the sample app?
@michalkcloudinay This is occurring within my code using the code snippet provided in the issue
@barclayd we opened a request to our dev team to fix this issue. however, since it's not a blocker and the upload is working. there is no ETA yet. we will update you with any insights.
Thanks very much @shirlymanor!
Hi, any news about this bug, it also happening in the example.
Hi! For me the upload isn't successful after getting this same error. Please let me know how to get the file upload working.
Update: Tried with SDK version 2.8.0 and it worked. Looks like the upload isn't working properly in the latest version 2.9.0
CORRECTION: I later found that the upload was in fact working even though the error was appearing in the logs upon calling upload method.
Hi @r-a-o, In order to further investigate your issue can you please share your code? If privacy is a concern please feel free to open a support ticket at [email protected]
Hi @r-a-o ! Try adding the secret key to the config initialiser like so:
let config = CLDConfiguration(cloudName: "cloudName", apiKey: "apiKey", apiSecret: "apiSecret")
Then upload as a signed upload It worked for me!
@1Soyebo that should work, however, we are highly recommended to have the credentials on the server-side (or have unsigned upload).
Update: I later found that the upload was in fact working even though the error was appearing in the logs upon calling upload method. Error message is a little confusing.
@1Soyebo that should work, however, we are highly recommended to have the credentials on the server-side (or have unsigned upload).
Thanks for the reminder, I removed it from my app. I think this should be highlighted in the docs. Most people put this in the code on client side.
@r-a-o Thanks for the feedback. I'm glad this is working for you now.
@r-a-o @barclayd,
Can you please update to the latest version of the SDK and let me know if you are still seeing this error in the logs? Thanks