New mobile chrome apps are just displaying a blank screen on ios sim and ios devices

633 views
Skip to first unread message

Will C

unread,
Oct 29, 2014, 11:36:51 PM10/29/14
to chromi...@chromium.org
For the past week, I have had a problem building mobile chrome apps for ios.

Here are the steps to create a basic new app and recreate this issue- I've done it on two different macs - a Macbook Air 2013 and a Macbook Pro 2014.

1) Create a new Chrome App using the Chrome Dev Editor New Project -> JavaScript Chrome App - I called it "HelloWorld"
2) Run cca create and copy-from the directory created by the Chrome Dev Editor: 

cca create HelloWorldApp --copy-from=HelloWorld

3) The new HelloWorldApp will run fine on android, but when I run
cca emulate ios
or 
cca run ios

I just get a blank screen.  The remote debug tool doesn't show any error messages.

I've used both cca 0.4.1 and 0.4.3.  I've tried deploying to devices running both ios 8.0.1 and ios 8.1.  Both of the Macs I've tried this on are running Mac 10.9.6 and Xcode 6.1.

Is anyone else encountering this issue?  This same workflow used to work just a few weeks ago. I think the only things that might have changed are my Xcode or ios versions.  I've tried it with a vulcanized Polymer chrome extension (built with the Chrome Dev Editor) as well as an angular app.  Both just display the blank screen on ios emulators and devices, but are fine on android, and the original apps load fine as unpackaged chrome extensions in the browser.  Please let me know if there's more information I can provide to help reproduce this issue and resolve it.

Michal Mocny

unread,
Oct 29, 2014, 11:53:25 PM10/29/14
to Will C, Chromium Apps
Do you have a device with iOS 7 you could try on?  If not, I'll attempt to repeat the steps tomorrow morning.

I'm curious to isolate cca changes from cordova-ios changes, and there have been a lot of cordova-ios changes for iOS 8 recently.

-Michal

--
You received this message because you are subscribed to the Google Groups "Chromium Apps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-app...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-apps/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Rajender M

unread,
Oct 30, 2014, 2:13:11 AM10/30/14
to chromi...@chromium.org
also I get a blank screen for android..
see
Regards
Rajender

Michal Mocny

unread,
Oct 30, 2014, 12:38:28 PM10/30/14
to Rajender M, Chromium Apps
Rajender, thats not related, but I'll try to get someone to take a look and answer on that thread.

Michal Mocny

unread,
Oct 30, 2014, 12:45:43 PM10/30/14
to Will C, Chromium Apps
Will, I just tried:
- Create a default app using cca: runs fine on iOS8
- Import the default app created by CDE: import fails due to error with version number (Filed #401).
- Changed the version number manually, then import succeeds: runs fine on iOS8

I'm on OSX 10.9.5 and using Xcode 6.0.1.

So, either the problem is specific to Xcode 6.1 (I'll take a stab at upgrading), or your local environment perhaps?

Michal Mocny

unread,
Oct 30, 2014, 1:06:26 PM10/30/14
to Will C, Chromium Apps
Upgraded to 6.1 and also works.

Hmm.  If you are able to attach the remote inspector, may you run "chrome.runtime.reload()" from the console?  This way, you will see the app reload with the console attached from the very beginning of the bootstrapping process, which often shows more details, especially with errors during startup.

-Michal

Will C

unread,
Nov 1, 2014, 1:34:31 AM11/1/14
to chromi...@chromium.org, wi...@infomofo.com
Hi Michal-

Thanks for taking the time to look into this. I think I made a mistake explaining the steps to recreate the issue when I first posted- I actually had used the "Javascript Chrome App (Using Polymer Paper Elements)" when creating the Chrome Dev Editor project.  If you do the steps I mentioned before with that template, and you refactor for csp you will hopefully be able to replicate the issue I have encountered.

Unfortunately when I encounter the issue I can't seem to attach the chrome remote debugger on the iPhone or on the simulator.  

I have pushed the resulting generated cca app directory in its entirety to this github repository: 

(the repo is about 71 megs because I've committed all the generated projects for debugging purposes)

When I run "cca run android" from this directory it brings up the working polymer application on my android phone.  When I run "cca emulate ios" I get a blank screen on my ios simulator, and I get the same result when I run "cca run ios" on my phone.

I also encounter this same issue with a more complicated angular application; I will try to create a sample repository with a simple angular chrome application to replicate the issue and post back here.

Thanks again for looking into this.

Will C

unread,
Nov 1, 2014, 12:16:21 PM11/1/14
to chromi...@chromium.org, wi...@infomofo.com
Also, this may be related to a github issue that eahutchins reported two days ago here which agrieve suggests may be fixed in a newer version of cordova.

Michal Mocny

unread,
Nov 3, 2014, 9:25:46 AM11/3/14
to Will C, Chromium Apps
Will, I'll take a look this afternoon -- but wanted to point out that you will not be able to use Chrome Dev Tools to inspect iOS apps, by design.

You have to use Safari remote inspector, and you can find some guides here.  Perhaps repeating the debug steps suggested using safari remote inspector will yield you some more clues.

Will C

unread,
Nov 3, 2014, 9:35:05 AM11/3/14
to chromi...@chromium.org, wi...@infomofo.com
Ah thanks for clarifying. So when I run chrome.runtime.reload, I encounter the same issue reported in the github issue I linked.

[Log] deviceready has not fired after 5 seconds. (cordova.js, line 1156)
[Log] Channel not fired: onDOMContentLoaded (cordova.js, line 1149)

Let me know if there's any other information I can provide.

Michal Mocny

unread,
Nov 3, 2014, 10:20:08 AM11/3/14
to Will C, Chromium Apps
Awesome, thanks for the debugging and for the github issue.  Assuming thats the problem, you've helped us tremendously to resolve the issue1

Thomas Markiewicz

unread,
Nov 24, 2014, 3:50:34 PM11/24/14
to chromi...@chromium.org, wi...@infomofo.com
Any updates or workarounds that work for this?  I'm running into the same issue - seeing the same logs about deviceready and onDOMContentLoaded not firing.  I'm using the cca 0.5.0 and latest web components.js

Michal Mocny

unread,
Nov 24, 2014, 5:49:30 PM11/24/14
to Thomas Markiewicz, Chromium Apps, Will C
Resolution was that there was no root cause found, and the issue went away with app restructuring.

If you run `chrome.runtime.reload()` while having the remote devtools console attached, you will see startup errors which may lead to clues.

-Michal
Reply all
Reply to author
Forward
0 new messages