plugin_coronaAds.lua not found

Hi, all.

I just implemented Corona Ads according to these instructions (using the code generated just for me):

https://monetize.coronalabs.com/corona-dash/?track=dev-portal#/dashboard/integrate?_k=0i5lp2

and then crosschecked my implementation with these instructions (using the demo code):

https://monetize.coronalabs.com/corona-dash/?track=dev-portal#/dashboard/integrate?_k=0i5lp2

The problem is that when I run my game, I get the following error:

Aug 31 04:34:55.546 WARNING: plugin.coronaAds is not configured in build.settings stack traceback: main.lua:452: in main chunk Aug 31 04:34:55.546 Aug 31 04:34:55.583 ERROR: Runtime error module 'plugin\_coronaAds' not found: no field package.preload['plugin\_coronaAds'] no file '/Users/teagendensmore/Library/Application Support/Corona/Simulator/Plugins/plugin\_coronaAds.lua' no file 'plugin\_coronaAds.lua' no file '/Applications/CoronaSDK-2938/Corona Simulator.app/Contents/Resources/plugin\_coronaAds.lua' no file '/Users/teagendensmore/Library/Application Support/Corona/Simulator/Plugins/plugin\_coronaAds.dylib' no file './plugin\_coronaAds.dylib' no file '/Applications/CoronaSDK-2938/Corona Simulator.app/Contents/Resources/plugin\_coronaAds.dylib' stack traceback: [C]: in function 'require' ?: in function 'require' main.lua:452: in main chunk

I googled around to see if I need to download these plugin files, but didn’t get any hits. 

I did just register for Corona Ads today, could this issue be due to the registration being so new?  

Thanks!

I am sure one of the experts will weigh in, but here are my thoughts since I am working through similar issues…

Yes - there is a period before your account is live - but I don’t think that would keep the plugin from installing.  You can see the status on your Dashboard.

The plugins are automatically installed during the build process - if you have the build.settings file correct and require the plugins per the instructions on the pages you need them.

And you do need to go through build process to build this for a device, since the simulator will not load/use the ads plugins.

Hope this answers some questions until the pros weigh in…

Hello Teagen,

Have you updated your project’s build.settings to include Corona Ads plugin and its dependencies? Please refer: https://docs.coronalabs.com/plugin/coronaads/index.html#project-settings

Regards,

Vamsee

@sonyayllc

I’ve built for both the simulator and my device and get the same errors. When I build for my device (an iPhone), I get the attached error message. 

@vamsee

My project’s build.settings do include Corona Ads plugin and its dependencies. I’ve tried using just the code that you linked to, the very similar code that was generated for me when I signed up for Corona Ads and many permutations of all that code (via changing the order of tables in build.settings plugins section and removing things related to Android). 

@all

If plugins are installed at build time and I’m missing those files, it seems possible that seem my build.settings must have an error I’m not seeing. Below is my entire build.settings file.

Thanks for your help. 

settings = { plugins = { -- includes IAP Badger as a plug in ["plugin.iap\_badger"] = { -- required publisherId = "uk.co.happymongoose", }, }, { -- include activity popup plugin to support sharing of high scores ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, }, }, }, { --include Corona Ads plugin ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["shared.android.support.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.chartboost"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.adcolony"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } } }, UIBackgroundModes = { "audio" }, orientation = { default = "portrait", supported = { "portrait" } }, iphone = { plist = { CFBundleDisplayName = "Cracked - The ULTIMATE casual puzzle game", CFBundleName = "Cracked", CFBundleIconFiles = {}, -- Required UILaunchImages = {}, -- Required UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, UIStatusBarHidden = true, --MinimumOSVersion = "7.0", --Corona Ads Values NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, NSLocationAlwaysUsageDescription = { "" }, NSLocationWhenInUseUsageDescription = { "" }, LSRequiresIPhoneOS = true, CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, -- Launch image files table UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 4 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 4 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPhone 5 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPhone 5 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPad Pro Portrait ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Portrait-1366", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{1024, 1366}" }, { -- iPad Pro Landscape Right ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Landscape-1366", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{1024, 1366}" }, { -- iPad Pro Landscape Left ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Landscape-1366", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{1024, 1366}" }, }, } } }

It looks like you have a curly brace problem:

 plugins = { --\<------ opens the plugin table -- includes IAP Badger as a plug in ["plugin.iap\_badger"] = { -- required publisherId = "uk.co.happymongoose", }, }, --\<------ closes the plugin table. { --\<------ probably a numerically indexed entry in the settings table -- include activity popup plugin to support sharing of high scores ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, }, }, }, { --include Corona Ads plugin ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["shared.android.support.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.chartboost"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.adcolony"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } } },

The build.settings is just one big Lua table that’s indexed by keys instead of numbers. There should one big plugin table.  Something more like:

 plugins = { -- includes IAP Badger as a plug in ["plugin.iap\_badger"] = { -- required publisherId = "uk.co.happymongoose", }, -- include activity popup plugin to support sharing of high scores ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, }, }, --include Corona Ads plugin ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["shared.android.support.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.chartboost"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.adcolony"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } } },

Rob

Aha, yes, I misunderstood how the table was supposed to be structured. Rob, thanks so much! 

I am sure one of the experts will weigh in, but here are my thoughts since I am working through similar issues…

Yes - there is a period before your account is live - but I don’t think that would keep the plugin from installing.  You can see the status on your Dashboard.

The plugins are automatically installed during the build process - if you have the build.settings file correct and require the plugins per the instructions on the pages you need them.

And you do need to go through build process to build this for a device, since the simulator will not load/use the ads plugins.

Hope this answers some questions until the pros weigh in…

Hello Teagen,

Have you updated your project’s build.settings to include Corona Ads plugin and its dependencies? Please refer: https://docs.coronalabs.com/plugin/coronaads/index.html#project-settings

Regards,

Vamsee

@sonyayllc

I’ve built for both the simulator and my device and get the same errors. When I build for my device (an iPhone), I get the attached error message. 

@vamsee

My project’s build.settings do include Corona Ads plugin and its dependencies. I’ve tried using just the code that you linked to, the very similar code that was generated for me when I signed up for Corona Ads and many permutations of all that code (via changing the order of tables in build.settings plugins section and removing things related to Android). 

@all

If plugins are installed at build time and I’m missing those files, it seems possible that seem my build.settings must have an error I’m not seeing. Below is my entire build.settings file.

Thanks for your help. 

settings = { plugins = { -- includes IAP Badger as a plug in ["plugin.iap\_badger"] = { -- required publisherId = "uk.co.happymongoose", }, }, { -- include activity popup plugin to support sharing of high scores ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, }, }, }, { --include Corona Ads plugin ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["shared.android.support.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.chartboost"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.adcolony"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } } }, UIBackgroundModes = { "audio" }, orientation = { default = "portrait", supported = { "portrait" } }, iphone = { plist = { CFBundleDisplayName = "Cracked - The ULTIMATE casual puzzle game", CFBundleName = "Cracked", CFBundleIconFiles = {}, -- Required UILaunchImages = {}, -- Required UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, UIStatusBarHidden = true, --MinimumOSVersion = "7.0", --Corona Ads Values NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, NSLocationAlwaysUsageDescription = { "" }, NSLocationWhenInUseUsageDescription = { "" }, LSRequiresIPhoneOS = true, CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, -- Launch image files table UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 4 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 4 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPhone 5 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPhone 5 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPad Pro Portrait ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Portrait-1366", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{1024, 1366}" }, { -- iPad Pro Landscape Right ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Landscape-1366", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{1024, 1366}" }, { -- iPad Pro Landscape Left ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Landscape-1366", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{1024, 1366}" }, }, } } }

It looks like you have a curly brace problem:

 plugins = { --\<------ opens the plugin table -- includes IAP Badger as a plug in ["plugin.iap\_badger"] = { -- required publisherId = "uk.co.happymongoose", }, }, --\<------ closes the plugin table. { --\<------ probably a numerically indexed entry in the settings table -- include activity popup plugin to support sharing of high scores ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, }, }, }, { --include Corona Ads plugin ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["shared.android.support.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.chartboost"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.adcolony"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } } },

The build.settings is just one big Lua table that’s indexed by keys instead of numbers. There should one big plugin table.  Something more like:

 plugins = { -- includes IAP Badger as a plug in ["plugin.iap\_badger"] = { -- required publisherId = "uk.co.happymongoose", }, -- include activity popup plugin to support sharing of high scores ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, }, }, --include Corona Ads plugin ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["shared.android.support.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.chartboost"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.adcolony"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } } },

Rob

Aha, yes, I misunderstood how the table was supposed to be structured. Rob, thanks so much!