LoadingController.create not returning

I don’t know what went wrong…I updated my project to latest capacitor 8 and angular 20 … and suddenly LoadingController.create is not returning when running the app on Android emulator.

await this.loadingCtrl.create({message: ‘Please wait…’});

In browser everything is fine…but the code doesn’t move beyond this line when running on Android device.

Check DevTools for the WebView running on your Android device for any errors. When the app is running via Android Studio, you can open chrome://inspect/#devices in Chrome to open DevTools for the device.

I found the problem. I was importing LoadingController from @ionic/angular but I actually updated the project to standalone components few days back so I updated the import of LoadingController from @ionic/angular/standalone

import { LoadingController } from ‘@ionic/angular/standalone’

It is working fine now…but Ionic team must look into the issue that why LoadingController from @ionic/angular was working in the browser but not on the device. It should not work on both if /standalone in import is required.

1 Like