Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Endless Activity Indicator when calling presentFacebookAlbumImagePicker #54

Closed
RGBNu opened this issue Apr 18, 2019 · 11 comments
Closed
Labels

Comments

@RGBNu
Copy link

RGBNu commented Apr 18, 2019

Hello - Since the most recent update, when I call presentFacebookAlbumImagePicker, it presents the picker correctly, but never shows any images, no Facebook login screen, nothing.

• In the console I see : Found 31 album(s) with this Facebook account.
• The error or success delegate methods are never called.

Not really sure what other info I can share.. It was definitely working well in the last version. Any thoughts?

@floriangbh
Copy link
Owner

Hello @RGBNu,

Can you reproduce this with the demo project ?
I'll check this asap.

Thanks

@RGBNu
Copy link
Author

RGBNu commented Apr 20, 2019

Hello - I put a project to reproduce this issue at www.kx1.us/FBTest.zip

Since it is the most basic possible implementation of the FacebookImagePicker, I assume it must be something with our Facebook Developer account. (This test project uses an Info.plist from the other project.) But without any error feedback, I can't figure what it is.

Another update, it looks like the login screen does appear, just not the albums.

Thanks for the quick reply!

@floriangbh
Copy link
Owner

Hello @RGBNu,
I just tried with your demo project with my facebook account and all the albums are showing up !
Maybe this is an issue with your album's types which are not handle by the picker ?

@RGBNu
Copy link
Author

RGBNu commented Apr 22, 2019

Dang, that is very surprising. All my albums are pretty normal I think.. I've uploaded pics from desktop and my iOS device, that's about it.

One other thing to note is both myself and another tester were seeing this behavior. One thing we have in common is that we are both admins on our Facebook app. I wonder if that could be part of it? Just looking for any commonality.

@floriangbh
Copy link
Owner

I'm also admin of the facebook demo app (which are in this repo) and I don't have any problem for showing my album. So I don't think it's your problem.
Keep me informed if you find the problem. I leave this issue open in case other people have the same issue :)

@floriangbh
Copy link
Owner

Hello @RGBNu , did you find the solution of your problem?

@RGBNu
Copy link
Author

RGBNu commented May 21, 2019

Greetings Florian -

After digging into your code and setting a million breakpoints, I figured out what's going on. In the class FacebookController, there is a segment of code beginning on line 81 which attempts to retry the next page by calling fetchFacebookAlbums again (line 87). However, the completion is not being passed back into the function call, resulting in the completion being nil on line 91, therefore render is never called in FacebookAlbumController, line 91. The fix was simple, just pass the completion back into the subsequent calls in FacebookController line 87.

Screen Shot 2019-05-21 at 2 12 58 PM

Hope that helps!

@floriangbh
Copy link
Owner

Many thanks ! :-)

Sorry for this bug, I didn't test to fetch a lot of album since the first version...

I'll fix it and make a new release.

@floriangbh
Copy link
Owner

The v3.0.1 is now available with this fix, thanks !

@RGBNu
Copy link
Author

RGBNu commented Jun 1, 2019

Greetings Florian --

I think we missed a slight detail on this issue. The request for albums now works with pagination, but the request for images within those albums still fails in the same way (endless spinner, no completion passed back in.) I tried to do a Pull Request, but I forget how to do it, ha. Anyway, in the file FacebookController.swift, change line 174 to selfStrong.fbAlbumsPictureRequest(after: after, album: album, completion: completion) Cheers!

@floriangbh
Copy link
Owner

Hello @RGBNu, you can try this version : https://github.com/floriangbh/FacebookImagePicker/releases/tag/3.0.2 :-)
Cheers !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants