crazycodeboy / react-native-splash-screen

A splash screen for react-native, hide when application loaded ,it works on iOS and Android.
MIT License
5.61k stars 1.09k forks source link

Splash Stays on the screen #574

Open pranjalkhandelwal432 opened 2 years ago

pranjalkhandelwal432 commented 2 years ago

Splash stays on the screen i.e it doesn't let the component render

Started happening only after the version upgrade of react-native from 63 to 68

Version:

"react-native-splash-screen": "^3.2.0",
"react-native": "^0.68.1",

Specifically happening on Android

Activity

    override fun onCreate(savedInstanceState: Bundle?) {
        SplashScreen.show(this,true)
        super.onCreate(savedInstanceState)
 }

Index.js

componentDidMount(){

    SplashScreen.hide()

}
lifwanian commented 2 years ago

Put [RNSplashScreen show]; at the end right before return YES;

vic2tee4u commented 2 years ago

same here, just started happening this morning, and it was working fine before now.

rogerkerse commented 2 years ago

Put [RNSplashScreen show]; at the end right before return YES;

On iOS it helped. For us, it this show line was few lines above, then app never started, when it was absolutely the last line, then it opened.

ilyakar commented 2 years ago

Put [RNSplashScreen show]; at the end right before return YES;

Yup, that did it for me as well!

Zontex commented 2 years ago

Put [RNSplashScreen show]; at the end right before return YES;

@lifwanian I have the exact same issue on android release varient, debug works fine. where to find "return YES;" ? not sure where to add the line "[RNSplashScreen show];"

dnayak696 commented 2 years ago

Put [RNSplashScreen show]; at the end right before return YES;

@ilyakar Where Should I Put the above line ?

ofri-7chairs commented 2 years ago

any update on that? it happens to me on android release mode, debug mode works fine. "react-native": "0.67.2" "react-native-splash-screen": "^3.3.0"

dotavi commented 2 years ago

Is index.js the correct place to put the hide method?

Mine is in my App.tsx, perhaps try your app.js/tsx file , I also just used a useEffect useEffect(() => { SplashScreen.hide(); },[]);

dibyopra commented 2 years ago

same issue on android

yahacom commented 2 years ago

same here

"react-native": "0.66.2",
"react-native-splash-screen": "^3.3.0"
engrwaqasali commented 2 years ago

/////#### I got mine fixed by reverting the changes, so yeah upgrading gradle wasn't a good idea ####//////

same issue: works fine in debugBuild(only when connected to Debug server host) and stuck on splash in ReleaseBuild

"react-native": "0.66.5",

buildscript {
    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        ndkVersion = "21.4.7075529"
        """""edit, I commented this kotlin_version still stcuks on splash screen"""""
        // kotlin_version = '1.6.10'
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        // classpath("com.android.tools.build:gradle:4.2.2")
        classpath("com.android.tools.build:gradle:7.1.1")
        // classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
        classpath('com.google.gms:google-services:4.3.14')
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

and my gradle distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

it was working fine before these changes reasons might be

i upgraded my gradle from 6.9 to 7.3.3 a week ago

and ### did the following changes too: see in picture

image

sxsx2yzyz commented 1 year ago

Has anyone encountered the same problem as me This phenomenon is likely to occur on miui Android devices, and only in release versions Difficulty in debugging and inability to locate issues

JoseVov commented 7 months ago

I added [RNSplashScreen show]; just before the return YES.

I called the SplashScreen.hide(); in the react-native code.

But the app is not even starting, so it is not able to read the SplashScreen.hide();.

It's completely stuck when the splash appears.

Any Solution?.

JoseVov commented 7 months ago

solved here -> https://github.com/crazycodeboy/react-native-splash-screen/issues/637