docusealco / docuseal

Open source DocuSign alternative. Create, fill, and sign digital documents ✍️
https://www.docuseal.co
GNU Affero General Public License v3.0
5.61k stars 372 forks source link

`application_key` is null on webhook request #201

Closed jaredtbates closed 5 months ago

jaredtbates commented 5 months ago

Hello,

I have a form set up like below. It sent the string for application_key in the webhook request one time but now does not. I do see this in the http requests:

image

We aren't sure why this is happening. We're almost to the end of our integration. Could someone take a look?

      <script type="text/javascript" src="https://cdn.docuseal.co/js/form.js"></script>
      <docuseal-form
        data-src="https://docuseal.co/d/abcdefghijk"
        data-application-key="17fab1c5-c551-4bc8-b372-cfa5e4737931"
        data-with-title="false"
        data-allow-to-resubmit="false">
      </docuseal-form>
omohokcoj commented 5 months ago

@jaredtbates do you load applicationKey from async your backend API to insert in into the attribute with angular? In this case you might need to add if condition to render <docuseal-form only once the applicatioKey is loaded. Mounting <docuseal-form in the DOM triggers a request to initiate a submission so the submission might be initiated without the applicationKey if it was loaded later.

In the resent updates we made <docuseal-form attributes reactive and trigger API request to reinitiate the submission - but it's always better to load everything and only then render/mount <docuseal-form on the DOM.

Let me know if it helped to resolve the issue.

jaredtbates commented 5 months ago

Hi @omohokcoj, I tried clearing my cache and also tried making an index.html form with just the provided HTML above and had the same issue. I see the /forms endpoint call is sending the application_key I specified but later it is null.

image image
omohokcoj commented 5 months ago

@jaredtbates thanks for sharing those screenshot - i think it helped us to identify the issue. Can you please refresh the page (disable cache in dev console just in case) and try to sign again with application key? Let me know if it works now with the recent update.

jaredtbates commented 5 months ago

Thank you! It's working great now!