I am trying to integrate a KML file to my mobile application.

I upload the file to Data > Resources and I set the Deploy Action to Deploy to Target Directory. I have also tried to set it as Public but didn't do anything.

The KML file is only at the Resources and I am not referring or using the file anywhere else when I publish the application.


When I try to access the application it loops. 

On Chrome Dev Tools console throws the following error:

VersionsManager [2019-01-23T12:02:03.419Z]: Upgrade failed - rolling back to previous application version.
Failed to load resource '/KMLTest/Rio.kml?gpC+EnCD8x3O7vwpT1B3mA' with status:

F @ Logger.js:381


The KMLTest had OutsystemsUI and Google Maps dependencies at first.

I have removed both dependencies and left the KMLTest app with only 1 Flow and 1 screen. No other dependencies but the error remained.

I have tested with several KML files (EX: http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml )  in both Service Studio 11 and Service Studio 10 always with the same result.


Hello Mario,

Are you sure the problem is the KML?
Those errors related to failed upgrade usually are connected to changes in Database, etc.

If you uninstall the application from the mobile and install the new package it still gives you an error?

I used the KML from the link you provided and I was able to install the application without problems.

Cheers.

Eduardo Jauch wrote:

Hello Mario,

Are you sure the problem is the KML?
Those errors related to failed upgrade usually are connected to changes in Database, etc.

If you uninstall the application from the mobile and install the new package it still gives you an error?

I used the KML from the link you provided and I was able to install the application without problems.

Cheers.

Tried uninstall and install again but the error remained.

I also created a new application with a black module, so no tempering with the database or further dependencies, just uploaded the KML file to service studio and deploy to.

From what I tested:

  • If I upload the KML file to any project and publish it returns the errors I mentioned above
  • Same behavior happens on other laptops connected to different environment and different projects
  • In service studio, if I change the file extension from KML to XML the error stops

Unfortunately, for this specific project, the file type must be .kml. It's a requirement that, for the client at this point in time, is non negotiable.

Hello Mario,

Is the environment in the cloud or is a local server (on premises)?

I would say that you probably have some kind of "security" in place that is preventing the KML extension.
Check this: https://success.outsystems.com/Documentation/10/Managing_the_Applications_Lifecycle/Secure_the_Applications/Apply_Content_Security_Policy

The environment may be set in a way that is blocking KML files, for example.

Cheers.