Getting ionic blank page when running the app for the second time


#1

hi folks, my app is running ok on serve and it runs fine on emulate android, although when i build the apk and signed it, it runs fine at the first attempt and at the second atempt i got the ionic blank page (“world is your oyster…”). I’ve already tried reinstalling both node and ionic and i still having this problem. Hope some of you guys can help me.


#2

Are you using code push or ionic deploy or why other third party auto update thing??


#3

Hi there! i’m building it using ionic cordova build android --prod --release. and afterwards signing it.

My app it’s a single page app, so i’m using “home.html” page from src folder.


#4

That second sentence is giving me pause.

Are you actually doing an Ionic application? I feel there’s something you’re not telling me.


#5

well, i’m following the ionic documentation ( http://ionicframework.com/docs/intro/deploying/ ), i’m following all the steps for deployment. The first time that we run the app, it runs ok, although the second time we got that ionic blank page. I’ve actually i’ve deployed on PlayStore my app with this bug (i only noticed it afterwards), you can try it, just search for “estude para o enade”

btw thank you for trying to help me, i really appreciate that!


#6

I’ll try downloading.


#7

I’ve had a look at your code in the apk. The teste.js file… that is NOT good looking man!!! document.querySelector use is NOT encouraged.

However… I suspect there is a redirect going on to another website running the blank web page as there’s no mention in any file locally. When I install the app, then disconnect all network types, I can launch and relaunch as many times as I want.

Honestly - if you want actual help you can share your original code with me via git or whatever. You have NO trade secrets I haven’t already seen and I don’t speak Greek :wink:

If not then the best of luck.


#8

You have no idea how much you are helping me! Got no secrets at all! I’m doing a quiz app just to help a friend of mine. Yes, my code got tons of bad practice, in fact, I used vanilla javascript instead of angular on 99.9% of my code. Anyways, here’s my poorly written code: https://github.com/osvaldobtorres/EnadeApp


#9

Hey,

That code is not what your app is. You can see on that screen link what home.html looks like.


#10

I’m really sorry about this, I’ve just manually added the correct project now.

https://github.com/osvaldobtorres/EnadeApp

Once again thank you!


#11

This is in your config.xml

  <plugin name="cordova-plugin-ionic" spec="^1.1.8">
        <variable name="APP_ID" value="05ca32c6" /> 
        <variable name="CHANNEL_NAME" value="Master" />
        <variable name="UPDATE_METHOD" value="background" />
  </plugin>

You are / have attempted to auto-update your app using Ionic Pro. I would guess what is stored on the Ionic Pro cloud is what you originally sent me (Master branch).


#12

And never try to crack .document in js, this is utterly bad man ! Eventually the Dom or some class, but never the document like that ($ready with Jquery or so at least).


#13

I can’t believe it! that was it!

Man… I don’t actually know how to thank you! I spent hours and hours trying to figure this out, and it turned out that was a big (and fool) mistake of mine.

Thank you! you are the fkg man!


#14

Thank you! Now I’ll attempt to rewrite this using all the best practices. Thank you for your advice!


#15

Thanks for that.

Please mark as ‘solution’ to whichever post of mine has helped, and if you’re in a position to do so, give $€£20 to a charity of your choice :slight_smile:


#16

Since I’m a student I’m not, although I should, your help was absurdly essential.

Once again thank you, buddy! I owe you one.


#17

Not to worry.

A little life lesson. If you’re studying to be a programmer, forget it. Save your money.

Find some place you can intern / apprentice And work with more experienced people. You’ll be a super star and be paid for the privilege to be so.


#18

Hi there guys. What is the actual solution. Is it to remove the update in background?