Can't download Facebook Analytics plugin from Solar2dMarketplace

I just purchased the license for the facebook analytics plugin on solar2dmarketplace.com but the simulator fails to download it.

This is the plugins table in build.settings:

["plugin.facebookAnalytics"] =
    {
	 	publisherId = "scotth.tech",
	 	supportedPlatforms = {
	 		iphone = { url="https://solar2dmarketplace.com/marketplacePlugins?ID=<id>&plugin=FacebookAnalytics_scotth-tech&type=iOS"},
	 		android = { url="https://solar2dmarketplace.com/marketplacePlugins?ID=<id>&plugin=FacebookAnalytics_scotth-tech&type=Android"},
    macos = { url="https://solar2dmarketplace.com/marketplacePlugins?ID=<id>&plugin=FacebookAnalytics_scotth-tech&type=MacOS"},
	 	}
	 },

This is how I require it in my code:

local facebookAnalytics = require("plugin.facebookAnalytics")

This is the error I get when launching the simulator:

ERROR: Runtime error
/Users/runner/work/corona/corona/platform/resources/init.lua:931: module 'plugin_ facebookAnalytics' not found:
no field package.preload['plugin_facebookAnalytics']
no file '/Users/vince/Library/Application Support/Corona/Simulator/Plugins/plugin_facebookAnalytics.lua'
no file '/Users/vince/Projects/Vince_Game/plugin_facebookAnalytics.lua'
no file '/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/plugin_facebookAnalytics.lua'
no file '/Users/vince/Library/Application Support/Corona/Simulator/Plugins/plugin_ facebookAnalytics.dylib'
no file './plugin_ facebookAnalytics.dylib'
no file '/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/plugin_ facebookAnalytics.dylib'

I’ve tried on both Solar2d versions 3583 and 3601.

@developer0744
I made a mistake on the site, this has been updated on the marketplace
change
macos = {
to
[“mac-sim”] = {

Thanks Scott, I tried that but the build still fails. It seems none of your plugins get downloaded. On build 3583 I see this in the console:

PluginSync: failed to download plugin: http://plugins.coronasphere.com/scotth.tech/plugin.facebookAnalytics/manifest.json?ts=1593551603
PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalabs/plugin.gpgs.v2/2018.3326/mac-sim/plugin.gpgs.v2.zip
PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalabs/CoronaProvider.native.popup.activity/2014.2511/mac-sim/CoronaProvider.native.popup.activity.zip
PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalabs/plugin.openssl/2016.2883/mac-sim/plugin.openssl.zip
PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalabs/plugin.flurry.analytics/2019.3497/mac-sim/plugin.flurry.analytics.zip
PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalabs/plugin.facebook.v4a/2020.3569/mac-sim/plugin.facebook.v4a.zip
PluginSync: failed to download plugin: http://plugins.coronasphere.com/scotth.tech/plugin.reviewPopUp/manifest.json?ts=1593551603
PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalab/plugin.notifications.v2/2020.3569/mac-sim/plugin.notifications.v2.zip
PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalabs/plugin.google.iap.v3/2017.3105/mac-sim/plugin.google.iap.v3.zip
PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalabs/plugin.appodeal.beta.base/2020.3569/mac-sim/plugin.appodeal.beta.base.zip
PluginSync: failed to download plugin: http://plugins.coronasphere.com/scotth.tech/plugin.storeView/manifest.json?ts=1593551603

And then in build 3601, it looks like it tries to download the plugins but I get this error:

WARNING: runtime error while executing plugin locator Custom URL Locator: /Users/runner/work/corona/corona/platform/resources/CoronaBuilderPluginCollector.lua:238: attempt to concatenate global 'developer' (a nil value)
ERROR: Runtime error
/Users/runner/work/corona/corona/platform/resources/init.lua:931: module 'plugin_facebookAnalytics' not found:

@vlads any suggestions?

I’m confused because your other 2 plugins downloaded fine for me a couple weeks ago in build 3583.

@Scott_Harrison @vlads any ideas? Between this marketplace and the new builds I’ve had a very difficult time making simple updates to my app. I was forced to use the last Corona online build since nothing else worked and now after working for a couple weeks the process is broken again.

I’m trying to get my app ready for Appodeal to test as part of their accelerator program. These issues have been blocking me for weeks.

I messaged vlad about this, I think that the lua stubs were being cached from the marketplace and hosted stubs are not actually working but will wait to see what Vlad says. I am doing work on solar2d engine to make it work better with the marketplace. You should be able to add the stub manually still. You should be able to build for the device.

Will look into this more and get back to you

Thank you Scott! Yes this morning I figured out how to mock the stub, I also had to manually download the fbAnalytics plugin and place the data.tgz file in the Application Support folder. This hack is fine for now but it would be nice if the process worked properly.

1 Like

Can you try this in your build.settings
[“plugin.facebookAnalytics”] =
{
publisherId = “tech.scotth”,
supportedPlatforms = {
iphone = { url=“https://solar2dmarketplace.com/marketplacePlugins?ID=&plugin=FacebookAnalytics_scotth-tech&type=iOS”},
android = { url=“https://solar2dmarketplace.com/marketplacePlugins?ID=&plugin=FacebookAnalytics_scotth-tech&type=Android”},
[“mac-sim”] = { url=“https://solar2dmarketplace.com/marketplacePlugins?ID=&plugin=FacebookAnalytics_scotth-tech&type=MacOS”},
}
},

This worked! Thanks Scott!

1 Like