Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blank screen on "Ionic dev app" and on "real mobile phone"

I'm new to Ionic and I followed Ionic 4 doc. I just install using ionic start myApp sidemenu --type=angular and didn't modify any code and it works on the browser without any issues. But when I check this on Ionic dev app on the phone it shows a blank page.

And I tried to build the "apk" file and tried to run on the phone. Again it shows the blank page.

Not sure what I missed, I just followed all the instruction mentioned in the doc.

Any ideas ?

like image 436
user2609021 Avatar asked Sep 15 '25 00:09

user2609021


1 Answers

I had the same issue, with Ionic Capacitor. On newer devices or on the web, everything worked ok, but on an older phone, with Android 9, I would get a blank screen.

The error that I got with Insect was at line

cap.handleError = err => win.console.error(err)

Another error for this problem was: Cannot read properties of undefined (reading 'startsWith')

My solution was to modify in tsconfig.json from "target": "es2020" to "target": "es2018"

like image 168
danicode Avatar answered Sep 16 '25 23:09

danicode