Skip to content

Web and Expo app throw errors #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bapspatil opened this issue May 1, 2025 · 4 comments
Open

Web and Expo app throw errors #214

bapspatil opened this issue May 1, 2025 · 4 comments

Comments

@bapspatil
Copy link
Contributor

Running this command:

bun create better-t-stack@latest better-t-2-6-0 --yes --frontend native tanstack-start --api orpc --addons biome turborepo --examples ai todo

When I open the web app, nothing loads and there are no error logs in the console either. Same with the Expo app.

@AmanVarshney01
Copy link
Owner

Image

Weird 🤔

If the web shows a blank (white/black) screen, just do a hard refresh that should fix it.

For the native app, try updating the Expo Go app

@SamphireOG
Copy link

TypeError: _ExpoSecureStore.default.getValueWithKeySync is not a function
getItem \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules\expo-secure-store\build\SecureStore.js:135
getCookie \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@better-auth\expo\dist\client.mjs:97
headers \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\apps\native\utils\orpc.ts:25
value \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\shared\dist\index.mjs:147
encode \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\client\dist\shared\client.DpICn1BD.mjs:215
_call2 \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\client\dist\shared\client.DpICn1BD.mjs:35
call \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\client\dist\shared\client.DpICn1BD.mjs:30
next \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\shared\dist\index.mjs:69
intercept \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\shared\dist\index.mjs:76
call \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\client\dist\shared\client.DpICn1BD.mjs:29
procedureClient \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\client\dist\index.mjs:38
queryFn \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@orpc\react-query\dist\index.mjs:24
fetchFn \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\query.js:193
run \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:80
run \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:104
promise callbackcreateRetryer/run/< \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:100
promise callback
run \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:84
run \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:104
promise callbackcreateRetryer/run/< \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:100
promise callback
run \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:84
run \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:104
promise callbackcreateRetryer/run/< \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:100
promise callback
run \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:84
start \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\retryer.js:121
fetch \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\query.js:275
_executeFetch2 \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\queryObserver.js:173
fetch \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\queryObserver.js:163
refetch \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\queryObserver.js:153
onFocus \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\query.js:103
onFocus \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\queryCache.js:82
onFocus \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\queryCache.js:81
batch \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\notifyManager.js:40
onFocus \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\queryCache.js:80
\Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\queryClient.js:40
onFocus \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\focusManager.js:53
onFocus \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\focusManager.js:52
\Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\focusManager.js:39
listener \Users\Onlin\OneDrive\Desktop\Stremio\RawPaper\node_modules@tanstack\query-core\build\modern\focusManager.js:12
orpc.ts:16:14

@AmanVarshney01
Copy link
Owner

@SamphireOG I'm not able to reproduce. Have you updated your Expo Go? It should support Expo 53

@Jeffrey-Suitor
Copy link

Jeffrey-Suitor commented May 27, 2025

I am able to reproduce. This issue is related to creating a web app with expo and not the package named web.

Reproduction

  1. bun create better-t-stack@latest my-better-t-app --yes --frontend native-nativewind
  2. Fix the cors issue by adding localhost:8081 to the server cors.
  3. You will see the same error message.

Cause

This is because expo-secure-store is not supported on web as far as I can tell.
Expo Secure Store docs

Solution

Seems like people have seen this before, and this solution worked for me. Only issue is the typing + async nature for web implementation.

I feel like the BetterAuth team may have to find the upstream fix because this is an issue with their recommended implementation.

Fix for secure store on web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants