[IMEI Plugin] Cannot assign a JavaScript object with value null to an output parameter of type Text

Forge Component
Published on 2018-01-12 by Pedro Domingues
0 votes
Published on 2018-01-12 by Pedro Domingues

Hi there,

[ERROR] Cannot assign a JavaScript object with value null to an output parameter of type Text Check the JavaSCript node 'IMEIPlugin' of the action 'GetDeviceIMEI'.  

I have checked the IMEIPlugin inside the GetDeviceIMEI Action of the IMEIPlugin component, but cannot see anything weird or strikingly wrong.  Is there a workaround, since the application of the Plugin is simply done as it is intended.  As far as I understand, the plugin is plug and play.  Any direction would be appreciated.

Hello Tjaart.

Can you provide a sample eSpace with the usage of the component?

Which OutSystems Platform version are you using?

Hi Pedro,

Please see attached.  I neglected half of your message.  We are working on 10.0.807.0.  The android version is Android 5.1.1

It seems that you're using it correctly.

2 questions:

- The IMEI Plugin remains as an independent Application? I mean, the eSpace is contained into the IMEI Plugin application right?

- Does the device have the READ_PHONE_STATE permission granted? Otherwise it won't be able to get the IMEI Address.


Hi Pedro,

If I understand your first question correctly, yes, the IMEI plugin is used by adding it in the dependencies, no part of the logic is imported or copied over.

I have not done anything regarding permissions in previous iterations, but inserted the permission plugin into the code before I call for the IMEI;

I get the following error;

I was asking if the IMEI Plugin is isolated into a single application instead of being part of independent modules, for instance?

You don't need to request for permission because the IMEI PLugin already have that logic. I think the problem might be related with the Android Version.

Can you please perform the test on an Android 6.0+?

The Plugin is not in independent modules.  The Plugin works fine inside Android 6.0+, but I have the Android 5.1.1, which is a device that our client wants to use in his vehicles.  


Ok, i think i know the problem.

Can you please open the IMEI Plugin eSpace and remove all the logic related with the Android Permissions Plugin and try again?

I don't have an old Android to perform the test.


Hi Pedro,

I removed the permissions from the IMEI plugin eSpace, no luck.  I even went and cleared the data and cache in the device still no luck.  

Hi Pedro,

I used the Device plugin and leveraged the UUID in the meantime, till I get a solution for this issue.  Thanks for your support.