White screen on Android 5.1

#1

Hi,

I use Ionic since 2y for an app (of a website). I made an update about one part of it (api change and some logics). A couple of days later some users said in the comments section (play store) they get a white screen on Android 5.1.

I’ve only a 7.1 device. So I opened my project in Android Studio to config an Emulator Device on 7.1 and 5.1. And I get the white screen only on the 5.1. I really don’t understand. On my real device it’s working, on my browser it’s working, on my 7.1 emulator same. But on the 5.1 after the splatch screen I got the white screen. And of course I’ve no error or warning in android studio.

So just for testing I toke my old app.js (all of my JS code is in this file) and the app works (not really because the api calls are wrong but i didn’t get the white screen)

I compared my code with WinMerge and nothing seems false. I searched some JS validator online same.

Someone has a solution so I can see the error? I can’t really give you the code of app.js it’s 3477 line of code :sleeping: .

Thx

_> ionic info:

Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.1.7

#2

Did you remote debug the problem on the device already?
Follow these instructions here to debug the problem in Safari dev tools: https://ionic.zone/debug/remote-debug-your-app#ios
Follow these instructions here to debug the problem in Chrome dev tools: https://ionic.zone/debug/remote-debug-your-app#android
Look at the console and network tabs for errors.

#3

I had no idea we could debug an emulator with chrome. He derectly display the error. Thanks you saved the day.

And for the bug I did that like PHP:

$scope.changeCountry = function(first = false){

}

And of course the correct way was

$scope.changeCountry = function(first){
first = typeof first !== ‘undefined’ ? first : false;
}

Again thx

1 Like