Closed sarperdag closed 9 years ago
Thx for ur report, will try to fix it when i've got time :)
Looks like this happens when previously an album with the specified name has been deleted.
that's right
I'll have some time to check it out on Sunday.
"Looks like this happens when previously an album with the specified name has been deleted"
Hm... seems not, I tried but without any crash (iPhone 5 with iOS 8.0). Just got the issue #15 "Can not create album with name similar to deleted album" (I will try to fix it).
Generally, the image token via camera is JPG type, as the error shows it's PNG type, so @sarperdag , u tried to add the image from Photo Library, right? Can u offer some related testing code? That'll be helpful to reproduce this bug. Thx :)
@Kjuly for me this was on a 4s, I've got some time now so I will look into it and let you know.
Thx @jasoncox, and for the issue related to delete custom album, it seems SDK's bug. I've left a comment below issue #15 .
Issue was fixed by PR https://github.com/Kjuly/ALAssetsLibrary-CustomPhotoAlbum/pull/19
Error Domain=LIB_ALAssetsLibrary_CustomPhotoAlbum Code=0 "ALAssetsGroup failed to add asset: (null)." UserInfo=0x1638c9b0 {NSLocalizedDescription=ALAssetsGroup failed to add asset: (null).}
The same error also happens when there is not enough space in the device.
@renjithn interesting case, but i notice the asset u tried to add is null
.
Yes interesting. On debugging I see that writeVideoAtPathToSavedPhotosAlbum: completion handler is invoked with assetURL = nil and also error = nil.
As a result [self addAssetURL:assetURL toAlbum:albumName completion:completion failure:failure]; gets called with a nil assetURL and hence the error.
failed to add asset on iOS 8.1.2
@johntaiii latest version? have u imported the Photos.framework?
ALAssetsGroup failed to add asset: (null)." UserInfo=0x175a64e40 {NSLocalizedDescription=ALAssetsGroup failed to add asset: (null)
iOS 8.4 - I am not passing null...
@MMasterson when did u invoke the saving logic? I think the resource might not be prepared/generated before u try to save it. B.t.w., can u open a new issue w/ some sample code that u used? Thx :)
I'm getting same issue
Here is my code
[library saveVideo:self.video toAlbum:albumName completion:completion failure:failure];
here library, self.video, albumName, completion and failure are not null checked that.
Still getting error here is error log.
Error Domain=LIB_ALAssetsLibrary_CustomPhotoAlbum Code=0 "ALAssetsGroup failed to add asset: (null)." UserInfo={NSLocalizedDescription=ALAssetsGroup failed to add asset: (null).}
Here are some other info. Lib version via CocoaPod: 1.3.4 iOS version: 11.4.1 Device: iPhone 6
Hi @mrugeshtank , can u provide a sample project (u can host in a temp repo) that can reproduce ur case? Thanks in advance.
And btw, i'd suggest u use Photos.framework instead, even i don't use ALAssetsLibrary now. 😅
Getting this error on iOS8