Unable to update auth0Domain URL for android build
See original GitHub issue❌ Describe the problem
Our app uses auth0 login widget to login users.
Currently, I’m unable to open Auth0 login widget
with RN InAppBrowser
once I clicked to login from the native app UI. Instead, I get an error like the screen attached below
This happens after checking the auth0Domain
URL string from manifestPlaceholders
array in build.gradle
is indeed correct => I somwhow, at some point, accidentally pasted 3 chinese characters into the URL string BUT I corrected it afterwards. However my app still opens the URL with extra chinese characters at the end of it
❗❗❗ This only occurs in dev environment atm ❗❗❗
✅ What was the expected behavior?
I expect RN InAppBrowser
opens the auth0 login widget using the correct URL that ends with .auth0.com
(so that I can actually open the Auth0 login widget
from InAppBrowser
) rather than auth0.com.邓子豪
…
❌Current redirect URL: finishes with auth0.xn --com
✅ Expected redirect URL: finishes with auth0.com
👀 Reproduction
I am unable to reproduce it on any of my coworkers machine except for mine, and this issue happens on both the android VD and well as my physical samsung device, so I suspect the problem is DEFINITELY in the android build process, not my local android environment setup
📝 Things I’ve tried so far to solve it:
- Deleted
/android/.gradle
folder - Deleted
/android/build
folder - Cleaned android cache by
cd android
thengradlew clean
as well asgradlew cleanBuildCache
=> I looked up thatgradlew clean
andgradlew cleanBuildCache
are obsolete according to this stackoverflow page, so I followed the latest methods to clean cache - Cleaned yarn cache by
yarn cache clean
- Clearned
watchman
by runningwatchman watch-del-all
- Wiped emulator data for all VDs
- Re-created VDs and ran the app
- Deleted and reintalled
node_modules
- Cleared the browser cache for all browsers on all virtual devices that the app (seems useless becos RN uses InAppBrowser rather than browsers on your VDs)
- Cleared the cahce for the app on my VD - I cleared both data storage PLUS the cache
- Intentionally made
manifestPlaceholders = [auth0Domain: "our-own.auth0.com", auth0Scheme: "${applicationId}"]
tomanifestPlaceholders = [auth0Domain: "jibberish.auth0.com", auth0Scheme: "${applicationId}"]
to see if the auth0 URL changes after build, which is didn’t. The VD still opens the wrong auth0 URL (the one that has extra chinese characters at the end of it - see screenshot) - Reinstalled our
InAppBrowser
(react-native-inappbrowser-reborn)
Environment
NPM packages related:
"react-native-auth0": "^2.13.1"
"react-native": "0.65.1"
Android stuff:
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
androidXAnnotation = "1.2.0"
androidXBrowser = "1.3.0"
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top GitHub Comments
Similar to what @Mingyang-Li has stated regarding other machines, just adding that I wasn’t able to reproduce this in our sample app on my end either 🤔
What happens when you run a release build?