You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Expo+Supabase Android端Google登录报DEVELOPER_ERROR问题

Expo + Supabase Android端Google OAuth登录报错(CODE 10: DEVELOPER_ERROR)

问题情况

  • 仅Android端登录时触发DEVELOPER_ERROR(code:10),Web和iOS端登录正常,未使用Firebase
  • 错误详情:
{
  "nativeStackAndroid": [],
  "userInfo": null,
  "message": "DEVELOPER_ERROR",
  "code": "10"
}
  • 异常现象:iOS端登录显示旧应用名称"Movies"(登录成功),Android端显示当前应用名称"capybaratest"(登录失败),复用了为旧应用创建的Google OAuth凭证

相关代码与配置

登录按钮配置(GoogleSignInButton.native.tsx)

export default function GoogleButton(props: any) {
  GoogleSignin.configure({
    scopes: [],
    webClientId: WEB_CLIENT_ID,
    iosClientId: IOS_CLIENT_ID,
    offlineAccess: true,
    forceCodeForRefreshToken: true,
  });
  
  ...
}

package.json 依赖配置

{
  "name": "...",
  "main": "expo-router/entry",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "test": "jest --watchAll",
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^14.0.0",
    "@gorhom/bottom-sheet": "^4.6.1",
    "@react-native-async-storage/async-storage": "1.21.0",
    "@react-native-google-signin/google-signin": "^11.0.1",
    "@react-native-picker/picker": "2.6.1",
    "@react-navigation/native": "^6.1.17",
    "@shopify/restyle": "^2.4.2",
    "@supabase/supabase-js": "^2.42.0",
    "expo": "~50.0.14",
    "expo-font": "~11.10.3",
    "expo-linking": "~6.2.2",
    "expo-router": "~3.4.8",
    "expo-splash-screen": "~0.26.4",
    "expo-status-bar": "~1.11.1",
    "expo-system-ui": "~2.9.3",
    "expo-web-browser": "~12.8.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.73.6",
    "react-native-dotenv": "^3.4.11",
    "react-native-gesture-handler": "~2.14.0",
    "react-native-pager-view": "6.2.3",
    "react-native-safe-area-context": "4.8.2",
    "react-native-screens": "~3.29.0",
    "react-native-tab-view": "^3.5.2",
    "react-native-url-polyfill": "^2.0.0",
    "react-native-web": "~0.19.6"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/react": "~18.2.45",
    "jest": "^29.2.1",
    "jest-expo": "~50.0.4",
    "react-test-renderer": "18.2.0",
    "typescript": "^5.1.3"
  },
  "private": true
}

app.json 项目配置

{
  "expo": {
    "name": "capybaratest",
    "slug": "capybaratest",
    "scheme": "com.name.capybaratest",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "userInterfaceStyle": "automatic",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.name.capybaratest",
      "infoPlist": {
        "CFBundleURLTypes": [
          {
            "CFBundleURLSchemes": [
              "com.googleusercontent.apps.141673689420-cstuimdc24iel5o76me2vlint42gj66r"
            ]
          }
        ]
      }
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "com.name.capybaratest"
    },
    "web": {
      "bundler": "metro",
      "favicon": "./assets/images/favicon.png"
    },
    "extra": {
      "eas": {
        "projectId": "6e859fa6-d9e9-4511-b4d8-7f37398500b0"
      }
    },
    "plugins": [
      [
        "expo-font",
        {
          "fonts": ["./assets/fonts/OpenSans-Regular.ttf"]
        }
      ]
    ],
    "experiments": {
      "tsconfigPaths": true
    }
  }
}

已尝试的解决方案

  • 新建Expo项目重新测试
  • 调整Supabase相关配置
  • 查阅大量技术讨论,但问题仍未解决

内容的提问来源于stack exchange,提问作者Richard O

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 03:35:57