Blank Screen on Device

29 replies [Last post]
mmb
User offline. Last seen 1 week 5 days ago. Offline
Joined: 23 Jun 2009

I'm using the trial version of Corona...

I have a simple app that runs fine in the simulator. I've created an App ID for it and a development provisioning profile which uses that AppID and is configured for my device. I selected Open for Build...

1) this particular development provisioning profile does not show up, however a number of other (wildcard) provisioning profiles do show up. They're all in the same folder /Users/matt/Library/MobileDevice/Provisioning Profile

2) I chose one of the wildcard profiles and hit ok in the build dialog. Corona left an an app bundle on my desktop as expected. I copied it over to my device. However when I run it on my device I get a blank screen---well the status bar shows up. I do get the dialog with the message that shows up in the trial version. But no app!

What steps can I take to try and debug this?

Thanks,

Matt

Replies

mmb
User offline. Last seen 1 week 5 days ago. Offline
Joined: 23 Jun 2009

Actually...I should have done a little more research first. I just read the bug report about the problem with filenames greater than 8 chars. I think this is what's happening here. I loaned my iPod out until tomorrow, so I'll try it again then.

Matt

freshworks
User offline. Last seen 6 weeks 6 days ago. Offline
Joined: 25 Aug 2009

Hi mmb,

I have the very same issue, but i think it has to do with the certificate, you need an ADHOC distribution certificate, to work i think, not a developers certificate.

i will test this when i have the time.

Cheers,
Jasper

freshworks
User offline. Last seen 6 weeks 6 days ago. Offline
Joined: 25 Aug 2009

@mmb: Please let me know if you succeeded before i have taken any steps ;)

Thanks

mmb
User offline. Last seen 1 week 5 days ago. Offline
Joined: 23 Jun 2009

Update of tinkering in progress....

I renamed the offending package to have a filename less than 8 characters. Rebuilt. Still blank.

I noticed that when I reopend the simulator, it now sees the developer cert with the specific app ID (as opposed to the one with the wildcard ID which I've been using). Tried that. But now when I try to install it, Xcode complains that

"The entitlements specified in your application's Code Signing Entitlements file do not match those specified in your provisioning profile."

I have an ad hoc deployment cert for this app, but its grayed out in the list in the open for build dialog and says "not available in trial"

I'm going to go back and step through this process slowly and carefully again and see if I can identify any steps I did incorrectly. Note the Corona Device Build Guide says on p. 14 that the "Development profile can be used, but is not necessary."

BTW: should have added this before:

Corona Simulator version is Version 1.0 (2009.11.28.2)
Development device is a MacBook Pro with OS X 10.5.8
My test device is a 2nd gen 16G iPod touch with 3.1.2 (7D11) OS.

Matt

Jeff Johnson's picture
Jeff Johnson
User offline. Last seen 1 year 28 weeks ago. Offline
Joined: 3 Jun 2009

I apologize, but there are a few typos in that guide, such as, there wasn't a trial version when it was written. The trial version will only let you use the 'Development Provisioning Profile'. The paid version lets you use whatever you want. The ad hoc profile is part of the distribution profile, which is why its disabled in the trial.

As for the error you're seeing, it sounds like your provisioning profile doesn't have the device you're using specified in it. If you'll recall, there are check boxes that show up next to the devices you want to allow to be used with that profile.

If all else fails, you can go through the process of creating your profiles again (that seems to help some people who've seen this error). Dump your certificate and private key and have the iphone program portal re-create everything. This process is confusing (not to mention annoying) and even we get tripped up from time to time.

HTH!

mmb
User offline. Last seen 1 week 5 days ago. Offline
Joined: 23 Jun 2009

No problems. I know how hard it is to keep everything up to date, etc. I've double-checked and the profile does have the current device specified. That being the case, your suggestion to dump the certificates and re-create them was what I was leaning towards anyway, so I'll go ahead and do it. Probably won't get around to it until tomorrow.

It certainly feels like on every iPhone project I've done (both straight Obj-C and now tinkering with Corona), the code signing bit is harder than the actual coding :)

Matt

freshworks
User offline. Last seen 6 weeks 6 days ago. Offline
Joined: 25 Aug 2009

Ok, then i'am back with my same issue's

on both 3G and 3GS black screen when starting up, have tested the starfieldsample as you guys made a movie of it.

I have a development certificate witch also let me install apps from out of XCode itself, so the development certificate looks fine, but why then do i not see a starfield, what could then be the problem.

Thanks,
Jasper

Jeff Johnson's picture
Jeff Johnson
User offline. Last seen 1 year 28 weeks ago. Offline
Joined: 3 Jun 2009

Jasper, can you send me your main.lua file? I know you copy pasted it earlier, but I want to take a look at the file itself and see if maybe for some reason its not looking at the characters properly or something along those lines, like smart quotes or some such.

jeff@anscamobile.com

freshworks
User offline. Last seen 6 weeks 6 days ago. Offline
Joined: 25 Aug 2009

@Jeff => Mail is on it's way

Also just build the fishes sample. Installed on the iphone and runs very nice (no black screen), so my certificate is good :)

Jeff Johnson's picture
Jeff Johnson
User offline. Last seen 1 year 28 weeks ago. Offline
Joined: 3 Jun 2009

This is very strange, that file seems to work fine for me as well. Is anyone else seeing this? Jasper, do you have another device you can test on, or just the ipod? I've sent this to one of our developers to take a look at and I'll let you know what he finds.

freshworks
User offline. Last seen 6 weeks 6 days ago. Offline
Joined: 25 Aug 2009

3G and 3GS, same issue, probably has to do with the current version of the iphone OS ?

both iphone's:

3G : version 3.0
3GS : version 3.0

mmb
User offline. Last seen 1 week 5 days ago. Offline
Joined: 23 Jun 2009

In light of freshworks's comment above, I tried building the fishes sample and installing it on my iTouch. Works! So my certificate is good. I went through and commented out 90+% of my app and tried building it and installing it. That works too. So I've gone through and bit by bit been adding code back in. I've finally got the whole thing built and running on my iTouch (it's dog slow, but that's another issue....:)

So I tried to do this methodically to pin down where the problem was but wasn't able to discover that. If I have similar problems in the future, I'll try and get more data. As somebody else mentioned in another thread, on device debugging would be nice. At the very least, being able to get Crash Logs through the Xcode organizer would be a start.

Thanks,

Matt

P.S. I just noticed that the problems freshworks is having are with a "starfields" app. In a strange, Twilight Zone, coincidence, my app has a package named starfields. Maybe the name is cursed! (And maybe the example in the ANSCA docs is influencing a lot of similar minds....;)

PBruce
User offline. Last seen 1 year 5 weeks ago. Offline
Joined: 24 Jun 2009

I had the same problem today with the blank screen. Everything was working fine in the simulator, but once I tried loading it onto the device I got a blank screen. In my case it seems to be related to the file names of my files. I had these files:

class.lua
block.lua
board.lua

After a lot of experimenting I renamed to:

myclass.lua
blockpiece.lua
theboard.lua

And it now works. I'm thinking if there are already some lua files present in the program built for the device with some of these filenames. However, I also couldn't get "gameboard.lua" to work, so it seems fairly random. I must say this needs to be documented somewhere!

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 8 hours 7 min ago. Offline
Ansca Staff
Joined: 22 Jun 2009

We are looking into this right now...

freshworks
User offline. Last seen 6 weeks 6 days ago. Offline
Joined: 25 Aug 2009

@PBruce

Strange , because i have the same problem, but only using a main.lua file

Cheers

Jeff Johnson's picture
Jeff Johnson
User offline. Last seen 1 year 28 weeks ago. Offline
Joined: 3 Jun 2009

Could I get you guys to send me your system profiler output? info@anscamobile.com

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 8 hours 7 min ago. Offline
Ansca Staff
Joined: 22 Jun 2009

is there a way we can get the assets and code to see why it is happening?

Carlos

hainix
User offline. Last seen 39 weeks 15 hours ago. Offline
Joined: 8 Sep 2010

any resolution on this? i'm getting a blank build on iphone as well, even with a sample app

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 8 hours 7 min ago. Offline
Ansca Staff
Joined: 22 Jun 2009

Err I meant, will pick up thread tomorrow and fwd to support ....

me

hainix
User offline. Last seen 39 weeks 15 hours ago. Offline
Joined: 8 Sep 2010

thanks carlos. actually figured out the issue after much headache - the version of the simulator i was using (game edition) was simulating fine when i actually had an io.file() error to an unspecified file, which was causing my application to run fine on the simulator but crash on iphones and the iphone simulator. updating to the latest version of the sdk (2.0) showed me this error in the simulator terminal, and fixing it made it all golden. thanks!

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 8 hours 7 min ago. Offline
Ansca Staff
Joined: 22 Jun 2009

glas to hear it is working

carlos

bedhouin
User offline. Last seen 1 week 2 days ago. Offline
Joined: 15 Nov 2010

I've already sent this in as a bug, but just in case anyone encounters this in the mean time...

Using Corona SDK 237
1. App ran perfectly in Corona Simulator.
2. App would not go past main.lua when built to Android (black screen)
3. App would immediately crash after launching in iPhone Simulator
4. App would not go past main.lua on iPhone but would correctly report in Debug Output window until module function Load.Screen(Next) was encountered. Then the app would freeze with no further information posted to Debug Output or screen

Inside Load.lua was
menu = require( "menu" ) -- lowercase "m"

This was causing app to crash in iPhone simulator and on device as the file was Menu.lua (capital "M")

Changing this worked:
menu = require( "Menu" ) -- Uppercase "M"

So Corona simulator is not case sensitive when it comes to imported Lua files but the Corona build servers are. I'm assuming it's the build server as behaviour was replicated on Android and iPhone devices.

IgnacioIturra
User offline. Last seen 11 weeks 5 days ago. Offline
Joined: 31 Oct 2010

I thought this was known behavior. It's the same with image and music files I believe. Device is always case sensitive.

bedhouin
User offline. Last seen 1 week 2 days ago. Offline
Joined: 15 Nov 2010

Well I wish I had known! Would have saved me several hours of faffing about. This should be documented officially for the time being, and then fixed. If it works on the sim it should work on device. Sim should start throwing errors for case variations.

Mitaten
User offline. Last seen 1 day 4 hours ago. Offline
Joined: 11 Jan 2011

I'm also having this issue..

I've tried
- Changing all my files with long names to shorter.
- Making all my files/code case sensitive adapted

Lots more random stuff, but nothing seems to do it.. App wont get past main.lua and in the OS X simulator it crashes on startup. But everything works fine in the Corona simulator?

Mitaten
User offline. Last seen 1 day 4 hours ago. Offline
Joined: 11 Jan 2011

Realized there's a problem with my build.settings but I have no clue what

settings =
{
orientation =
{
default = "landscape",
},

iphone =
{
plist =
{
UIRequiredDeviceCapabilities = "magnetometer",
UIPrerenderedIcon = true,
},
},

build =
{
custom = "a1234",
}
}

I copied this code from a tutorial on how to make everything landscape mode

Tim
User offline. Last seen 42 weeks 3 days ago. Offline
Joined: 12 Aug 2010

Try removing the custom build setting from your settings file, i.e.,

build =
{
custom = "a1234",
}

Then rebuild your app for device or xcode simulator. That is likely causing you to get a bad build.

Tim

Mitaten
User offline. Last seen 1 day 4 hours ago. Offline
Joined: 11 Jan 2011

Thanks a lot Tim! Works perfect now!

edlvox
User offline. Last seen 11 weeks 5 days ago. Offline
Joined: 5 Jan 2011

Another reason that i found (i'm dumb i know) after several hours of headache is this:

I for some reason put some .lua files (generated by Zwoptex for my sprites) inside an assets folder (my futile attempt to keep things in certain order..) then it worked in Corona Simulator, but not at all in the devices or the iPhone Simulator..

I'm sure it would be general knowledge that you can put a .lua file in a folder (it must be in the root folder as far as i know), but it will be great for a lot of dumb newbies as myself to get an alert in de SDK...

Cheers...

Erick

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.