[Resolved] Analytics module is missing in enterprise v971

Error is:
2012-11-26 22:20:04.063 ***[83336:1fa03] Lua Runtime Error: lua_pcall failed with status: 2, error message is: module ‘analytics’ not found:resource (analytics.lu) does not exist in archive
[import]uid: 135827 topic_id: 33371 reply_id: 333371[/import]

You need to make sure you “require” the analytics module like this:

local analytics = require "analytics"

We made a change that removes module names from the global name space. [import]uid: 7559 topic_id: 33371 reply_id: 132543[/import]

Thanks Tom. I know about the module global name change, but I don’t think this is due to that.

Here’s some code I tried:

print("Requiring analytics")  
local analytics = require "analytics"  
print("Analytics is:",analytics)  

And the resulting error

2012-11-26 22:46:09.969 \*\*\*[86745:1fa03] Requiring analytics  
2012-11-26 22:46:09.970 \*\*\*[86745:1fa03] Lua Runtime Error: lua\_pcall failed with status: 2, error message is: module 'analytics' not found:resource (analytics.lu) does not exist in archive  
 no field package.preload['analytics']  
 no file '/Users/george/Library/Application Support/iPhone Simulator/6.0/Applications/92D46B70-571B-4475-97DE-F16C78582BC1/\*\*\*.app/analytics.lua'  
 no file '/Users/george/Library/Application Support/iPhone Simulator/6.0/Applications/92D46B70-571B-4475-97DE-F16C78582BC1/\*\*\*.app/analytics.lua'  
 no file './analytics.so'  
 no file '/Users/george/Library/Application Support/iPhone Simulator/6.0/Applications/92D46B70-571B-4475-97DE-F16C78582BC1/\*\*\*.app/analytics.so'analytics  

[import]uid: 135827 topic_id: 33371 reply_id: 132545[/import]

I too have the same problem and on ios crash app [import]uid: 190293 topic_id: 33371 reply_id: 132569[/import]

Same here. [import]uid: 21746 topic_id: 33371 reply_id: 132576[/import]

i see it as well, but only in one of my apps, the others are ok.
In that one app, i had to uncomment all analytics or i could not build.

i saw the same thing with require(“ads”), had to leave it out.

the inneractive sample project works fine though. [import]uid: 128204 topic_id: 33371 reply_id: 132587[/import]

When you get the error, are you trying to access analytics in a different module (from the one it was “required” in)? Since Analytics, inMobi, and Flurry are now plug-ins, they are not in the global name space and only available in the module (file) where they were loaded. Either remove the “local” statement or “require” them in each module where it’s used.

If you are still having problems, please try running the Analytics sample app and let us know if that’s failing too. [import]uid: 7559 topic_id: 33371 reply_id: 132612[/import]

When you get the error, are you trying to access analytics in a different module (from the one it was “required” in)?
No. This error happens on the require statement itself. As you can see in the code sample and log trace I posted, the error is on this exact line local analytics = require('analytics'). The error message is module 'analytics' not found, which pretty much speaks for itself.

The same code works on the regular non-enterprise sdk with v971. This is exclusively a corona enterprise problem with iOS builds (I haven’t tried android). [import]uid: 135827 topic_id: 33371 reply_id: 132629[/import]

Tried the analytics sample project. Same error module 'analytics' not found. [import]uid: 135827 topic_id: 33371 reply_id: 132630[/import]

Yes, this was a slight oversight in the CoronaSampleApp project settings. The flurry symbols are getting stripped out.

There are 3 project settings you need to modify in your XCode project. You can see them here:

We’ll also be updating the CoronaSampleApp with the correct linker settings set for the next daily build. [import]uid: 26 topic_id: 33371 reply_id: 132644[/import]

@walter Yep, that worked! Thanks! [import]uid: 135827 topic_id: 33371 reply_id: 132645[/import]

You need to make sure you “require” the analytics module like this:

local analytics = require "analytics"

We made a change that removes module names from the global name space. [import]uid: 7559 topic_id: 33371 reply_id: 132543[/import]

Thanks Tom. I know about the module global name change, but I don’t think this is due to that.

Here’s some code I tried:

print("Requiring analytics")  
local analytics = require "analytics"  
print("Analytics is:",analytics)  

And the resulting error

2012-11-26 22:46:09.969 \*\*\*[86745:1fa03] Requiring analytics  
2012-11-26 22:46:09.970 \*\*\*[86745:1fa03] Lua Runtime Error: lua\_pcall failed with status: 2, error message is: module 'analytics' not found:resource (analytics.lu) does not exist in archive  
 no field package.preload['analytics']  
 no file '/Users/george/Library/Application Support/iPhone Simulator/6.0/Applications/92D46B70-571B-4475-97DE-F16C78582BC1/\*\*\*.app/analytics.lua'  
 no file '/Users/george/Library/Application Support/iPhone Simulator/6.0/Applications/92D46B70-571B-4475-97DE-F16C78582BC1/\*\*\*.app/analytics.lua'  
 no file './analytics.so'  
 no file '/Users/george/Library/Application Support/iPhone Simulator/6.0/Applications/92D46B70-571B-4475-97DE-F16C78582BC1/\*\*\*.app/analytics.so'analytics  

[import]uid: 135827 topic_id: 33371 reply_id: 132545[/import]

I too have the same problem and on ios crash app [import]uid: 190293 topic_id: 33371 reply_id: 132569[/import]

Same here. [import]uid: 21746 topic_id: 33371 reply_id: 132576[/import]

i see it as well, but only in one of my apps, the others are ok.
In that one app, i had to uncomment all analytics or i could not build.

i saw the same thing with require(“ads”), had to leave it out.

the inneractive sample project works fine though. [import]uid: 128204 topic_id: 33371 reply_id: 132587[/import]

When you get the error, are you trying to access analytics in a different module (from the one it was “required” in)? Since Analytics, inMobi, and Flurry are now plug-ins, they are not in the global name space and only available in the module (file) where they were loaded. Either remove the “local” statement or “require” them in each module where it’s used.

If you are still having problems, please try running the Analytics sample app and let us know if that’s failing too. [import]uid: 7559 topic_id: 33371 reply_id: 132612[/import]

When you get the error, are you trying to access analytics in a different module (from the one it was “required” in)?
No. This error happens on the require statement itself. As you can see in the code sample and log trace I posted, the error is on this exact line local analytics = require('analytics'). The error message is module 'analytics' not found, which pretty much speaks for itself.

The same code works on the regular non-enterprise sdk with v971. This is exclusively a corona enterprise problem with iOS builds (I haven’t tried android). [import]uid: 135827 topic_id: 33371 reply_id: 132629[/import]

Tried the analytics sample project. Same error module 'analytics' not found. [import]uid: 135827 topic_id: 33371 reply_id: 132630[/import]

Yes, this was a slight oversight in the CoronaSampleApp project settings. The flurry symbols are getting stripped out.

There are 3 project settings you need to modify in your XCode project. You can see them here:

We’ll also be updating the CoronaSampleApp with the correct linker settings set for the next daily build. [import]uid: 26 topic_id: 33371 reply_id: 132644[/import]