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.

Uncaught (in promise): SplashScreen does not have web implementation (no Promise to chatch)

See original GitHub issue

Yes we know, SplashScreen is for mobile devices and probably not supported also on PWA, at least it is not documented.

But if we run SplashScreen on ionic serve, we run into this error. So having a look from PWA documentation https://capacitor.ionicframework.com/docs/basics/progressive-web-app there is

If your app makes native plugin calls that don’t have a web substitute, such as SplashScreen.show(), the app will allow those calls without crashing. Calls that return a promise will return a rejected promise, which you should be handling in your app anyways.

But neither show() nor hide() has promise to catch. We can only check for Capacitor.isPluginAvailable and omit the calls.

Same thing on Network plugin. Shouldn’t work the plugins in ionic serve as for PWA’s?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

17reactions
Sampath-Lokugecommented, May 21, 2020

This works for me on StatusBar

import { Plugins, PluginRegistry, Capacitor } from '@capacitor/core';

const { SplashScreen, StatusBar }: PluginRegistry = Plugins;

if (Capacitor.isPluginAvailable('StatusBar')) { StatusBar.show() };

1reaction
josh-m-sharpecommented, Nov 16, 2019

As this is still happening with latest capacitor 1.3.0… @mlynch philosophically speaking, isn’t it capacitor’s job to “catch” this exception? Or better yet, shouldn’t capacitor provide a web implementation for things like SplashScreen and simply be a noop?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught (in promise): MyPlugin does not have web ...
I experienced this issue running Capacitor v2.4.7. It appears to be caused by the destructuring of the Plugins object:
Read more >
Uncaught (in promise): PushNotifications does not have web ...
ERROR Error: Uncaught (in promise): PushNotifications does not have web implementation. How to catch this exception for web implementation, ...
Read more >
Push Notifications Capacitor Plugin API
On iOS, the first time you use the function, it will prompt the user for push notification permission and return granted or denied...
Read more >
error: uncaught (in promise): cordova_not_available - You.com
You are accessing native plugins while testing in the browser. In order to make plugins work, you should use a real device to...
Read more >
How to Use Firebase Analytics with Ionic - Devdactic
Setting up Firebase analytics within your Ionic application is ... For the web, you don't get any response of the plugin per default...
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