react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.19k stars 878 forks source link

ReactImageView: Image source "null" doesn't exist on android #1147

Closed VTrofym closed 1 year ago

VTrofym commented 1 year ago

I have a problem - when requesting GoogleSignin to any of these methods: getCurrentUser(), signIn() on android with photo comes null. At the same time, the correct path comes to iOS. Earlier the request for android came correct. This problem came up recently. "photo": null - on android "photo": "https://lh3.googleusercontent.com/....... correct way ...." - on ios

WARN ReactImageView: Image source "null" doesn't exist

here is part of the code I am working with

import { GoogleSignin, User } from '@react-native-google-signin/google-signin';

const ProfileScreen: FC = ({ navigation }) => { const [user, setUser] = useState<User['user'] | null>(); const getCurrentUser = useCallback(async () => { const currentUser = await GoogleSignin.getCurrentUser(); setUser(currentUser?.user); }, []); useEffect(() => { getCurrentUser(); }, [getCurrentUser]); const imageSource = user && typeof user?.photo === 'string' ? { uri: user.photo } : { source: user?.photo };

return (

); };

BraveEvidence commented 1 year ago

This might help https://www.youtube.com/watch?v=VH1YBcVmM-M

vonovak commented 1 year ago

Hello and thanks for reporting, this module wraps the google sign in SDK and returns to you whatever the native SDK provided. If you received no photo url it's because the native SDK did not provide it. This is not an issue with this package.

Thank you 🙂

Noor-e-Iqra commented 1 month ago

@VTrofym did you found a solution for it??