-
Notifications
You must be signed in to change notification settings - Fork 1
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
Possible unhandled promise rejection (id: 0): TypeError: Network request failed #1
Comments
Hi @dijarvrella, |
Hi @rbrki07, thanks for the quick response. I am running Expo app on my local machine. The Keycloak is also running on my local machine. I made it all work I hardcoded discovery object as follows:
It looks to me the problem seems to be related with this useAutoDiscovery function. the IP address there is my private IP on my localmachine but due to running expo app now with @expo/ngrok tunnel |
Well, that's strange. I will try to reproduce your problem using the latest Expo SDK and module version. |
alright, I was able to resolve this by doing the following:
Thanks for all the help and making this available for all. |
Hi @rbrki07,
First of all great work. Really inspiring!
Can you please provide some guidance as I can't make this run successfully.
It fails on with the following:
Possible unhandled promise rejection (id: 0): TypeError: Network request failed
and I believe that is due to useAutoDiscovery function not returning a valid discovery object of interface DiscoveryDocument.Then if I try to type Sign in button I get
Possible unhandled promise rejection (id: 5): Error: Cannot prompt to authenticate until the request has finished loading.
Fastest way to replicate the problem is:
git clone git@github.com:rbrki07/rn-expo-oauth-authorization-code-flow-pkce-keycloak.git
docker run --name keycloak --detach --publish 11111:8080 --env KEYCLOAK_ADMIN=admin --env KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:latest start-dev
I have configured keycloak same as you have it shown in your blog but I am attaching the realm export ran using:
docker exec -it keycloak /opt/keycloak/bin/kc.sh export --file /tmp/realm-export.json --realm test --users realm_file
realm-export.json
4. run
npx expo start
5. Scan the QR code from Android/iOS
6.
Possible unhandled promise rejection (id: 0): TypeError: Network request failed
pops outThe text was updated successfully, but these errors were encountered: