[Location Plugin] GetLocation error

[Location Plugin] GetLocation error

  
Forge Component
(5)
Published on 23 Nov (2 weeks ago) by OutSystems
5 votes
Published on 23 Nov (2 weeks ago) by OutSystems

Hello guys, I'm receiving an error every time I want to get a location from the device (GPS is on, High Accuracy enabled as well). 


Error code is -1 and the error message is:

Cannot assign a JavaScript object with value null to an output parameter of type Integer Check the JavaScript node 'GetLocationJS' of the action 'GetLocation'.



Hello, José,

Thanks for sharing this: turns out we need to extra safe on our success callbacks. We'll fix it on our next version.

To anyone wordering: the GetLocation action uses callback based logic for success and failure scenarios, but we assumed that in a success scenario, all values would be properly filled-in by the plugin. In this case, this device returned 'null' for Heading, Altitude and couple of other properties, which in turn resulted in a runtime cast error.

Best regards,

Carlos Simões