Skip to content
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

Splash Stays on the screen #574

Open
pranjalkhandelwal432 opened this issue May 13, 2022 · 14 comments
Open

Splash Stays on the screen #574

pranjalkhandelwal432 opened this issue May 13, 2022 · 14 comments

Comments

@pranjalkhandelwal432
Copy link

pranjalkhandelwal432 commented May 13, 2022

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
Copy link

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

@vic2tee4u
Copy link

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

@rogerkerse
Copy link

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
Copy link

ilyakar commented Jun 28, 2022

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

Yup, that did it for me as well!

@Zontex
Copy link

Zontex commented Jul 10, 2022

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
Copy link

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

@ilyakar Where Should I Put the above line ?

@ofri-7chairs
Copy link

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
Copy link

dotavi commented Sep 3, 2022

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
Copy link

dibyopra commented Sep 12, 2022

same issue on android

@yahacom
Copy link

yahacom commented Oct 7, 2022

same here

"react-native": "0.66.2",
"react-native-splash-screen": "^3.3.0"

@engrwaqasali
Copy link

engrwaqasali commented Nov 15, 2022

/////#### 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
Copy link

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
Copy link

JoseVov commented Apr 12, 2024

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
Copy link

JoseVov commented Apr 12, 2024

solved here -> #637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests