Embedded signing with focused view not redirecting after signing

  • 28 February 2024
  • 6 replies

Badge +1

I am using the Docusign SDK in a .Net web application.  I am creating an envelope and then sending the client a URL.  With this URL it opens a page that uses the envelopeid to generate the signing URL and then using Docusign JS to display within the page.   Everything is working except for the returnURL.  Once signing is completed it just displays a blank page.  The browser is returning this error in the console.

Refused to frame 'https://localhost:44377/' because it violates the following Content Security Policy directive: "frame-src 'self'".

I am assigning the FrameAncestors and Message Origins.  Not sure what I am missing here. 



Best answer by Byungjae.Chung 20 June 2024, 05:48

View Original

6 replies

Userlevel 1
Badge +4



I'm Sai with DocuSign Developer Support. Could you please:

Enable API logging and re-produce your use case, then attach to the case.
Record a HAR file of the error, export and attach to the case (Here is how to do this:
Export the console logs of the error and attach to the case (Here is how to do this:
Here are the instructions for API logging: 

The API Request Logs show the exact API request received by DocuSign which will provide more clues on what's happening. API Request logs are user dependent and when making calls using the DocuSign API via your app, the activity would be logged to the DocuSign user making the API calls. 

To get the API Request Logs, login to the DocuSign user that makes the API calls to create the envelopes:
1) You would click your Profile image, and select My Preferences in the dropdown menu. 
2) Clear logs if there are any.
3) Make sure logging is enabled.
4) Click Save. 
5) Run your process via your application to send the DocuSign envelope. 
6) Once that completes, refresh the General Settings page in DocuSign and click Download. 
7) You can then send over the zip folder for us to review (there should be a file in that zip folder with a name that includes something like "Created_CreateEnvelope" if the call completes successfully or “BadRequest” if you got an error.

This article includes visual steps for capturing API Request Logging:


Please open a support case with DS with all the details above as there is an existing investigation going on this issue.


"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



Any update here?


Same problem with Node SDK, everything works fine, but on redirect the iframe throw the error

Refused to frame 'https://myapp.url/' because it violates the following Content Security Policy directive: "frame-src 'self'".

RecipientViewRequest definitions:

viewRequest.frameAncestors = ['https://myapp.url', '']
viewRequest.messageOrigins = ['']

Was there a solution to the problem that you can share?


Thanks in advance.


Userlevel 1
Badge +2

By design, the focused view allows the customer to do whatever they need to do on the page by using the event handlers. That is, even though you get the CSP error, you can redirect the page by adding the line "" under "sessionEnd" event handler like the below:

signing.on('sessionEnd', (event) => {
 console.log('sessionend', event); = event.returnUrl; // redirect to the return Url

The CSP error is caused as your redirect URL is not registered in the CSP rule. But it doesn't matter to redirect your page to the target page with the code above. 


Yes I am using the 'sessionEnd' event but I am not redirecting to another page, everything is done within the same page.

Actually in 'sessionEnd' I hide the element where the document is rendered, but if the document is rejected it is redirected inside the ds generated iframe and the error is fired, it does not affect the user but the error is registered in console.

Badge +1

Byungjae.Chung  solutions solved my problem, it bypasses the error and redirects the page.Thanks!