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.

bug: IonLoading not displaying spinner on Android (React)

See original GitHub issue

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

I’m trying to show an IonLoading popup while my app gets parameters from a server.

Calling the IonLoading element works fine, dismissing too, but it just refuses to show the spinner on Android. In web it works fine. This is the element:

<IonLoading spinner="crescent" isOpen={showLoading} onDidDismiss={() => setShowLoading(false)} message={loadingText} />

I tried manually setting the spinner color, but that didn’t help. When looking into chrome://inspect , I noticed the size of the spinner element was set to zero: image image

Again, I want to stress that this is a screenshot of chrome://inspect of the Android WebView. As you can see, in PWA there is actual content for the spinner; the whole SVG tag is missing in android: image

Expected Behavior

Spinner should show on Android as it does on PWA.

Steps to Reproduce

Create Ionic-React app, configure IonLoading as shown above, show with const [showLoading, setShowLoading} = useState(true);

Code Reproduction URL

No response

Ionic Info

Ionic: Ionic CLI : 6.14.1 (C:\Users\fabia\AppData\Roaming\npm\node_modules@ionic\cli) Ionic Framework : @ionic/react 6.2.7

Utility: cordova-res : 0.15.4 native-run : 1.7.0

System: NodeJS : v18.8.0 (C:\Program Files\nodejs\node.exe) npm : 8.18.0 OS : Windows 10

Additional Information

I tried updating Ionic without success, the behavior persists.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
liamdebeasicommented, Sep 19, 2022

The problem here is that IonLoading does not automatically define child Ionic components used internally. Both IonBackdrop and IonSpinner are used in IonLoading.

0reactions
ionitron-bot[bot]commented, Oct 19, 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 Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Loading spinner not showing - Stack Overflow
I am using firebase in a react native app along with the spinner from 'react-native-loading-spinner-overlay' . Im trying to show the spinner ......
Read more >
Loading | Application Loading Indicator Overlay | ion-loading
The ion-loading overlay indicates activity while blocking user interaction. The loading indicator appears on top of the app's content, and can be dismissed....
Read more >
[Solved]-Loading spinner not showing-React Native
Loading spinner not showing · When I am uploading a image to firebase through expo react native it is not showing the image;...
Read more >
Ionic 5 Add Ion Loading component in Ionic application
In this Ionic 5/4 tutorial, we'll learn how to add loader with a message and an animating spinner in an Ionic application using...
Read more >
Ionic 6 Loading Controller Tutorial with ion-loading Example
With this quick guide's help, we will explain how to show loading indicator or spinner in Ionic Angular using loading controller component.
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