Geolocation has been disabled in this document by Feature Policy

Hi,

An android mobile app with an iframe and source to a site that requires geolocation is not working. The app is using the Location Plugin to get the authorization for the use of device's location.

The app asks to authorize the use of geolocation during app execution but the when I navigate to the screen with the iframe, the iframe is not able get the location. When I inspect the app, I get the "ERROR(1): Geolocation has been disabled in this document by Feature Policy."

My question is if there is a way to configure iframe attributes when using iframes in Outsystems, for example the allow attribute?

<iframe src="https://other.com/map" allow="geolocation"></iframe>

Or is this a setting that I must configure in Lifetime (Content_Security_Policy)?

Any other Idea?

With IOS, a get a second popup that is asking if the source site may use geolocation and everything is working properly.

Thank you in advance

Daniel Batista




Carlos Daniel Batista wrote:

Hi,

An android mobile app with an iframe and source to a site that requires geolocation is not working. The app is using the Location Plugin to get the authorization for the use of device's location.

The app asks to authorize the use of geolocation during app execution but the when I navigate to the screen with the iframe, the iframe is not able get the location. When I inspect the app, I get the "ERROR(1): Geolocation has been disabled in this document by Feature Policy."

My question is if there is a way to configure iframe attributes when using iframes in Outsystems, for example the allow attribute?

<iframe src="https://other.com/map" allow="geolocation"></iframe>

Or is this a setting that I must configure in Lifetime (Content_Security_Policy)?

Any other Idea?

With IOS, a get a second popup that is asking if the source site may use geolocation and everything is working properly.

Thank you in advance

Daniel Batista




Hey Daniel,

Have bumped into this issue multiple times. A know issue with a combination of iframe and geolocation as far as I remember. 


By any chance can you provide a sample oml. Also if you could share the specific browser versions you are trying this with. Would help suggest better, 


Cheers


Tushar Panpaliya wrote:

Carlos Daniel Batista wrote:

Hi,

An android mobile app with an iframe and source to a site that requires geolocation is not working. The app is using the Location Plugin to get the authorization for the use of device's location.

The app asks to authorize the use of geolocation during app execution but the when I navigate to the screen with the iframe, the iframe is not able get the location. When I inspect the app, I get the "ERROR(1): Geolocation has been disabled in this document by Feature Policy."

My question is if there is a way to configure iframe attributes when using iframes in Outsystems, for example the allow attribute?

<iframe src="https://other.com/map" allow="geolocation"></iframe>

Or is this a setting that I must configure in Lifetime (Content_Security_Policy)?

Any other Idea?

With IOS, a get a second popup that is asking if the source site may use geolocation and everything is working properly.

Thank you in advance

Daniel Batista




Hey Daniel,

Have bumped into this issue multiple times. A know issue with a combination of iframe and geolocation as far as I remember. 


By any chance can you provide a sample oml. Also if you could share the specific browser versions you are trying this with. Would help suggest better, 


Cheers


Hi,

I configured the "allow" iframe atribute in the property window:


An I tested the CSP with the most permissive way:

But still getting the error in devices log (adb):

06-09 11:30:24.845 15955 15955 D SystemWebChromeClient: https://a.abcde.pt/ESTOUAQUI/Scripts/App-all.js?ver=202006091130191149: Line 241 : ERROR(1): Geolocation has been disabled in this document by Feature Policy.

I could create a sample oml but the functionality requires user authentication than I am unable to provide.


Any Ideias?

Cheers