Comments (2)
Hey, This is also happening to us on any type of login action (oauth google/apple and sign in through email)
stack: "TypeError: Cannot read property 'toString' of null
at ?anon_0_ (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:264064:49)
at next (native)
at asyncGeneratorStep (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:7085:19)
at _next (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:7099:29)
at tryCallOne (address at InternalBytecode.js:1:1180)
at anonymous (address at InternalBytecode.js:1:1874)
at apply (native)
at anonymous (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:49452:26)
at _callTimer (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:49331:17)
at _callReactNativeMicrotasksPass (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:49376:17)
at callReactNativeMicrotasks (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:49582:44)
at __callReactNativeMicrotasks (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:8307:48)
at anonymous (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:8080:45)
at __guard (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:8279:15)
at flushedQueue (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:8079:21)
at callFunctionReturnFlushedQueue (http://192.168.3.107:8081/index.bundle//&platform=android&dev=true&hot=false&transform.routerRoot=app:8064:33)"
It only seems to happen on Andriod from time to time.
We did manage to fix it on some in-house testing devices by erasing all cache and deleting all data before reinstalling the app, this is not acceptable since we can't find a way to seamlessly catch or automate that for the end user.
As a side note, we observe a warning at the app startup
ClerkJS: Network error at "https://immune-dinosaur-53.clerk.accounts.dev/v1/client/sign_ins?_clerk_js_version=5.7.0&_is_native=1" - TypeError: Network request failed. Please try again.
Maybe it is related to this?
Our app is expo
51 with current @clerk/clerk-expo
latest version (1.2.1)
from javascript.
FWIW, our workaround is to catch this these types of errors and propagate them to the user. For example,
try {
setLoading.on()
const { createdSessionId, setActive } = await startOAuthFlow()
if (createdSessionId) {
setActive?.({ session: createdSessionId })
}
} catch (err) {
const message = extractClerkErrors(err)
if (/Cannot read property 'toString' of null/.test(message)) {
log.warn(`Probable network failure: to-String-of-null error during OAuth sign-in`)
Alert.alert(
"Oops!",
`We couldn't sign you in, likely due to a network error. Please check your network connection and try again.\n\nIf you're still having trouble, please email us at [email protected]`,
)
return
}
log.error("error starting oauth flow for %s: %s", strategy, message)
Alert.alert("Sign In Error", message)
} finally {
setLoading.off()
}
// elsewhere...
export const extractClerkErrors = (error: any) => {
if (error?.errors) {
return (
"Error: " +
error.errors.map((e: any) => e.longMessage ?? e.message).join(", ")
)
} else {
return "Error: " + (error?.message ?? String(error))
}
}
from javascript.
Related Issues (20)
- Not a valid protocol: 'chrome-extension:' HOT 2
- Javascript Backend SDK response is empty for `getInvitationList` HOT 4
- `@clerk/[email protected]` cause a build warning in NextJS middleware HOT 9
- Docker container support - Clerk does not function due to NEXT_PUBLIC env variables. HOT 2
- @clerk/clerk-expo "unable to resolve dependency tree" HOT 4
- Cannot click on organization switcher when shadcn Sheet is open HOT 2
- Duplex Changes in Remix prevent calling `getAuth` after body already is read HOT 4
- I'm getting "Error: Should have a queue. This is likely a bug in React. Please file an issue." this error while wrapping my app with clerk provider HOT 1
- Routing failed. TypeError: Cannot read properties of undefined (reading 'pagePath' HOT 10
- [BUG] "forceRedirectUrl" is being ignored on <SignUp /> component. "@clerk/clerk-react": "^5.2.8" HOT 2
- 404 (not-found.tsx) triggered when logging out HOT 5
- WebView not opening Remix app webpage as authenticated when navigating from Expo app HOT 1
- Clerk causes hydration errors when used with Remix's streaming (`defer()`). HOT 2
- New UserButton.MenuItems component causing error HOT 3
- @clerk/astro: Uncaught (in promise) Clerk: Failed find clerk-js script HOT 1
- clerk-expo now always requires installing expo-local-authentication HOT 6
- Clerk Components RTL Problems HOT 1
- ReferenceError: Request is not defined HOT 3
- Constantly getting redirection from clerk in Next app HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascript.