Blank screen on Android
See original GitHub issueDescribe the problem
After login on the web browser nothing happens, the browser don’t redirect to the app. On iOS works great!
What was the expected behavior?
Been redirected to the app after login through the browser
Reproduction
Through a custom hook we manage the bucle to force the user to log in
import { useEffect } from 'react';
import { useAppDispatch, useAppSelector } from '../../redux/hooks';
import { handleAuth, handleAgentAuth } from '../../redux/thunks';
export const useHandleAuth0 = () => {
const dispatch = useAppDispatch();
const currentState = useAppSelector((state) => state.auth);
useEffect(() => {
const handleAuth0 = async () => {
const response = (await dispatch(handleAuth())) as Auth0Response;
if (response) {
await dispatch(handleAgentAuth(response.email, response.accessToken));
}
};
if (!currentState.handleAuthResponse.accessToken.length) {
setTimeout(() => void handleAuth0(), 1000);
}
}, [dispatch, currentState]);
};
AndroidManifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="XXXXXXXXXX">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/BootTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
defaultConfig {
applicationId "xxxxxxxxxxx"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
resValue "string", "build_config_package", "xxxxxxxxxxxx"
versionCode verCode as Integer
versionName verName
manifestPlaceholders = [auth0Domain: project.env.get("AUTH0_DOMAIN"), auth0Scheme: "${applicationId}"]
}
buildTypes {
debug {
applicationIdSuffix = '.dev'
signingConfig signingConfigs.debug
}
dev {
initWith release
applicationIdSuffix = '.dev'
matchingFallbacks = ['release']
signingConfig signingConfigs.xxxxxxx
}
tst {
initWith release
applicationIdSuffix = '.tst'
matchingFallbacks = ['release']
signingConfig signingConfigs.xxxxxxx
}
uat {
initWith release
applicationIdSuffix = '.uat'
matchingFallbacks = ['release']
signingConfig signingConfigs.xxxxxxx
}
release {
signingConfig signingConfigs.xxxxxxx
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
Environment
- Version of this library used: 2.11.0
- Which framework are you using, if applicable: RN 0.66.4
- Other modules/plugins/libraries that might be involved: React-Native-Config 1.4.5
Issue Analytics
- State:
- Created 2 years ago
- Comments:25 (8 by maintainers)
Top Results From Across the Web
5 Proven Ways to Fix Android Black Screen of Death - iMobie
5 Ways to Fix Black Screen on Android Phone · Hold down the “Volume Down” key and the “Power” button simultaneously for 7...
Read more >How to Fix Black Screen on Android Phone (2022 Update)
Way 1. Force Restart Your Android · Press and hold down the Power, Home and Volume Up/Down keys. · Press and hold down...
Read more >How do I fix my android black screen? - Player Assist
Factory reset to fix black screen issues ; Power off the device. Power off your device and make sure its completely turned off....
Read more >How to Fix Black Screen on Android Phone[4 Easy Methods]
3.3 How to Fix a Black Screen on a Phone via Factory Reset · 1. Power off your Android device, then press and...
Read more >5 Simple Ways to Fix Android Phone Screen is Black - MobiKin
Method 1: You can hard reboot your Android device by holding down the "Home" and "Power" buttons simultaneously for 10 seconds, then releasing ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@poovamraj https://github.com/auth0/react-native-auth0/issues/83 this is exactly same issue. I was able to fix it by changing this
@poovamraj figure out the problem, in
andoird/app/build.gradle
, there is several buildTypes defined (the ones showed when this issue was open). The applicationIdSuffix is the problem, in the Allowed callbacks urls configuration the aplicationID is with and without the suffix, if i remove the applicationIdSuffix from the debug buildType, works perfect. So my problem is that, with the aplicationIdSuffix and a proper allowed callback, after login the app goes to a blank screen