App runs in simulator, not on iPhone, console says "access to protected services is denied"

My app runs fine in the simulator but not on my iPhone. The app is called “TwinMatch” and I get this message in the console:

<Error>: HID: The ‘Passive’ connection ‘TwinMatch’ access to protected services is denied.

<Warning>: Platform: iPhone / iPhone5,1 / 7.1.2 / PowerVR SGX 543 / OpenGL ES 2.0 IMGSGX543-97.7 / 2014.2393

<Warning>: Runtime error

module ‘lib.src.file’ not found:resource (lib.src.file.lu) does not exist in archive

no field package.preload[‘lib.src.file’]

no file ‘/var/mobile/Applications/3752262E-3373-4E2D-9EAF-B256B2CC9008/TwinMatch.app/lib.src.file.lua’

no file ‘/var/mobile/Applications/3752262E-3373-4E2D-9EAF-B256B2CC9008/TwinMatch.app/lib.src.file.lua’

no file ‘./lib.src.file.so’

no file ‘/var/mobile/Applications/3752262E-3373-4E2D-9EAF-B256B2CC9008/TwinMatch.app/lib.src.file.so’

no file ‘./lib.so’

no file '/var/mobile/Applications/3752262E-3373-4E2D-9EAF-B256B2CC9008/TwinMatch.app/lib.so’lib.src.file

But the lib.src.file module is present on my Mac (it’s called ‘File.lua’) are I have been able to run the app on my iPhone in the past without this problem.

What could be going wrong? Thanks in advance.

David

Hi David,

What is this file, and where do you try to access it? Are you trying to require() it in Lua? Can we see some code pertaining to this?

Thanks,

Brent

Brent,

It’s a module that contains utility functions I wrote for various file management tasks, so it makes use of these two Corona libraries:

io.*

system.*

For example, it uses io.open() and system.pathForFile().

And yes, I require it in various other modules in my app.

It was working fine before. I’m wondering whether there’s some kind of profile setting that got tweaked that’s preventing me from opening files on the device. I don’t know why it would do this, though, since all that is supposed to be safely sandboxed.

Thoughts?

David

The device OS is case sensitive.  The error:

<Warning>: Runtime error

module ‘lib.src.file’ not found:resource (lib.src.file.lu) does not exist in archive

no field package.preload[‘lib.src.file’]

 

tells me you are trying to access the following file:  lib/src/file.lua

and that doesn’t exist.  If the file is really “File.lua” but you are doing a require of “lib.src.file”, it will fail on the device.

Rob

Rob,

That partially solved the problem — it eliminated this error:

<Warning>: Runtime error

module ‘lib.src.file’ not found:resource (lib.src.file.lu) does not exist in archive

no field package.preload[‘lib.src.file’]

 

But I am still getting this error:

<Error>: HID: The ‘Passive’ connection ‘TwinMatch’ access to protected services is denied.

 

And my app is not responding to taps on elements that do respond in the Simulator. Don’t know if it’s related to the error message, though.

Any idea what this could be?

David

The HID: The ‘Passive’ connection is a meaningless error.  If you watch your device’s console log you fill find all most every app generates that message.  Searching for the error on Google turns up references for just about every product out there.

Rob

OK, thanks for your help with both of these issues, Rob.

David

Hi David,

What is this file, and where do you try to access it? Are you trying to require() it in Lua? Can we see some code pertaining to this?

Thanks,

Brent

Brent,

It’s a module that contains utility functions I wrote for various file management tasks, so it makes use of these two Corona libraries:

io.*

system.*

For example, it uses io.open() and system.pathForFile().

And yes, I require it in various other modules in my app.

It was working fine before. I’m wondering whether there’s some kind of profile setting that got tweaked that’s preventing me from opening files on the device. I don’t know why it would do this, though, since all that is supposed to be safely sandboxed.

Thoughts?

David

The device OS is case sensitive.  The error:

<Warning>: Runtime error

module ‘lib.src.file’ not found:resource (lib.src.file.lu) does not exist in archive

no field package.preload[‘lib.src.file’]

 

tells me you are trying to access the following file:  lib/src/file.lua

and that doesn’t exist.  If the file is really “File.lua” but you are doing a require of “lib.src.file”, it will fail on the device.

Rob

Rob,

That partially solved the problem — it eliminated this error:

<Warning>: Runtime error

module ‘lib.src.file’ not found:resource (lib.src.file.lu) does not exist in archive

no field package.preload[‘lib.src.file’]

 

But I am still getting this error:

<Error>: HID: The ‘Passive’ connection ‘TwinMatch’ access to protected services is denied.

 

And my app is not responding to taps on elements that do respond in the Simulator. Don’t know if it’s related to the error message, though.

Any idea what this could be?

David

The HID: The ‘Passive’ connection is a meaningless error.  If you watch your device’s console log you fill find all most every app generates that message.  Searching for the error on Google turns up references for just about every product out there.

Rob

OK, thanks for your help with both of these issues, Rob.

David