228
Views
9
Comments
Solved
[IMEI Plugin] Cannot assign a JavaScript object with value null to an output parameter of type Text
Question
imei-plugin
Mobile icon
Forge asset 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.

2026-03-23 09-58-51
Pedro Domingues
Champion
Solution

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.

2026-03-23 09-58-51
Pedro Domingues
Champion

Hello Tjaart.

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

Which OutSystems Platform version are you using?

2017-12-01 10-04-32
Tjaart Swanepoel

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

Tester.oml
2026-03-23 09-58-51
Pedro Domingues
Champion

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.

Cheers


2017-12-01 10-04-32
Tjaart Swanepoel

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;

2026-03-23 09-58-51
Pedro Domingues
Champion

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+?

2017-12-01 10-04-32
Tjaart Swanepoel

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.  

2026-03-23 09-58-51
Pedro Domingues
Champion
Solution

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.

2017-12-01 10-04-32
Tjaart Swanepoel

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.  

2017-12-01 10-04-32
Tjaart Swanepoel

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.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.