You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @vonovak, I'm running into an odd issue that only occurs when I seem to have the google sign in button rendered in my login/sign up forms. It feels like a bug based on the below testing, but I wanted to bring it up first in case there is something I've missed. Anytime the button is rendered, and lets say I have an email one-time password option beneath my google oauth button, once I focus on that email text input, my entire app freezes, but it only seems to happen when being run on an ios device.
I've added the iosUrlScheme in my expo app.config, I'll post an example of my component below. If I do not click on the text input, and use the below button everything works as expected.
The issue only occurs:
In production builds
On real devices
When tapping text inputs
Just by having the Google Sign-in button present
Even when we're not using any Google Sign-in functionality
I've tried:
Using their native button component
Moving initialization
Different keyboard handling
Different component structures
Development vs production builds
Moving the GoogleSignin.configure into the component, into a useEffect, and out of the component but all had the same results
The fact that just having the component in the tree can cause keyboard/input freezes suggests there's potentially something in the native module initialization that's conflicting with iOS input handling. This might point to why:
It works fine in the simulator (different input handling)
Works fine in development (different module loading)
Only happens when actually interacting with native input elements
Sample component:
import {
GoogleSignin,
GoogleSigninButton,
statusCodes,
} from '@react-native-google-signin/google-signin';
import { supabaseClient } from '@/lib/supabase/supabase-client';
GoogleSignin.configure({
iosClientId: Env.IOS_GOOGLE_AUTH_CLIENT_ID,
webClientId: Env.ANDROID_GOOGLE_AUTH_CLIENT_ID,
scopes: ['profile', 'email'],
});
export function GoogleAuthButton() {
return (
<GoogleSigninButton
style={{ width: '100%' }}
size={GoogleSigninButton.Size.Wide}
color={GoogleSigninButton.Color.Light}
onPress={async () => {
try {
await GoogleSignin.hasPlayServices();
const userInfo = await GoogleSignin.signIn();
if (userInfo.data.idToken) {
const { data, error } = await supabaseClient.auth.signInWithIdToken(
{
provider: 'google',
token: userInfo.data.idToken,
},
);
console.log(error, data);
} else {
throw new Error('no ID token present!');
}
} catch (error: any) {
if (error.code === statusCodes.SIGN_IN_CANCELLED) {
// user cancelled the login flow
} else if (error.code === statusCodes.IN_PROGRESS) {
// operation (e.g. sign in) is in progress already
} else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
// play services not available or outdated
} else {
// some other error happened
}
}
}}
/>
);
}
I've added my dependencies, perhaps something sticks out to you?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey @vonovak, I'm running into an odd issue that only occurs when I seem to have the google sign in button rendered in my login/sign up forms. It feels like a bug based on the below testing, but I wanted to bring it up first in case there is something I've missed. Anytime the button is rendered, and lets say I have an email one-time password option beneath my google oauth button, once I focus on that email text input, my entire app freezes, but it only seems to happen when being run on an ios device.
I've added the iosUrlScheme in my expo app.config, I'll post an example of my component below. If I do not click on the text input, and use the below button everything works as expected.
The issue only occurs:
I've tried:
The fact that just having the component in the tree can cause keyboard/input freezes suggests there's potentially something in the native module initialization that's conflicting with iOS input handling. This might point to why:
Sample component:
I've added my dependencies, perhaps something sticks out to you?
"dependencies": {
"@expo/metro-runtime": "^3.2.3",
"@gorhom/bottom-sheet": "4.6.3",
"@hookform/resolvers": "^3.9.0",
"@maplibre/maplibre-react-native": "10.0.0-alpha.28",
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-community/datetimepicker": "^8.0.1",
"@react-native-google-signin/google-signin": "^13.1.0",
"@reduxjs/toolkit": "^2.2.7",
"@rneui/themed": "4.0.0-rc.8",
"@rtk-query/codegen-openapi": "^1.2.0",
"@shopify/flash-list": "1.6.4",
"@supabase/supabase-js": "^2.45.4",
"@tamagui/config": "^1.112.21",
"@tanstack/react-query": "^5.52.1",
"app-icon-badge": "^0.0.15",
"axios": "^1.7.5",
"burnt": "^0.12.2",
"expo": "~51.0.38",
"expo-apple-authentication": "^6.4.2",
"expo-build-properties": "^0.12.5",
"expo-clipboard": "^6.0.3",
"expo-constants": "~16.0.2",
"expo-dev-client": "~4.0.29",
"expo-device": "^6.0.2",
"expo-document-picker": "^12.0.2",
"expo-font": "~12.0.10",
"expo-image": "~1.13.0",
"expo-image-picker": "^15.0.7",
"expo-linking": "~6.3.1",
"expo-localization": "~15.0.3",
"expo-location": "^17.0.1",
"expo-notifications": "^0.28.19",
"expo-router": "~3.5.23",
"expo-secure-store": "~13.0.2",
"expo-splash-screen": "0.27.6",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.7",
"expo-updates": "~0.25.27",
"i18next": "^23.14.0",
"lodash": "^4.17.21",
"lodash.memoize": "^4.1.2",
"moti": "^0.29.0",
"nativewind": "4.0.36",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-error-boundary": "^4.0.13",
"react-hook-form": "^7.53.0",
"react-i18next": "^15.0.1",
"react-native": "0.74.5",
"react-native-element-dropdown": "^2.12.1",
"react-native-fbsdk-next": "^13.3.0",
"react-native-gesture-handler": "~2.16.2",
"react-native-keyboard-controller": "^1.13.2",
"react-native-maps": "^1.14.0",
"react-native-mmkv": "~2.12.2",
"react-native-purchases": "^8.2.5",
"react-native-purchases-ui": "^8.2.5",
"react-native-reanimated": "~3.10.1",
"react-native-redash": "^18.1.3",
"react-native-restart": "0.0.27",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "~3.31.1",
"react-native-svg": "~15.2.0",
"react-native-toast-message": "^2.2.1",
"react-native-web": "~0.19.12",
"react-query-kit": "^3.3.0",
"react-redux": "^9.1.2",
"tailwind-variants": "^0.2.1",
"tamagui": "^1.112.21",
"zod": "^3.23.8"
},
Beta Was this translation helpful? Give feedback.
All reactions