Corona Not Building: attempt to index field 'settings'

I’ve just tried building a few small projects with Corona and got the following response:

[lua]
2013-10-01 14:46:54.870 Corona Simulator[44841:e03] Using Custom Build Id 2e6c6635bb8ec9843922848415a60943

Created XCENT: /var/folders/ts/k_6m067s2cj2357181dpwj940000gn/T/1380635214/entitlements.xcent

Runtime error

    ?:0: attempt to index field ‘settings’ (a nil value)

stack traceback:

    [C]: ?

    ?: in function ‘?’

    ?: in function <?:695>

Runtime error: ?:0: attempt to index field ‘settings’ (a nil value)

stack traceback:

    [C]: ?

    ?: in function ‘?’

    ?: in function <?:695>
[/lua]

I’ve tried building larger full-fledged projects and had no problems. The reference to the ‘settings’ field makes me wonder whether Corona now expects and build.setttings file? I’m using build 2013.1217. Anyone else come across this and no what it might be? These small projects were just a single main.lua file and nothing else. 

Hi @tap32,

Does this only happen when you build? Which OS are you building for? Can you build these same projects using public build #1202?

Best regards,

Brent

Hi Brent,

I’m running in OS X 10.7.5 and the builds are Universal. That error message only happens when I try to build.  

I’ve just tried building with 1202 and it does work. I get a warning about it not passing certification as there’s no icons and other things required to pass, but it builds normally.

Here’s the output for comparison:

[lua]

Created XCENT: /var/folders/ts/k_6m067s2cj2357181dpwj940000gn/T/1380807039/entitlements.xcent

mv: rename /Users/tap32/Desktop/showpopupmail.app/icon.png to /Users/tap32/Desktop/showpopupmail.app/Icon.png: No such file or directory

/Users/tap32/Desktop/showpopupmail.app: replacing existing signature

/Users/tap32/Desktop/showpopupmail.app: signed bundle with Mach-O thin (armv7) [uk.ac.cam.medschl.demo]

2013-10-03 14:30:46.440 Corona Simulator[50314:e03] validationTool: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation

[/lua]

Thanks,

Hi @tap32,

You may want to consider upgrading to OS X 10.8.x, since this supports XCode5, which in turn supports building for iOS7. You can see the version chart/support here:

http://en.wikipedia.org/wiki/Xcode#5.0

As for the icon “warnings”, this is because Apple is requiring a few additional app icons sizes for iOS7. We have detailed their sizes and suggested names here:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#appicons

Best regards,

Brent

Hi Brent,

I’ve tried upgrading to 10.8.5, but the problem still persists. The output still looks much the same:

[lua]

2013-10-04 14:23:34.390 Corona Simulator[1416:707] Using Custom Build Id 2e6c6635bb8ec9843922848415a60943

Created XCENT: /var/folders/ts/k_6m067s2cj2357181dpwj940000gn/T/1380893014/entitlements.xcent

Runtime error

    ?:0: attempt to index field ‘settings’ (a nil value)

stack traceback:

    [C]: ?

    ?: in function ‘?’

    ?: in function <?:695>

Runtime error: ?:0: attempt to index field ‘settings’ (a nil value)

stack traceback:

    [C]: ?

    ?: in function ‘?’

    ?: in function <?:695>

[/lua]

Hi @tap32,

After upgrading the OS, did you also upgrade to XCode5? Additionally, which build of Corona are you using for these tests?

Thanks,

Brent

Hi Brent,

I also upgraded XCode (I’m on Version 5.0 (5A1413)) when I upgraded OSX. I get the error with build 2013.1217, but not with 2013.1202. 

Hi @tap32,

Let’s try stepping back to basics. Can you build the Corona sample app “Hello World” on your system using 1217? It’s located in the local application folder: CoronaSDK > SampleCode > GettingStarted > HelloWorld

Please try that and report back what occurs.

Thanks,

Brent

That works fine. Though it does have a build.settings file. It seems to be the absence of that file which causes as issue in 1217.

Hi @tap32,

I’m beginning to suspect that the build.settings file you were using (with the builds that didn’t work) were corrupted somehow. What happens if you use the build.settings file from “Hello World” and copy it over to your own projects?

Brent

Hi Everyone.

I am very new in corona. I just try to create a corona game on window  and using corona starter (free version).

But I don’t know how to put my game into my cell phone (android) and play it.

Could you give me some suggestions please ?

As more details as good. Thank you.

Williams

Hello Williams,

For Android, please follow this guide and video which instructs you on how to install on devices:

http://docs.coronalabs.com/guide/distribution/androidBuild/index.html

http://youtu.be/Omu4TJFZU6k

Sincerely,

Brent Sorrentino

Thank Brent for fast replying.

I created a file .apk and am trying to insert it into my android phone.

Your guide seems to be great. Thank again.

Williams

Hi Brent, 

The projects where I have that build error don’t have build.settings files. If I copy the build.settings file from the Hello World project it works fine. I was wondering if build.settings is now required? The documentation just states it’s optional and in the past I’ve been able to build fine without one (which is mostly for prototypes or bug reports):

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Hi @tap32,

Apparently this has been resolved in more recent builds between #1215 and #1225… definitely by #1225, which we’ve tested. Please test that out and let me know if it works.

Thanks,

Brent

Thanks Brent, that works fine now, I’ve tested with 1233

Hi @tap32,

Does this only happen when you build? Which OS are you building for? Can you build these same projects using public build #1202?

Best regards,

Brent

Hi Brent,

I’m running in OS X 10.7.5 and the builds are Universal. That error message only happens when I try to build.  

I’ve just tried building with 1202 and it does work. I get a warning about it not passing certification as there’s no icons and other things required to pass, but it builds normally.

Here’s the output for comparison:

[lua]

Created XCENT: /var/folders/ts/k_6m067s2cj2357181dpwj940000gn/T/1380807039/entitlements.xcent

mv: rename /Users/tap32/Desktop/showpopupmail.app/icon.png to /Users/tap32/Desktop/showpopupmail.app/Icon.png: No such file or directory

/Users/tap32/Desktop/showpopupmail.app: replacing existing signature

/Users/tap32/Desktop/showpopupmail.app: signed bundle with Mach-O thin (armv7) [uk.ac.cam.medschl.demo]

2013-10-03 14:30:46.440 Corona Simulator[50314:e03] validationTool: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation

[/lua]

Thanks,

Hi @tap32,

You may want to consider upgrading to OS X 10.8.x, since this supports XCode5, which in turn supports building for iOS7. You can see the version chart/support here:

http://en.wikipedia.org/wiki/Xcode#5.0

As for the icon “warnings”, this is because Apple is requiring a few additional app icons sizes for iOS7. We have detailed their sizes and suggested names here:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#appicons

Best regards,

Brent

Hi Brent,

I’ve tried upgrading to 10.8.5, but the problem still persists. The output still looks much the same:

[lua]

2013-10-04 14:23:34.390 Corona Simulator[1416:707] Using Custom Build Id 2e6c6635bb8ec9843922848415a60943

Created XCENT: /var/folders/ts/k_6m067s2cj2357181dpwj940000gn/T/1380893014/entitlements.xcent

Runtime error

    ?:0: attempt to index field ‘settings’ (a nil value)

stack traceback:

    [C]: ?

    ?: in function ‘?’

    ?: in function <?:695>

Runtime error: ?:0: attempt to index field ‘settings’ (a nil value)

stack traceback:

    [C]: ?

    ?: in function ‘?’

    ?: in function <?:695>

[/lua]