clerk/javascript

signOut() and isLoaded not working on IOS with @clerk/clerk-expo@beta

PatricioTabilo opened this issue · 1 comments

Preliminary Checks

Reproduction / Replay Link

https://github.com/PatricioTabilo/test-expo-clerk

Publishable key

pk_test_bGVuaWVudC1nbnUtMjcuY2xlcmsuYWNjb3VudHMuZGV2JA

Description

Detected Issues: isLoaded and signOut()

Problem description with isLoaded

Context: During the initialization of the application without an authenticated user, we have observed that the isLoaded status never changes to true. This behavior prevents the SplashScreen from hiding and the application from advancing to the operational state.

How to reproduce:

  • Start the application without being logged in.
  • Check the useEffect in src/app/(app)/_layout.tsx, specifically at line 16.
  • Notice that the SplashScreen remains visible and the isLoaded status does not change to true.

Problem description with signOut()

Context: When executing the signOut() function from src/app/(app)/settings.tsx (line 13), there is a problem: it attempts to make a call to the browser's window object. This approach presents problems in native environments where the window object is not available.

How to reproduce:

  • Go to the settings within the application and execute the logout function.
  • Check the code in src/app/(app)/settings.tsx, at line 13, where signOut() is called.

Note: It appears that the error may be due to an attempt to perform a redirect.

Environment

System:
    OS: macOS 14.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 71.22 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
Binaries:
  Node: 20.11.0 - ~/.asdf/installs/nodejs/20.11.0/bin/node
  Yarn: 1.22.21 - ~/.asdf/installs/nodejs/20.11.0/bin/yarn
  npm: 10.2.4 - ~/.asdf/plugins/nodejs/shims/npm
  pnpm: 8.15.1 - ~/.asdf/installs/nodejs/20.11.0/bin/pnpm
  bun: 1.0.27 - ~/.asdf/shims/bun
Browsers:
  Chrome: 122.0.6261.94
  Safari: 17.2.1
npmPackages:
  @babel/core: ^7.20.0 => 7.24.0
  @clerk/clerk-expo: ^1.0.0-beta.30 => 1.0.0-beta.30
  @types/react: ~18.2.45 => 18.2.61
  expo: ~50.0.8 => 50.0.8
  expo-constants: ~15.4.5 => 15.4.5
  expo-linking: ~6.2.2 => 6.2.2
  expo-router: ~3.4.8 => 3.4.8
  expo-secure-store: ~12.8.1 => 12.8.1
  expo-splash-screen: ~0.26.4 => 0.26.4
  expo-status-bar: ~1.11.1 => 1.11.1
  nativewind: ^4.0.36 => 4.0.36
  react: 18.2.0 => 18.2.0
  react-native: 0.73.4 => 0.73.4
  react-native-reanimated: ^3.7.2 => 3.7.2
  react-native-safe-area-context: 4.8.2 => 4.8.2
  react-native-screens: ~3.29.0 => 3.29.0
  tailwindcss: ^3.4.1 => 3.4.1
  typescript: ^5.1.3 => 5.3.3

Hi, thanks for trying the Core 2 Beta!

We're collecting all feedback in a central place so please post your issue here: https://github.com/orgs/clerk/discussions/2900

Thanks!