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

Ionic apps fail with "Error Unable to load app" #23

Open
danroot opened this issue Aug 1, 2019 · 4 comments
Open

Ionic apps fail with "Error Unable to load app" #23

danroot opened this issue Aug 1, 2019 · 4 comments

Comments

@danroot
Copy link

danroot commented Aug 1, 2019

I followed the instructions and some issues (switch to Swift 5, update SnapshotHelper) to get this set up. I was able to run fastlane screenshots and it worked for half of the shots, but failed with a screenshot of "Error Unable to load app" for about half of them. Looking up this error I found it can happen if multiple instances run concurrently as that can cause contention for the port ionic uses to serve up the web content.

From that, I found that adding concurrent_simulators(false) to my Snapfile (or, I would suspect using the corresponding CLI parameter or option in Fastfile) fixed this issue.

I'm actually not sure if this is an Ionic or Cordova issue, but regardless I hope this helps someone and it may be worth adding to the documentation.

@janpio
Copy link
Collaborator

janpio commented Aug 4, 2019

Can you share a screenshot of the error you got? That might enable me to pinpoint the problem a bit.

@danroot
Copy link
Author

danroot commented Aug 5, 2019

To be clear, the error is in the ionic or cordova app, not in this plugin per se. If you don't have any asserts or navigation and are just screenshotting the ionic app's launch page, and you have the default concurrent_simulators=true, and you have multiple devices, then you will get this error for some screenshots. I think this is port contention in the ionic app, though I'm a little fuzzy on how that works. In my case concurrent_simulators(false) in the Snapfile (or equivalent) is a fine fix. I'm just thinking it may be worth documenting, or at least having in this issue thread for a month from now when I forget ;)

iPhone 7 Plus-app-launch

@janpio
Copy link
Collaborator

janpio commented Aug 5, 2019

Yeah, that definitely looks like something inside the app is failing - never seen that before. What webview (plugin name and version) is your app using?

@danroot
Copy link
Author

danroot commented Aug 6, 2019

This is cordova-plugin-ionic-webview, but an older version. It looks like I need to update and try concurrent_simulators:true with that. Will update this issue once I get a chance to do that.

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

No branches or pull requests

2 participants