Has anyone else noticed Facebook test user profile pictures disappearing?

Hi everyone,

I’ve had this situation happen three times most recently, so I wanted to check to see if anyone else has experienced this phenomenon or if I’m missing something.

I implemented a signup with Facebook option, which, as is typical, allows users to use their FB profile picture as their profile picture in my Bubble app. Things are all fine and dandy for a few days, maybe even a week or two, and then the profile pictures disappear. It only happens to these FB test users too, not to ones that signed up through the normal form.

I’m not sure if there is somehow some sort of expiration assigned to FB test user data, something Bubble automatically cleans, or if I’m doing something wrong along the way and not saving the profile pictures properly. Has anyone else experienced this? Am I going mad?

My appreciation for your replies in advance!

1 Like

I sign users up with Facebook as well and also see profile images disappearing with regularity. This seems to happen with “regular” users in my case (I’ve not experimented much with FB test users.)

It’s unclear why this happens, but I assume it’s due to the profile image not being accessible at the time when the user logs in or something similar.

I suppose the workaround is to force a profile image to be saved to the database, but then that breaks the magic of one’s users always displaying their current FB profile pic.

BTW, I didn’t program that feature myself, my app inherited it from the template/wizard starter app.

Anyway, I’ve ALWAYS seen this odd behavior off and on. First time I noticed it, it seems to have been caused by some API changes that FB had implemented and it affected many developers, not just Bubble users.

But that was eventually fixed. However, it just seems that from time to time the association between User’s Profile Image field and User’s Current Facebook’s Profile picture just “breaks”. ???

1 Like

My only guess here is that some sort of (unhandled?) API error causes this. When one inspects users in the database, the Profile Image field for a FB login-using user will be a URL like:

> https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=10156379026506180&height=300&width=300&ext=1531518665&hash=AeSLBRzB28M3Y6IR

and that URL must sometimes be unavailable.

I’m wondering, @marktuff, is your app based off of the template, or entirely built from scratch? (Honestly, I don’t see anywhere in my app where the association between User’s Profile Image and Current User’s FB Profile Pic originally happens. (It’s just a feature of the API, perhaps?)

As a temp fix, on my “dashboard” page I’ve made the profile image clickable and, when clicked, we execute:

This will restore the user’s profile picture immediately in a session where the profile image is not showing. However, it seems that at random times down the line, the profile image will again become unavailable.

It is crazy-making as it’s completely unclear how and why this happens. (That people don’t complain about this all the time also seems odd as I’ve always had this problem…) It’s weird.

2 Likes

@keith thanks for your response.

I’ve built my app from scratch, and it’s occurring for me too so it appears to go both ways.

Also I think I did something similar to your temporary fix as well. See screenshot. But it still seems affected and disappears. Not sure why that is.
21%20AM

I was also expecting that this topic would be all over the forum but I couldn’t find a single post regarding it.

Not sure if we are two unique or isolated cases (I doubt it), but it’s strange nonetheless. Perhaps someone from the @Bubble team can shed light on whether they are aware of this as an issue, and if they are looking into it.

Last time I discussed it was here:

The issue with lookaside URLs resolving to 404 error I mention was fixed (by FB) quite a while ago, but there’s definitely a history of flakiness here with FB profile photos.

As far as why folks don’t notice this, it’s hard to say. However, the reason I do is that I’ve got a debug type header on all pages of my app which has some user info in it, including profile image. (So I quite regularly see my own profile image come and go…)

#shrug

A for sure “fix” is to abandon the idea of dynamic profile photos and just force the profile photo “:saved to s3” at some point.

It occurs to me that one could also add a make changes to current user in one’s LOGIN workflow and force profile image = fb profile photo. (Which seems very ham handed, but whaddyagonnado?)

Hi Keith thanks. I think if push comes to shove this might be the solution, at least for now, to save face with your users. I initially thought I was doing this, but I think I was just passing through dynamic data from FB to Bubble.

Are you saying you would set the workflow to Profile Picture = FB Profile Photo upon initial registration, or every time someone utilizes the login with FB feature?

1 Like

I see what you did there. :stuck_out_tongue_winking_eye:

But to your Q: It looks to me like the latter option would be the right one. I’ve not tested that thoroughly, but in My “Dashboard” type page, I made it so that one could click the profile photo to force that action (make changes… my profile image field = FB profile image) and it always seems to succeed, suggesting this would work at end of login flow.

1 Like

Hi Keith, sounds like it would work as well. Let me know if all goes smoothly for you on that front! I will likely follow suit with that solution as I’d hate for people to be annoyed at disappearing profile photos.

Where is the :savetoS3 option?

Found it. Strange but modify a thing needs to modify a thing for the :savetoS3 option to be available.

FWIW, I see this happening again. When logging into my app today my profile photo is returning as a null object and the following console message shows why:

image

It’s so weird how this randomly seems to happen.

I got the same issue and can’t figure out the cause of it. :thinking:
Untitled

Yeah, I can’t quite figure this one out. I thought it might be that FB profile pics have a life span or something, but I just updated mine and then when I go into my app I still see lookaside 404s.

Going into app data shows this as my profile photo:

Note “broken link” image. Clicking on “see” reveals:

Clicking “clear” to reset the field to null and then logging out of my app and logging back in results in my profile picture being reacquired. Here’s a screenshot – I’m back!:

(My FB login workflow goes and snags current FB profile pic if profile image is empty.

The thing is, I can’t figure out the programmatic way to detect this “broken” profile image issue. It would seem that if the state is broken (the image link is returning 404), the image isn’t “empty” in Bubble terms and so resetting it automagically at login just never happens. Additionally, when this is happening to a user, the profile image just looks blank (doesn’t look “broken”) in my interface, so there’s no feedback as to what’s going on… just that the profile pic seems “missing”.

I guess maybe the workaround is when logging in with facebook, null out the image and reacquire it but this seems like overkill.

I’ve never figured out the explanation(s) for why this situation occasionally and repeatedly occurs. At one time, it seems like FB made a bunch of changes to lookaside and messed something up, but I see questions like this reoccuring kind of all the time in the FB developer community.

Does anybody at Bubble understand this? Anybody ever filed a bug report on this? (I’ve never bothered to as it is very hard to reproduce and is more of a minor annoyance than anything for me, but I can see this being a BIG issue for some types of apps.)

2 Likes

And this same thing is now happening again. Trying to snag profile picture is throwing console errors. It’s so weird how this just happens at random… @Bubble team, any insights into what causes this and how to avoid?

Apparently, my own profilepic URL throws a 404:

https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=10156379026506180&height=300&width=300&ext=1540610017&hash=AeQJiNHwVUss6n4n

And, once again (as in prior descriptions of this issue), my picture is “broken”/404 in app data:

image

And again manually clearing it (hit clear in app data, which I guess is same as if I were to set it to null in the app) and then logging back in (which forces a reacquire) magically restores my profile image:

The newly acquired URL for the image is

https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=10156379026506180&height=300&width=300&ext=1543611662&hash=AeTiSPsEgapYY5uw

… which has the same “asid” arg, but different “ext” and “hash” args as previous.

Do Facebook profile images expire or something? Should I always (on login via Facebook flow) set the profile image to null and then reacquire it? (I guess that would prevent the issue from ever happening, but seems wasteful of bits.

I’d love to know what the source of this particular issue is and the recommended/correct way around it.

We ran into this previously and ultimately decided to store the photos from FB ourselves so that we can reference them without having to risk them disappearing.

Not a perfect solution, but works well enough and saves us the time/trouble of having to fix them.

Reporting in from 2020:

This is still an issue. I think the default should probably be to save pics, to S3 or otherwise, and the secondary option should be to dynamically reference them through lookaside, not the other way around. I assumed that settings users’ Profile Pic = Current User's Facebook's Profile picture would copy an image into my database, but this is not the case. It seems to store a lookaside url. I have several live users with broken images.

My app also displays small user images in repeating groups, many of which will remain blank until the relevant users log back in and trigger catches I’ve added to reset their image and save it to S3. To compound the problem, blank pics in the repeating groups are randomly getting filled in with other users’ pics in the group. There should definitely be a way to check if an image is broken, as Keith mentioned, so we can try to avoid weirdness caused by the root issue.

1 Like

I just encountered this in my app, did some digging, and figured out what seems to be an easy fix that will always give you the user’s up to date profile image (Bubble saves a static link that breaks everytime the user changes their FB image).

Caveat: I haven’t implemented it yet in Bubble but have tested it manually and it works.

I can’t claim credit for this. Credit goes to a Mr. Stephen Phillips on stackoverflow.

You need to get the fb id. The Bubble FB plugin has an id field but it’s broken (doesn’t return data)
image

So you need to extract the id manually from the static fb profile image url.

The workflow below saves the image in a URL like this: https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=10102906373341347&height=300&width=300&ext=1613282263&hash=AeSr9DIFFCfq5m_NHck

image

The user id is the asid part of the URL (e.g. 10102906373341347)

The dynamic formula is this: http://graph.facebook.com/{fb_user_id}/picture?type=large&redirect=true&width=300&height=300

A working, dynamic link looks like this: http://graph.facebook.com/10102906373341347/picture?type=large&redirect=true&width=300&height=300

Here’s a video that may help if any of the above is not clear:
https://www.loom.com/share/760fff0bbd6347d7b204ffd1bb738fd2

1 Like