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

bug: SplashScreen: Splash.show promise never resolves when SplashScreenShowOptions are provided #3143

Closed
sergiomilici opened this issue Jun 23, 2020 · 1 comment · Fixed by #3144

Comments

@sergiomilici
Copy link
Contributor

Bug Report

Splash Screen plugin: The method show returns a promise which resolves after the splash screen is shown. If it's called with no parameters, the promise resolves, but if it's called with some parameters, the promise never resolves.

I also tried the callback, but it was never called.

Capacitor Version

💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 2.2.0

  @capacitor/core: 2.2.0

  @capacitor/android: 2.2.0

  @capacitor/electron: 2.2.0

  @capacitor/ios: 2.2.0

Installed Dependencies:

  @capacitor/electron not installed


  @capacitor/core 2.1.2

  @capacitor/cli 2.0.1

  @capacitor/ios 2.2.0

  @capacitor/android 2.1.2

[success] Android looking great! 👌
  Found 7 Capacitor plugins for ios:
    capacitor-firebase-auth (0.3.0)
    cordova-plugin-buildinfo (4.0.0)
    cordova-plugin-calendar (5.1.5)
    cordova-plugin-geolocation (4.0.2)
    cordova-plugin-whitelist (1.3.4)
    cordova-plugin-device (2.0.2)
    cordova-plugin-ionic-keyboard (2.2.0)
[success] iOS looking great! 👌

Platform(s)

This is happening on android & ios

Current Behavior

The following code shows the problem:

  async show(): Promise<void> {
    await SplashScreen.show({
      autoHide: false,
      fadeInDuration: 0,
    });
    console.log('Showing splash...'); // THIS LINE IS NEVER EXECUTED
}

but if we remove the options:

  async show(): Promise<void> {
    await SplashScreen.show();
    console.log('Showing splash...'); // THIS LINE IS EXECUTED 
}

Expected Behavior

The promise returned by SplasScreen resolves.

Other Technical Details

Ionic Info

Ionic:

   Ionic CLI                     : 6.1.0 (/Users/chicho/.nvm/versions/node/v12.13.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.2.2
   @angular-devkit/build-angular : 0.901.9
   @angular-devkit/schematics    : 9.1.0
   @angular/cli                  : 9.0.1
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.0.1
   @capacitor/core : 2.1.2

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res (update available: 0.15.0) : 0.8.1
   native-run                             : 1.0.0

System:

   ios-deploy : 1.9.2
   ios-sim    : 8.0.2
   NodeJS     : v12.13.0 (/Users/chicho/.nvm/versions/node/v12.13.0/bin/node)
   npm        : 6.14.5
   OS         : macOS Catalina
   Xcode      : Xcode 11.5 Build version 11E608c

Additional Context

Nothing really special. Just call the show method with options and wait for the promise to be resolved.

@sergiomilici sergiomilici changed the title SplashScreen: Splash.show promise never resolves when SplashScreenShowOptions are provided bug: SplashScreen: Splash.show promise never resolves when SplashScreenShowOptions are provided Jun 23, 2020
@ionitron-bot
Copy link

ionitron-bot bot commented Nov 11, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants