Custom Script - Error: Module "ini" not found

Custom Script - Error: Module "ini" not found

Hi All,

 

I have v15.2.3.1033, working with TC21 (Android 10) (a couple of TC20 (Android 8.1.0) too).

 

I have a custom script that requires ini : var ini = require('ini'); 

As per https://www.soti.net/mc/help/javascriptapi/en/tutorial-commonTextDataFormats.html#INI-Support

 

My issue is that as stated in the above, the ini extension is built into the agent, but my script run fine on some devices, but others I get the subject error.

Even devices from the same enrolment rule, some work, some say Module "ini" not found.

 

Any ideas?

 

Thanks,

Gary

6 Answers

Order By:   Standard | Newest | Votes
Raymond Chan | posted this 31 July 2021

Are all (those that works fine and those that are problematic) the device agent of the SAME version AND build numbers?  

  • 0
  • 0
Gary Nye | posted this 02 August 2021

Same version (ie: Version 10) but an example of a working build number, 10-12-13.00-QG-U17-STD-HEL-04 and one example not working 10-16-10.00-QG-U00-STD-HEL-04.

Didn't think of build number before this post.

I've not checked the Android 8.10 yet.

 

I have a custom data from the console, this works.

My script checks the last modified date of a log file and updates the same ini file that the console is reading. This is why I am a bit surprised some devices can read an ini file in a script and some can't.

 

  • 0
  • 0
Raymond Chan | posted this 02 August 2021

In my last post,  I was not talking about device firmware version/build numbers, but MobiControl device agent version/build numbers rather.

 

However, you can tabulate both for all the devices you have and see if there is any CONSISTENT error pattern related to particular combination for firmware/device-agent for each device model you have.

 

 

 

  • 0
  • 0
Gary Nye | posted this 02 August 2021

Hi Raymond,

 

Got you.

 

I've not gone around all devices to get their build versions due to being out in the field.

 

But, by Agent Version:

Agent Version Ini Info

14.4.3.1074  

14.4.4.1051  

14.4.5.1033  

14.4.6.1001  

14.4.7.1084  

14.5.0.1011 Worked

14.5.1.1074 Worked

14.5.3.1017 Worked

14.5.4.1016 Not active

 

So seems anything < v14.5 has the issue.

How can I upgrade the Agent, I don't seem to have the Enable Agent Upgrade option. (I've only really seen that after a major upgrade of SOTI, though I do have the option to disable agent upgrade).

I've looked at https://docs.soti.net/mobicontrolagentdownloads/ but that doesn't seem to list the agent version number.

 

Thanks

 

EDIT::

Using the above link, the left hand download, is the latest version in Google Play, and creating a MCStudio package fixed my issue, the ini script run on the handhelds.

  • 0
  • 0
Raymond Chan | posted this 12 August 2021

If you meant ALL your devices with device agents v14.5.0.1011, v14.5.1.1074 and v14.5.3.1017 work while those of lower versions all failed,  then the consistent pattern is highly likely to suggest your statement that v14.5+ is required for the feature you use.

 

Regarding device agent upgrade, the best approach may depend on whether you are using generic Android-Enterprise device agent or OEM specific Android+ device agent, and the device OEM brand/model (which in your case is Zebra TC20/TC21).  Please provide related information.

 

  • 0
  • 0
Gary Nye | posted this 12 August 2021

Hi Raymond, 

 

I can't make my on reply as a solution.

 

But, as per my edit in the previous, using the download from the URL and creating a MC Studio package (current version 14.5.5.1023) worked.

Surprised there is no easy Upgrade Agent from inside MC (but this does appear after a major upgrade)

 

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback