Bare Android App With Corona Cloud Returns Error

I’m trying to impelent a test app, to get Corona Cloud working. This is my code in the main.lua

 

local coronaCloud = require ( "corona-cloud-core" ) local gameNetwork = require( "gameNetwork" ) local aKey = "4160343537a8fa66dd2a36301ea6bda0f81f367a"; local sKey = "526fa2edc0e79796ce38866298dee169357d4591"; coronaCloud.init( aKey, sKey ) local params = { accessKey = aKey, secretKey = sKey } gameNetwork.init( "corona", params ) gameNetwork.show( "leaderboards" );

On my Windows machine the console says that the gameNetowrk provider (corona) is not available on the simulator. No problem. So I make an Android build, where I get a popUp saying:
"Error This application has encountered a Lua error (see logs) or has been corrupted.

I’m using the latest public release 2013.1076. I have included the corona-cloud-core.lua file from github in the project folder. I can’t make it more simple. What am I doing wrong?

Hi, 

I had the same problem. I think you have to allow internet permissions.

Add this code to your build.settings , maybe this will fix the error.

settings =

{

    android =

    {

           usesPermissions =

           {

              “android.permission.INTERNET”,

              “com.android.vending.CHECK_LICENSE”,

              “com.android.vending.BILLING”

           }

    }    

}

Nope, permissions didn’t help. Here are my 3 files:
main.lua:
 

local coronaCloud = require ( "corona-cloud-core" ) local gameNetwork = require( "gameNetwork" ) local aKey = "4160343537a8fa66dd2a36301ea6bda0f81f367a"; local sKey = "526fa2edc0e79796ce38866298dee169357d4591"; coronaCloud.init( aKey, sKey ) local params = { accessKey = aKey, secretKey = sKey } gameNetwork.init( "corona", params )

build.settings:
 

settings = { orientation = { default = "portrait", supported = { "portrait", } }, iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, } }, android = { usesPermissions = { "android.permission.INTERNET", "com.android.vending.CHECK\_LICENSE", "com.android.vending.BILLING", "android.permission.WRITE\_EXTERNAL\_STORAGE" }, }, }

config.lua:
 

application = { content = { width = 320, height = 480, scale = "letterBox", fps = 30, }, }

I am getting the same error with the same code… Android build.

Using latest release build 2013.1076

What errors are you getting in your console log?

I’ve installed the app on the Android Emulator (AVD), where i get this from the Log:
 

04-06 09:21:52.767: I/Corona(666): Runtime error 04-06 09:21:52.767: I/Corona(666): ERROR: Could not load provider (corona) due to the following reason: module 'cloud\_assets.cloud\_imagesheet\_1x' not found:resource (cloud\_assets.cloud\_imagesheet\_1x.lu) does not exist in archive 04-06 09:21:52.767: I/Corona(666): no field package.preload['cloud\_assets.cloud\_imagesheet\_1x'] 04-06 09:21:52.767: I/Corona(666): no file '(null)/cloud\_assets.cloud\_imagesheet\_1x.lua' 04-06 09:21:52.767: I/Corona(666): no file '(null)/cloud\_assets.cloud\_imagesheet\_1x.lua' 04-06 09:21:52.767: I/Corona(666): no file '/data/data/com.frskypig.cloudapp/lib/libcloud\_assets.cloud\_imagesheet\_1x.so' 04-06 09:21:52.767: I/Corona(666): no file './cloud\_assets.cloud\_imagesheet\_1x.so' 04-06 09:21:52.767: I/Corona(666): no file '(null)/cloud\_assets.cloud\_imagesheet\_1x.so' 04-06 09:21:52.767: I/Corona(666): no file '/data/data/com.frskypig.cloudapp/lib/libcloud\_assets.so' 04-06 09:21:52.767: I/Corona(666): no file './cloud\_assets.so' 04-06 09:21:52.767: I/Corona(666): no file '(null)/cloud\_assets.so'. 04-06 09:21:52.767: I/Corona(666): stack traceback: 04-06 09:21:52.767: I/Corona(666): [C]: ? 04-06 09:21:52.767: I/Corona(666): [C]: in function 'assert' 04-06 09:21:52.767: I/Corona(666): ?: in function 'requireProvider' 04-06 09:21:52.767: I/Corona(666): ?: in function 'setCurrentProvider' 04-06 09:21:52.767: I/Corona(666): ?: in function 'init' 04-06 09:21:52.767: I/Corona(666): ?: in main chunk

Ok, 

Now I think I know the problem. You need to install the  ‘cloud_assets’ folder inside your project folder in order to use Cloud Dashboard.

I explain it here: http://forums.coronalabs.com/topic/33030-corona-cloud-guides/?p=173095

Good luck!

I do not see that folder on the PC side… is this only available on Mac?

This whole thing is getting more than frustrating.  I have been unsuccessful trying to get anything working with the cloud for some time now… logins, dashboard, leaderboards.  Maybe it’s just me.  :frowning:

Come on heads up, the community is there to help :slight_smile:

The folder with sample code is located here:
C://Program Files/Corona SDK/Sample Code

If you are on 64-bit use Program Files(x86) instead

Hope this helps!

Thanks qwertier… but I just don’t see anything there.  Tons of examples in that directory, just not any cloud stuff.  Using 2013.1076

This post  seems to indicate that the example was pulled.  I am wondering if it made it back on the PC yet.  I guess I have to pull it from a Mac.

Yup I see now, nothing on my PC indeed…

Probably because of this http://forums.coronalabs.com/topic/33101-corona-cloud-assets/.

They pulled the plug on the CC dashboard because it was not production ready. You can only get the assets if you are a pro subscriber and download an earlier daily build I think.

However the dashboard not being production ready it might not be the best idea to use it.

You should either wait or try to make a custom dashboard, sorry for the disappointment

Maybe the Corona guys can provide us with more information on this…
 

Hey you are pro I see now…

Why don’t you download an earlier build :wink:

Stupid I did not notice…

Which daily build does include the cloud_assets? Any ideas when this will be production ready?

Most Corona subscribers want to use Corona Cloud the same way as GameCenter (or OpenFeint), where we don’t need to bother with user registration and UI elements of Leaderborads/Achievements.

From the link I posted earlier I believe 2013.1061 should do,

but that’s an earlier build of course.

Hi, 

I had the same problem. I think you have to allow internet permissions.

Add this code to your build.settings , maybe this will fix the error.

settings =

{

    android =

    {

           usesPermissions =

           {

              “android.permission.INTERNET”,

              “com.android.vending.CHECK_LICENSE”,

              “com.android.vending.BILLING”

           }

    }    

}

Nope, permissions didn’t help. Here are my 3 files:
main.lua:
 

local coronaCloud = require ( "corona-cloud-core" ) local gameNetwork = require( "gameNetwork" ) local aKey = "4160343537a8fa66dd2a36301ea6bda0f81f367a"; local sKey = "526fa2edc0e79796ce38866298dee169357d4591"; coronaCloud.init( aKey, sKey ) local params = { accessKey = aKey, secretKey = sKey } gameNetwork.init( "corona", params )

build.settings:
 

settings = { orientation = { default = "portrait", supported = { "portrait", } }, iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, } }, android = { usesPermissions = { "android.permission.INTERNET", "com.android.vending.CHECK\_LICENSE", "com.android.vending.BILLING", "android.permission.WRITE\_EXTERNAL\_STORAGE" }, }, }

config.lua:
 

application = { content = { width = 320, height = 480, scale = "letterBox", fps = 30, }, }

I am getting the same error with the same code… Android build.

Using latest release build 2013.1076

What errors are you getting in your console log?

I’ve installed the app on the Android Emulator (AVD), where i get this from the Log:
 

04-06 09:21:52.767: I/Corona(666): Runtime error 04-06 09:21:52.767: I/Corona(666): ERROR: Could not load provider (corona) due to the following reason: module 'cloud\_assets.cloud\_imagesheet\_1x' not found:resource (cloud\_assets.cloud\_imagesheet\_1x.lu) does not exist in archive 04-06 09:21:52.767: I/Corona(666): no field package.preload['cloud\_assets.cloud\_imagesheet\_1x'] 04-06 09:21:52.767: I/Corona(666): no file '(null)/cloud\_assets.cloud\_imagesheet\_1x.lua' 04-06 09:21:52.767: I/Corona(666): no file '(null)/cloud\_assets.cloud\_imagesheet\_1x.lua' 04-06 09:21:52.767: I/Corona(666): no file '/data/data/com.frskypig.cloudapp/lib/libcloud\_assets.cloud\_imagesheet\_1x.so' 04-06 09:21:52.767: I/Corona(666): no file './cloud\_assets.cloud\_imagesheet\_1x.so' 04-06 09:21:52.767: I/Corona(666): no file '(null)/cloud\_assets.cloud\_imagesheet\_1x.so' 04-06 09:21:52.767: I/Corona(666): no file '/data/data/com.frskypig.cloudapp/lib/libcloud\_assets.so' 04-06 09:21:52.767: I/Corona(666): no file './cloud\_assets.so' 04-06 09:21:52.767: I/Corona(666): no file '(null)/cloud\_assets.so'. 04-06 09:21:52.767: I/Corona(666): stack traceback: 04-06 09:21:52.767: I/Corona(666): [C]: ? 04-06 09:21:52.767: I/Corona(666): [C]: in function 'assert' 04-06 09:21:52.767: I/Corona(666): ?: in function 'requireProvider' 04-06 09:21:52.767: I/Corona(666): ?: in function 'setCurrentProvider' 04-06 09:21:52.767: I/Corona(666): ?: in function 'init' 04-06 09:21:52.767: I/Corona(666): ?: in main chunk

Ok, 

Now I think I know the problem. You need to install the  ‘cloud_assets’ folder inside your project folder in order to use Cloud Dashboard.

I explain it here: http://forums.coronalabs.com/topic/33030-corona-cloud-guides/?p=173095

Good luck!