docusign / docusign-esign-php-client

The Official Docusign PHP Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
https://www.docusign.com/devcenter
MIT License
196 stars 123 forks source link

Error: Call to undefined method DocuSign\eSign\Client\Auth\OAuthToken::swaggerFormats() in DocuSign\eSign\ObjectSerializer::sanitizeForSerialization() (line 71 of /app/vendor/docusign/esign-client/src/ObjectSerializer.php) #175

Closed lucasfraulin closed 1 year ago

lucasfraulin commented 2 years ago

Trying to create an envelope while using the eSignature API with JWT authentication. When attempting to create the envelope, I get this error. The OAuthToken doesn't seem to have that method defined but the Object Serializer is still trying to call it.

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method DocuSign\eSign\Client\Auth\OAuthToken::swaggerFormats() in DocuSign\eSign\ObjectSerializer::sanitizeForSerialization() (line 71 of /app/vendor/docusign/esign-client/src/ObjectSerializer.php).
DocuSign\eSign\ObjectSerializer::sanitizeForSerialization(Object) (Line: 332)
DocuSign\eSign\Client\Auth\OAuthToken->__toString() (Line: 62)
Drupal\oeb_docusign\DocusignApi->__construct(Object) (Line: 262)
Drupal\Component\DependencyInjection\Container->createService(Array, 'oeb_docusign.api') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('oeb_docusign.api') (Line: 198)
Drupal::service('oeb_docusign.api') (Line: 31)
Drupal\oeb_docusign\Form\SettingsForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 531)
Drupal\Core\Form\FormBuilder->retrieveForm('oeb_docusign_settings', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm('Drupal\oeb_docusign\Form\SettingsFThe website encountered an unexpected error. Please try again later.
Error: Call to undefined method DocuSign\eSign\Client\Auth\OAuthToken::swaggerFormats() in DocuSign\eSign\ObjectSerializer::sanitizeForSerialization() (line 71 of /app/vendor/docusign/esign-client/src/ObjectSerializer.php).
DocuSign\eSign\ObjectSerializer::sanitizeForSerialization(Object) (Line: 332)
DocuSign\eSign\Client\Auth\OAuthToken->__toString() (Line: 62)
Drupal\oeb_docusign\DocusignApi->__construct(Object) (Line: 262)
Drupal\Component\DependencyInjection\Container->createService(Array, 'oeb_docusign.api') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('oeb_docusign.api') (Line: 198)
Drupal::service('oeb_docusign.api') (Line: 31)
Drupal\oeb_docusign\Form\SettingsForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 531)
Drupal\Core\Form\FormBuilder->retrieveForm('oeb_docusign_settings', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm('Drupal\oeb_docusign\Form\SettingsForm', Object) (Line: 219)
Drupal\Core\Form\FormBuilder->getForm('Drupal\oeb_docusign\Form\SettingsForm') (Line: 24)
Drupal\oeb_docusign\Controller\SettingsFormController->content()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 265)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 132)
Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)orm', Object) (Line: 219)
Drupal\Core\Form\FormBuilder->getForm('Drupal\oeb_docusign\Form\SettingsForm') (Line: 24)
Drupal\oeb_docusign\Controller\SettingsFormController->content()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 265)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 132)
Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Any help is greatly appreciated.

smd9788 commented 2 years ago

Hi @lucasfraulin , can you please verify what version of the SDK you are using and if you installed the Composer dependencies?

If you are still having issues, I would recommend that you open a support case with DocuSign here: http://support.docusign.com/. They would be best equipped to assist you with the issue.