Question

Permission policy violation for geolocation access when using Docusign JS

  • 27 February 2024
  • 4 replies
  • 1240 views

Badge

I’m getting the following permissions policy error when using DocuSign JS on my website. I’ve updated the page headers to set the correct Permissions Policy.

{
key: 'Permissions-Policy',
value: `geolocation=(self "https://apps-d.docusign.com")`

}

 

[Violation] Permissions policy violation: Geolocation access has been blocked because of a permissions policy applied to the current document. See https://goo.gl/EuHzyv for more details.
(anonymous) @ signing_iframeless_mobile.backbone-app.js?cs=e7c9df7fb0be52f728b3:2
ready @ signing_iframeless_mobile.6672.js?cs=cfe5a6fc98b421a49266:2
(anonymous) @ signing_iframeless_mobile.backbone-app.js?cs=e7c9df7fb0be52f728b3:2
(anonymous) @ signing_iframeless_mobile.backbone-app.js?cs=e7c9df7fb0be52f728b3:2
(anonymous) @ signing_iframeless_mobile.js?cs=d822fccc2:2
(anonymous) @ signing_iframeless_mobile.5132.js?cs=36825c07c67f2dd22f3b:2
cu @ signing_iframeless_mobile.172.js?cs=539be489332502f5e410:2
Ns @ signing_iframeless_mobile.172.js?cs=539be489332502f5e410:2
t.unstable_runWithPriority @ signing_iframeless_mobile.172.js?cs=539be489332502f5e410:2
qo @ signing_iframeless_mobile.172.js?cs=539be489332502f5e410:2
Rs @ signing_iframeless_mobile.172.js?cs=539be489332502f5e410:2
(anonymous) @ signing_iframeless_mobile.172.js?cs=539be489332502f5e410:2
P @ signing_iframeless_mobile.172.js?cs=539be489332502f5e410:2
b.port1.onmessage @ signing_iframeless_mobile.172.js?cs=539be489332502f5e410:2

As a result of this error, when the iframe loads, it shows a loading spinner and doesn’t proceed.

 

There are some posts online that say `allow=”geolocation”` needs to be on the `<iframe>` tag. How do I add that using Docusign JS?


4 replies

Userlevel 1
Badge +4

Hello Team

 

Could you please give a try with the below:

attributes: {
    iframe: {
      allow: 'geolocation'
    }
  },

 

https://stackoverflow.com/questions/64582203/how-do-i-allow-the-geolocation-api-inside-an-iframe

 

https://www.docusign.com/blog/developers/new-browser-security-settings-and-iframes

 

https://github.com/krakenjs/zoid/issues/297

"Select as Best" below if you find the answer a valid solution to your issue and mark it as resolved.

--
Thanks & Regards

Sai HariPriya Dandamudi | Developer Support Engineer | DocuSign

Badge

Hello,

 

Where are we supposed to add that code snippet?

 

Like @liquid-chai  the solution I find online is to add allow=“geolocation” in the `<iframe>` but adding the code snippet in the docusign.signing does not change anything.

 

Nowhere in the documentation of the focused view do I find that additional properties can be added so i am stuck with this same problem.

signing_iframeless_mobile.backbone-app.js?cs=536edd6bdbee4c9ad628:2 [Violation] Permissions policy violation: Geolocation access has been blocked because of a permissions policy applied to the current document. See https://goo.gl/EuHzyv for more details.
(anonymous) @ signing_iframeless_mobile.backbone-app.js?cs=536edd6bdbee4c9ad628:2
ready @ signing_iframeless_mobile.6672.js?cs=273da2bbf6939ef6591a:2
(anonymous) @ signing_iframeless_mobile.backbone-app.js?cs=536edd6bdbee4c9ad628:2
(anonymous) @ signing_iframeless_mobile.backbone-app.js?cs=536edd6bdbee4c9ad628:2
(anonymous) @ signing_iframeless_mobile.js?cs=5b477ac2:2
(anonymous) @ signing_iframeless_mobile.5132.js?cs=455f504302575d1778c2:2
kc @ signing_iframeless_mobile.1800.js?cs=88485f841e6f40003f94:2
e.unstable_runWithPriority @ signing_iframeless_mobile.1800.js?cs=88485f841e6f40003f94:2
Wo @ signing_iframeless_mobile.1800.js?cs=88485f841e6f40003f94:2
Lc @ signing_iframeless_mobile.1800.js?cs=88485f841e6f40003f94:2
(anonymous) @ signing_iframeless_mobile.1800.js?cs=88485f841e6f40003f94:2
k @ signing_iframeless_mobile.1800.js?cs=88485f841e6f40003f94:2
E.port1.onmessage @ signing_iframeless_mobile.1800.js?cs=88485f841e6f40003f94:2

As a note I also find it odd that “iframeless” files are being called when the focused view is designed to be embedded in an iframe.

 

Thanks in advance.

 

Badge

 

Hello Team

 

Could you please give a try with the below:

attributes: {
    iframe: {
      allow: 'geolocation'
    }
  },

 

https://stackoverflow.com/questions/64582203/how-do-i-allow-the-geolocation-api-inside-an-iframe

 

https://www.docusign.com/blog/developers/new-browser-security-settings-and-iframes

 

https://github.com/krakenjs/zoid/issues/297

"Select as Best" below if you find the answer a valid solution to your issue and mark it as resolved.

--
Thanks & Regards

Sai HariPriya Dandamudi | Developer Support Engineer | DocuSign

@Sai.Dandamudi Can you please elaborate as to where these need to be set when using the focused view?

Badge

For anyone who is having the permissions gelocalization error, I spoke with docusign global support and they confirmed that it is currently not possible to use geolocation with focused view but an enhancement request has been filed to add this to the product in future versions.

 

Even with the error message the session starts well, this geolocation error should not impact the content to be loaded only the geolocation will not be saved.

 

So @liquid-chai's loading spinner error possibly is due to something else.

Reply