Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS App gets stuck in the Splash Screen. #4496

Closed
Poliuk opened this issue Jun 2, 2015 · 31 comments
Closed

iOS App gets stuck in the Splash Screen. #4496

Poliuk opened this issue Jun 2, 2015 · 31 comments

Comments

@Poliuk
Copy link

Poliuk commented Jun 2, 2015

Since around 3 days ago my meteor App doesn't work anymore, the App only shows the Splash Screen. I'm testing it in 3 environments: myapp.meteor.com, a server with meteor running, and a server with node where I install the App after building it.

I have my code in a repo, and even when I checkout to a previous version the App doesn't work. I'm wondering if there is something new in the meteor.com severs that is crashing my app (discarted update at the end of the post), or if after any update my meteor is building broken Apps.

If I access to myapp.meteor.com via web it works perfectly, but the App doesn't do anything apart from showing the Splash Screen.

What I do is simple:

checkout to a working old version
meteor deploy myapp.meteor.com
meteor run ios-device --mobile-server myapp.meteor.com

It doesn't work either with

meteor build ../build -server myapp.meteor.com
And installing in it with xcode.

At the beginning I thought this was related with my server installation, but then I went back to the meteor.com enviroment and I found that everything was crashing also there. This is why I discarted this problem: #3698

UPDATE A member of my team had and old version of the App installed in his phone. It is pointing to the same myapp.meteor.com and it works. But if I checkout my repo to the same commit, and I build a new App it doesn't work. What makes me thing that my meteor CLI has something new and it's creating broken Apps.

@nicolaslopezj
Copy link

+1

@Poliuk
Copy link
Author

Poliuk commented Jun 2, 2015

@nicolaslopezj do you have the exact same problem? I really want to know if I'm doing something wrong or it is a meteor issue. I will appreciate if you can elaborate to find out whats wrong here :)

@conorstrejcek
Copy link

This is happening for me too. I think it might be connected to that #3698 issue as well.

@Poliuk
Copy link
Author

Poliuk commented Jun 2, 2015

@conorstrejcek what happens if you do the next?

 meteor deploy test.meteor.com
 meteor run ios-device --mobile-server test.meteor.com

Does it work? If it doesn't then I think this is a different issue from #3698

@conorstrejcek
Copy link

@Poliuk You are right, it doesn't seem to work on the Meteor servers either. I guess this is a separate issue.

I took a look at the Safari Developer Console while attempting to run the app on an iDevice, and I got some exceptions which look like they are related to the useraccounts package -- are you by any chance using that package as well?

@Poliuk
Copy link
Author

Poliuk commented Jun 2, 2015

@conorstrejcek yes i'm using it. I'm going to check if it is related... Did you remove it from your project to see what happens?

@conorstrejcek
Copy link

@Poliuk My app relies pretty heavily on it so I haven't tried removing it, but it looks like V2.0 was released 3 days ago: https://github.com/meteor-useraccounts/core/milestones. I'm guessing this is the culprit.

@conorstrejcek
Copy link

@Poliuk Whoops, V2.0 wasn't released haha, but there was an update. It looks like there was a version change to 1.11.0.

@Poliuk
Copy link
Author

Poliuk commented Jun 2, 2015

@conorstrejcek maybe forcing the user accounts version to an older one? Thanks for the hints, I'm going to try ASAP

@conorstrejcek
Copy link

@Poliuk I tried downgrading and that doesn't seem to help, but if I take out the iron router package it seems to get past the splash screen (but it doesn't render anything, obviously).

@stubailo
Copy link
Contributor

stubailo commented Jun 2, 2015

@conorstrejcek have you tried running those commands with meteor --release 1.0 (an older version of Meteor), or on a fresh computer? It might be something about your computer's state, for example cached build data in Xcode or something.

@conorstrejcek
Copy link

@stubailo I just tried this a few times, it looks like the package constraint solver is having issues trying to figure out which packages to include. I will try again later today, but I'm having a lot of difficulty right now.

@conorstrejcek
Copy link

@Poliuk @stubailo Ok, so I came up with a minimally reproducible scenario:

meteor create test-ios
cd test-ios
meteor add-platform ios
meteor add iron:router
meteor run ios or meteor run ios-device

The app will hang on the splash screen. Let me know if this happens for you as well. The app works fine before I add the iron:router package.

@Poliuk
Copy link
Author

Poliuk commented Jun 3, 2015

@conorstrejcek I've tried deleting the caché in Xcode but it doesn't solve the problem.

 cd ~/Library/Developer/Xcode/DerivedData/
 rm -rf * 
 cd ~/meteor-projects/myapp
 meteor run ios-device --mobile-server http://myapp.meteor.com

So in case is a bug related with the state of my computer, we haven't found out how to solve it. After that, I've tried with:

     meteor run ios-device --mobile-server http://myapp.meteor.com --release 1.0

The result is the same... My App doesn't go further from the Splash Screen.

I am now trying to reproduce this in another mac to see what happens.

@conorstrejcek if you check https://github.com/iron-meteor/iron-router/releases Iron router released their v1.0.8 two days ago, in any case, i'm using the v1.0.7 in my project (or at least my .meteor/local/versions has this written) so I think this is not my problem.

@conorstrejcek
Copy link

@Poliuk The issue happened for me regardless of the version of iron:router. I figured out a way to fix it (at least in my case): I was using iron:router but I didn't have any routes set up. When I added a blank route like this:

Router.route('/', function () {});

Then it got past the splash screen and everything worked fine. I don't really understand why this fixed it, because I didn't need to have a route set up for it to work on Web or Android. Hopefully this helps.

@Poliuk
Copy link
Author

Poliuk commented Jun 3, 2015

@conorstrejcek I'm happy to hear you have solved your problem 😄 But still I think I'm facing a different bug not related with iron:router. I'll keep posting here! thanks for your help

@Poliuk
Copy link
Author

Poliuk commented Jun 3, 2015

@stubailo Well, Finally I made it work in another computer. This means that my computer has something broken, but I don't know how to reset it.

Now I only have to deal with #3698

@patrickml
Copy link

+1 after deleting my app in order to work on #3698 when I reload it onto my phone the app gets stuck on the Splash Screen.

Update:
This only seems to be an issue when I run the app while my phone is still plugged into my computer

@joaopiopedreira
Copy link

+1, stuck with the splash screen and nothing happens afterwards. The console output from xcode doesn't show anything abnormal.

@lonehacker
Copy link

+1 Facing the same problem. Any news?

@nicholasalanbrown
Copy link

+1 same here, it was originally an issue with not having any routes set up in iron:router, but now it just hangs for no reason. It works on another machine, but when I clone the same repo on this one it still hangs, even after deleting and reinstalling Xcode and clearing out the cordova build folder...

@exocode
Copy link

exocode commented Aug 4, 2015

I dont know if somebody helps this, but I put

App.setPreference('AutoHideSplashScreen' ,'true');

into my mobile-config.js

@lonehacker
Copy link

I was able to make it work by

  1. Stop the app
  2. Delete the iOS app from the simulator
  3. Restart meteor
  4. Run app on new simulator

@nicholasalanbrown
Copy link

I was able to get past this by running the simulator in production mode:

meteor run ios --production

But since the Xcode 7 beta allows you to run apps on a physical device without an Apple Developer subscription, I've stopped using the Simulator entirely (though it might still be useful to test your app designs on smaller/older devices)

@Poliuk
Copy link
Author

Poliuk commented Aug 17, 2015

@mediatainment Thanks for sharing your solution, it fixed our problems with the Splash Screen.

We just had to add this

 App.setPreference('AutoHideSplashScreen' ,'true’);

In our mobile-config.js

@connorblack
Copy link

+1 for this!

App.setPreference('AutoHideSplashScreen' ,'true’);

Such life saver!

@justinweinberg
Copy link

+1. Saved my bacon

@martijnwalraven
Copy link
Contributor

Could you try if this is still an issue with the latest Meteor 1.3 beta? #6266

Closing this issue in the meantime, please reopen it if you feel this needs further discussion.

@mmaguire400
Copy link

This solution works for 1.3+ as well. Thanks for the help everyone!

@rolljee
Copy link

rolljee commented Jun 23, 2016

Mobile app load "/" route using iron:router, you can trick the router to get to the route you want by default using

Router.route('/(.*)', {
  name: 'main',
});

This worked perfectly to me, i hope this will help !

@sandman45
Copy link

@conorstrejcek that helped me dude!! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests