Amazon Ads Plug-in crashes at app startup?

Hello, 

I just bought the Amazon plug in (so I can take advantage of Amazon $6 eCPM of course!) but unfortunately I cannot make it work (see error message below)  In the simulator it just show the wheel  and I can see runtime error (see below) And If I  try to build it for a device, it gives me a error message as well (see below) 

For now I can think of two possible issues:

1- I no longer have access to the email I use in my Corona subscription (PRO) so when I bought the plug-in, I gave an email account I have access to. Does this may explain the error below? (i.e.: the email I gave is not the email connected to my Corona subscription) I never had time to change it…

2- Maybe it is the Corona build I am still using #1260. I used that one because my app is still using the old graphics.  Does the plug-in works with that version?  I have many plug ins that still work with that old version (i.e.:social, admob…)

I really want to take advantage of the Amazon mobile ads. Please help!

Mo.

ps: What is your refund policy if I cannot make it work?

——————————————————————————————————

WHEN I INCLUDE THE PLUG IN MY BUILD SETTINGS LIKE THIS

   [“plugin.amazonAds”]                     =       { publisherId = “com.deleurapps”,},

I GET THE FOLLOWING ERROR MESSAGE

2014-08-02 19:27:37.787 Corona Simulator[3272:507] The file sandbox for this project is located at the following folder:

(/Users/mbennouf/Library/Application Support/Corona Simulator/Stickman100_AMAZON-31DDDC6EA900E95E766A58FF69B378AE)

Runtime error

?:0: attempt to index global ‘context’ (a nil value)

stack traceback:

?: in function ‘findPluginToDownloadFromServerCatalog’

?: in function ‘handleManifestDownload’

?: in function <?:474>

Runtime error: ?:0: attempt to index global ‘context’ (a nil value)

stack traceback:

?: in function ‘findPluginToDownloadFromServerCatalog’

?: in function ‘handleManifestDownload’

?: in function <?:474>

AND WHEN I TRY TO BUILD FOR A DEVICE, I GET THE FOLLOWING ERROR MESSAGE IN A POP UP WINDOW

A device build error occurred on the server. 

BuildID: 53dd9c621db02 

Error: Get plugin failed. 

Publisher: com.deleurapps 

Plugin: plugin.amazonAds

Here my code (just about the same as the example)

 local amazonAds = require “plugin.amazonAds”

local json = require “json”

local adsLib = {};

local function Callback(event)

print("Callback: "…json.encode(event))

if event.name == “license” then

print("event.type: "…event.type, "event.status: "…event.status)

elseif event.name == “collapsed” then

print(“Ad collapsed”)

elseif event.name == “failed” then

print(“Ad failed to load. isError:”…tostring(event.isError), event.response)

elseif event.name == “loaded” then

print(“Ad loaded”, event.response)

elseif event.name == “expanded” then

print(“Ad expanded”)

elseif event.name == “dismissed” then

print(“Ad dismissed”)

end

end

amazonAds.init({ appKey = “XXXXXXXXXXXXX”, testMode = true, licenseKey = “YYYYYYYYYYYYY”}, Callback)

Then later I show my ads like this:

amazonAds.show({size = “interstitial”}) 

And here my build settings

[“plugin.amazonAds”]                     =       { publisherId = “com.deleurapps”,},

Hey there.

We don’t develop this plugin, but work with deleur apps (who develop it) so i will forward this onto him too.

The problem is that the plugin isn’t been downloaded from Corona’s server.

There is a minimum build requirement set for the plugin (i.e. corona version), which i don’t know off hand… But i will check it out and reply back to this when i wake up and we will get this resolved.

Thanks

Hi!

Thanks a lot for your reply! Yes I am not sure if the current Corona build I am using would work with the plug in. Unfortunately I bought it to use for a game that was build under #1260. It will be difficult to switch to the new graphic mode (2.0) without too much time testing the game under the new build…

My biggest fear (and the one most easy to fix i think) is that like I said, I gave a different email that the one I used under my Corona subscription when I was buying the plugin. The buy form seems to ask for the Corona account email so I am thinking now that maybe important (you do not ask for any email…) I do not know how you (or Deleur) uses the email provided but if it is important to have the actual Cororona account email address (and not any other email) then maybe that is why the server is not sending the plugin at app start?

In any event I cannot wait to figure out this issue so I can take advantage to the current Amazon ads deal :slight_smile:

Thanks again for the quick response.

Mo.

Just for reference, the email address has no bearing on the plugin being downloaded or not :slight_smile:

I meant to mention that in my previous reply. I’ll have an answer for you soon on the build required.

Cheers

Mo, have you tried adding: graphicsCompatibility = 1 to your config.lua (where you set the height and width) and see what its like under Graphics 2.0?  You of course will still have to do some testing and maybe a little adjusting, but it’s not as painful as converting it in whole to G2.0.

You cannot deploy to Apple with build 1260 due to Apple’s requirements to use Xcode 5.1.1. in the build process.  2189a was the first public build to support it.  I forget which daily build after 2189 got that requirement.

If you plan to use AdMob ads, you have to use Daily build 2264 or later because of a change in requirements to the minimum Android OS.  Amazon and Barnes & Nobel are the last markets you can deploy with using 1260 and any plugin that needs Google’s new AdvertisingIdentifier will require 2264 or later and it’s very possible that The Amazon Ad’s plugin may need that feature.

Rob

Ah cool! I was very worried about it!

THANK YOU!.

Mo

Hi Rob,

THANK YOU so much for that great summary of what is needed now. I appreciate that. No I did not try that compatibility mode but I should (just busy making other apps…) Yes Amazon seems to be the last one that will accept anything :slight_smile:  The app I am planning on releasing to Amazon (again just to get the ads deal) only uses Vungle and Chartboost. So I basically I want to replace Chartboost (full screen) by the Amazon ads and so that is why I bought the plugin.

I will try the compatibility mode and see if the app works more or less since I am using Particle Candy quit a bit on that app…

Thanks again for the summary, it will be very useful I assure you that :slight_smile:

Mo

“Good news” I used the graphicCompatible mode and was able to run the app more or less. But the main thing is that now I am getting Amazon ads! (test mode) The app seems to be more the most part functioning but had some really bad issue like not detecting some obvious collision with the terrain below (static) but detecting other collisions with coins/powerups (dynamic) and when I exit the app the app crash. These issues were not present in my 1260 build version (now I am using #2363)

It is clear to me that I have some work to do before I can send the app to Amazon with the new plugin and the new build!  Still I am encourage that the Amazon plugin seems to work with #2363. I will be interested to find out the minimum build for the ads plugin to work?

Hope this will someone here who is hoping to use the Amazon ads plugin. Thanks Rob for suggesting the compatibility mode!

Mo.

Is there a reason you’re using 2263 instead of 2381?  We fixed a bunch of bugs  since then.

Rob

Nope :slight_smile: I will try 2381!

Mo

edit: my bad, I was using 2363 not 2263…But I will try the newest build or the last public one and see.

Ok, the minimum supported version is: v2189.

Regarding your collision issues, there have been a few threads posted around here that indicate that this was due to a fix in the box2d library that caused issues with small/tiny physics bodies.

The solution is to make your bodies a little bigger until they are valid physics bodies.

Cheers

Thanks! That good to know about the minimum build.

Thanks for the info about the collision! I did not know it was an issue when going from 1260 to newer build?  My physics objects cannot really be define as very small (most are 30+ pixel radius)  but I will check.  The hero collide fine with the powerups and enemies (dynamic objects) But for some reason none (hero,powerups and enemies) seems NOT to collide with any walls (static)?

In any event thank you again for your help. I appreciate it.

Mo

Here my code (just about the same as the example)

 local amazonAds = require “plugin.amazonAds”

local json = require “json”

local adsLib = {};

local function Callback(event)

print("Callback: "…json.encode(event))

if event.name == “license” then

print("event.type: "…event.type, "event.status: "…event.status)

elseif event.name == “collapsed” then

print(“Ad collapsed”)

elseif event.name == “failed” then

print(“Ad failed to load. isError:”…tostring(event.isError), event.response)

elseif event.name == “loaded” then

print(“Ad loaded”, event.response)

elseif event.name == “expanded” then

print(“Ad expanded”)

elseif event.name == “dismissed” then

print(“Ad dismissed”)

end

end

amazonAds.init({ appKey = “XXXXXXXXXXXXX”, testMode = true, licenseKey = “YYYYYYYYYYYYY”}, Callback)

Then later I show my ads like this:

amazonAds.show({size = “interstitial”}) 

And here my build settings

[“plugin.amazonAds”]                     =       { publisherId = “com.deleurapps”,},

Hey there.

We don’t develop this plugin, but work with deleur apps (who develop it) so i will forward this onto him too.

The problem is that the plugin isn’t been downloaded from Corona’s server.

There is a minimum build requirement set for the plugin (i.e. corona version), which i don’t know off hand… But i will check it out and reply back to this when i wake up and we will get this resolved.

Thanks

Hi!

Thanks a lot for your reply! Yes I am not sure if the current Corona build I am using would work with the plug in. Unfortunately I bought it to use for a game that was build under #1260. It will be difficult to switch to the new graphic mode (2.0) without too much time testing the game under the new build…

My biggest fear (and the one most easy to fix i think) is that like I said, I gave a different email that the one I used under my Corona subscription when I was buying the plugin. The buy form seems to ask for the Corona account email so I am thinking now that maybe important (you do not ask for any email…) I do not know how you (or Deleur) uses the email provided but if it is important to have the actual Cororona account email address (and not any other email) then maybe that is why the server is not sending the plugin at app start?

In any event I cannot wait to figure out this issue so I can take advantage to the current Amazon ads deal :slight_smile:

Thanks again for the quick response.

Mo.

Just for reference, the email address has no bearing on the plugin being downloaded or not :slight_smile:

I meant to mention that in my previous reply. I’ll have an answer for you soon on the build required.

Cheers

Mo, have you tried adding: graphicsCompatibility = 1 to your config.lua (where you set the height and width) and see what its like under Graphics 2.0?  You of course will still have to do some testing and maybe a little adjusting, but it’s not as painful as converting it in whole to G2.0.

You cannot deploy to Apple with build 1260 due to Apple’s requirements to use Xcode 5.1.1. in the build process.  2189a was the first public build to support it.  I forget which daily build after 2189 got that requirement.

If you plan to use AdMob ads, you have to use Daily build 2264 or later because of a change in requirements to the minimum Android OS.  Amazon and Barnes & Nobel are the last markets you can deploy with using 1260 and any plugin that needs Google’s new AdvertisingIdentifier will require 2264 or later and it’s very possible that The Amazon Ad’s plugin may need that feature.

Rob

Ah cool! I was very worried about it!

THANK YOU!.

Mo

Hi Rob,

THANK YOU so much for that great summary of what is needed now. I appreciate that. No I did not try that compatibility mode but I should (just busy making other apps…) Yes Amazon seems to be the last one that will accept anything :slight_smile:  The app I am planning on releasing to Amazon (again just to get the ads deal) only uses Vungle and Chartboost. So I basically I want to replace Chartboost (full screen) by the Amazon ads and so that is why I bought the plugin.

I will try the compatibility mode and see if the app works more or less since I am using Particle Candy quit a bit on that app…

Thanks again for the summary, it will be very useful I assure you that :slight_smile:

Mo