Skip to content

[google_sign_in] GoogleUserCircleAvatar can't handle "new style" profile image URLs #44024

@ditman

Description

@ditman

When testing google_sign_in, I found some users with a Profile Image URL similar to this:

https://lh3.googleusercontent.com/a-/AAuE7mA88dkKFp41ksoqhET-ppaK-nGCTb1omEvo2Hxw

When the GoogleUserCircleAvatar attempts to add sizing/cropping information to the URL (s110-c), it ends like this:

https://lh3.googleusercontent.com/a-/s110-c/AAuE7mA88dkKFp41ksoqhET-ppaK-nGCTb1omEvo2Hxw

Which always yields a 404; because the right URL to resize that image needs to be this:

https://lh3.googleusercontent.com/a-/AAuE7mA88dkKFp41ksoqhET-ppaK-nGCTb1omEvo2Hxw=s110-c

Steps to Reproduce

  1. Sign in with the example app with a user account that has a profile picture.
  • Expected: After some time, the profile image fades in
  • Actual: The profile image never loads.

Target Platform: All, I debugged this on Android
Target OS version/browser: Any
Devices: All

Logs

I/flutter ( 4085): Another exception was thrown: HTTP request failed, statusCode: 404, https://lh3.googleusercontent.com/a-/s110-c/AAuE7mA88dkKFp41ksoqhET-ppaK-nGCTb1omEvo2Hxw

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions