Capacitor: App stucks on SplashScreen on Android API level 28

The error I am getting on logcat Android Studio: “queueMicrotask is not defined”

ionic info:

Ionic CLI : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.7.5
@angular-devkit/build-angular : 16.1.4
@angular-devkit/schematics : 16.1.4
@angular/cli : 16.1.4
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : 5.1.1
@capacitor/android : 5.1.1
@capacitor/core : 5.1.1
@capacitor/ios : 5.1.1

Utility:

cordova-res : 0.15.4
native-run : 1.7.2

System:

NodeJS : v18.16.0 (/usr/local/bin/node)
npm : 9.8.0
OS : macOS Unknown

Packages:
@angular/animations”: “^16.0.0”,
@angular/common”: “^16.0.0”,
@angular/compiler”: “^16.0.0”,
@angular/core”: “^16.0.0”,
@angular/fire”: “^7.6.1”,
@angular/forms”: “^16.0.0”,
@angular/platform-browser”: “^16.0.0”,
@angular/platform-browser-dynamic”: “^16.0.0”,
@angular/pwa”: “^16.1.4”,
@angular/router”: “^16.0.0”,
@awesome-cordova-plugins/android-full-screen”: “^6.3.0”,
@awesome-cordova-plugins/android-notch”: “^6.4.0”,
@awesome-cordova-plugins/network”: “^6.3.0”,
@capacitor-community/admob”: “^5.0.0”,
@capacitor-community/apple-sign-in”: “^5.0.0”,
@capacitor-community/firebase-analytics”: “^5.0.1”,
@capacitor-community/native-audio”: “github:Iamarslansaleem/native-audio”,
@capacitor-community/native-market”: “^5.0.0”,
@capacitor/android”: “5.1.1”,
@capacitor/app”: “5.0.5”,
@capacitor/app-launcher”: “^5.0.5”,
@capacitor/browser”: “^5.0.5”,
@capacitor/camera”: “^5.0.5”,
@capacitor/core”: “5.1.1”,
@capacitor/device”: “^5.0.5”,
@capacitor/filesystem”: “^5.0.5”,
@capacitor/haptics”: “5.0.5”,
@capacitor/ios”: “5.1.1”,
@capacitor/keyboard”: “5.0.5”,
@capacitor/splash-screen”: “^5.0.5”,
@capacitor/status-bar”: “5.0.5”,
@capacitor/text-zoom”: “^5.0.5”,
@codetrix-studio/capacitor-google-auth”: “^3.3.2”,
@ionic/angular”: “^6.7.5”,
@ionic/storage-angular”: “^4.0.0”,
@mauricewegner/capacitor-navigation-bar”: “^2.0.3”,
@ngx-translate/core”: “^15.0.0”,
@ngx-translate/http-loader”: “^8.0.0”,
@sentry/angular”: “^7.58.1”,
@sentry/tracing”: “^7.58.1”,
“capacitor-rate-app”: “^4.0.3”,
“cordova-plugin-android-notch”: “^1.0.3”,
“cordova-plugin-fullscreen”: “^1.3.0”,
“cordova-plugin-network-information”: “^3.0.0”,
“cordova-plugin-purchase”: “^13.6.0”,
“crypto-browserify”: “^3.12.0”,
“firebase”: “^9.23.0”,
“globalthis”: “^1.0.3”,
“ionicons”: “^7.0.0”,
“jest-worker”: “^29.6.1”,
“jetifier”: “^2.0.0”,
“rxjs”: “~7.8.0”,
“stream-browserify”: “^3.0.0”,
“swiper”: “^8.4.7”,
“tslib”: “^2.3.0”,
“zone.js”: “~0.13.0”

Note: App is working with iOS and all other upper Android API level 29/30… plz help me. thanks!

@mhartington can you help here? please

It appears to be an unsupported JS feature for the device you are testing on. Are you testing on an Android emulator? If so, which one?

You can look at Dev Tools for the device by going to chrome://inspect/#devices in Chrome.

yes! I am testing on android emulator. Name: “Pixel 5 API 28 | Google Apis x84_64”

And getting same error on chrome dev console

From my experience on a Pixel 2 API 28 emulator, API 28 (Android 9) is running an integrated version of Android WebView (not a separate app that is updated independently from the OS like later Android versions). This version is super old and doesn’t support modern web APIs and is not supported by Ionic.

EDIT
Here is a note from Ionic. What does window.navigator.userAgent give you?

I believe this is just an issue with the emulator and not an issue if you were to test on a physical device running API v28.

1 Like

If the Android 28 emulator you created have Google Play you can update the “System WebView” app to get a newer WebView so you can test the apps, but if you use the one it brigs, it’s probably too old.