Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
trying to make current user uploading his picture to storage it give me this error while testing
func userUpdatingInfo () {
let storageRef = Storage.storage().reference()
if let uploadData = self.userProfileImage.image?.pngData() {
storageRef.putData(uploadData, metadata: nil) { (meta, error) in
if (error != nil) {
print(error ?? "Error in uploading Image")
return
} else {
print(meta!)
}
}
}
}