question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

White screen and deadlock warning.

See original GitHub issue

💻 My environment

  • react-native-bootsplash version: ^2.2.3
  • react-native version:~0.61.4
  • Platform: iOS
  • OS version: IOS 13.4
  • Device: iPhone 11(13.4.1)
  • Simulator: yes
  • Android Studio version: ?
  • Android buildToolsVersion: ?
  • Xcode version: 11.4.1

🕵️‍♂️ Reproducing the issue

I am not sure what i did wrong, but every time splash screen appears with white screen at the end. And. having warnings: Simulator Screen Shot - iPhone 11 - 2020-04-24 at 19 01 36

My code in xcode:

/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

#import <UMCore/UMModuleRegistry.h>
#import <UMReactNativeAdapter/UMNativeModulesProxy.h>
#import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>

#import "Orientation.h"

#import "RNBootSplash.h"

@implementation AppDelegate

@synthesize window = _window;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]];
  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"lolApp" initialProperties:nil];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  
  [RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView];
  
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];

  [super application:application didFinishLaunchingWithOptions:launchOptions];

  return YES;
}

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
{
  NSArray<id<RCTBridgeModule>> *extraModules = [_moduleRegistryAdapter extraModulesForBridge:bridge];
  // You can inject any extra modules that you would like here, more information at:
  // https://facebook.github.io/react-native/docs/native-modules-ios.html#dependency-injection
  return extraModules;
}

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
  return [Orientation getOrientation];
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
#ifdef DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

@end

Screenshot at Apr 24 19-47-16

react native:

import 'react-native-gesture-handler'; // should be first import in App file
import React from 'react';
import MainNavigator from './src/screens/main/MainNavigator';
import { StatusBar } from 'react-native';
import { Provider } from 'react-redux';
import configureStore from './src/redux/store/store';
import { NavigationContainer } from '@react-navigation/native';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import RNBootSplash from "react-native-bootsplash";

const store = configureStore();

export default function App() {

//RNBootSplash.hide({ duration: 1000 });
RNBootSplash.hide();

  return (
    <Provider store={store}>
      <StatusBar backgroundColor='#133740' barStyle='light-content' />
      <SafeAreaProvider>
        <NavigationContainer>
          <MainNavigator />
        </NavigationContainer>
      </SafeAreaProvider>
    </Provider>
  );
}

gif with demo of white screen with duration: 2020-04-24 18 43 22 without duration: 2020-04-24 18 42 29

🤞Solution

I am noob in programming with react-native and javascript. Can anyone explain me what am i doing wrong?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
micheilsgreycommented, Oct 11, 2020

@zoontek Uh well, But why it takes a long time to hide splash in android! unlike ios its work as expected!

Overall I’m having all way too slow in android in thinking its the difference in systems and optimization issues.

0reactions
zoontekcommented, Oct 11, 2020

@anastely Android animations don’t perform well, and 50ms is way too low for any kind of animation in general. I recommend 220ms, like Android config_activityDefaultDur value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Analyze and prevent deadlocks - Azure SQL Database
Deadlock alerts enable you to investigate if a pattern of repeat deadlocks is happening in your database, in which case you may choose...
Read more >
I need remote support to resolve a deadlock on my screen to display ...
I need remote support to resolve a deadlock on my screen to display the desktop. When I try to grant the permission I...
Read more >
"Check deadlock!" dilemma | VW Tiguan Forum
With mine a double click of the lock remote disables the tilt and motion sensors of the alarm. The deadlock is automatic.
Read more >
Check Deadlock message - VWWatercooled Australia
its just a reminder that deadlock is on. in case you lock the car with ... MkVI Golf GTI | Candy White |...
Read more >
Beginner's Guide to Deadlocks in Amazon RDS
This will be the downfall of your application. To avoid it, you need to proactively monitor the health of your cluster, number of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found