[Google Maps Mobile] Invalid call of the 'CheckAndChangeAnchors' client action

[Google Maps Mobile] Invalid call of the 'CheckAndChangeAnchors' client action

  
Forge Component
(5)
Published on 21 Jul (4 weeks ago) by OutSystems Labs
5 votes
Published on 21 Jul (4 weeks ago) by OutSystems Labs

Hi,

We've been seeing below error message in our logs and we are not sure how to go about it without modifying this component.

Invalid call of the 'CheckAndChangeAnchors' client action of the 'MainFlow.CustomerDetail' since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action.

Is there a way to handle this in our CustomerDetail page?

Please advise.

Regards,

Rom

Hello Ron.

Can you provide more details? Like what are you trying to accomplish, if you are using custom JavaScript, etc?

Maybe provide a small module reproducing the error?

Cheers,

Eduardo

Hi Eduardo,

It is a mobile app. The page is a customer detail and it contains a Google Map component which displays the map based on the location coordinates information contained in a table. The customer address is used in case the coordinates are not provided.

We are not using custom JavaScript on this page.

Regards,

Rom

Hi Rom,

It seems that there is a bug on the component, more specifically it's missing some cleaning on the OnDestroy event. I'll try to take a look today and upload a new version to the Forge.

Regards

Hi again Rom,

After checking our component, and the apps that use it, everything seems to be ok. What version of the component are you using? It might be that one of the older versions had a bug that was already corrected and published. (I checked the last one)

Regards

ondestroy  is removed

Hi Francisco,

We have the latest version downloaded last May 9th.

Regards


Hi Rom,

I re-checked everything and we really do not have any problem with the last maps version. Both on our apps or with the component code itself.
Can you further explain your scenario? If you could send an oml with the problem it would be very appreciated!

Regards

Hi Francisco,

Pls find attached oml file.

The error seems to appear on the MainFlow.CustomerDetail page. 

Invalid call of the 'CheckAndChangeAnchors' client action of the 'MainFlow.CustomerDetail' since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action.

Regards

Solution

Hi Rom,

I was checking specifically the Map block and the bug was on the SingleLocationMap. It was indeed a problem on the OnDestroy event that wasn't updated as the one from Map is. I just published a new version of Maps with that fix and some other things.

Also, the SingleLocationMap might be deprecated in a near future so I would recommend that you use Map instead.

Thank you very much for the feedback!
Regards

Solution

Hi Francisco,

Looks great! I am no longer getting the message in our error log. Thanks for the update!

By the way, if SingleLocationMap will be deprecated, can we have its Address parameter be available in Map so I can use it if my coordinates are not available? This way, I can show the approximate location based on address information. We don't want to update the backend with exact coordinates unless user clicks the GetLocation button.

Regards

Hi Francisco,

It seems like another error is appearing and this time, it's the InitMap.

Invalid call of the 'InitMap' client action of the 'MainFlow.CustomerDetail' since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action.

Regards