• Resolved wizdude

    (@wizdude)


    greetings,

    last week the connection from the Dynamics 365 plugin suddenly started failing.

    on 1st August i created a new secret as the previous one had expired. everything was running fine until 16th August when it appears to have started failing.

    the logs show:

    [2023-08-16 01:53:34] wpcrm.NOTICE: Purging all caches and storage. [] [][2023-08-16 01:53:34] wpcrm.ALERT: Connection to CRM has been ceased. [] [][2023-08-16 01:53:34] wpcrm.NOTICE: Connecting to a new instance {“settings”:{“authMode”:”OnlineFederation”,”crmUrl”:”https://xxxx.crm6.dynamics.com/”,”ignoreSslErrors”:false,”strictFederatedSTS”:false}} [][2023-08-16 01:53:34] crmtoolkit.CRITICAL: Exception during instantiation of the CRM Toolkit. {“exception”:”[object] (BadMethodCallException(code: 0): AlexaCRM\\CRMToolkit\\Client constructor requires Username and Password at /home/xxxx/public_html/wp-content/plugins/integration-dynamics/vendor/alexacrm/php-crm-toolkit/src/Client.php:179)”} [][2023-08-16 01:53:34] wpcrm.ERROR: CRM connection attempt failed with exception. {“credentials”:[“https://xxxx.crm6.dynamics.com/”,”12121212-3434-5656-7878-999999999999″],”exception”:”[object] (BadMethodCallException(code: 0): AlexaCRM\\CRMToolkit\\Client constructor requires Username and Password at /home/xxxx/public_html/wp-content/plugins/integration-dynamics/vendor/alexacrm/php-crm-toolkit/src/Client.php:179)”} [][2023-08-16 01:53:34] wpcrm.ALERT: Connection to CRM has been ceased. [] [][2023-08-16 01:53:54] wpcrm.NOTICE: Purging all caches and storage. [] [][2023-08-16 01:53:54] wpcrm.ALERT: Connection to CRM has been ceased. [] []

    when i enter in the secret again and save it, i get this at the top of the wordpress admin screen:

    Unable to connect to Dynamics 365: Argument 1 passed to DOMDocument::importNode() must be an instance of DOMNode, null given. Check whether you selected the appropriate deployment type and that CRM URL and credentials are correct.

    i tried the trick of changing from username/password to OAuth 2.0, providing dummy details and then switching back which i read in another post, but this made no difference.

    i enabled debug and tried to connect again. here is the debug log:

    [2023-08-21 05:00:20] wpcrm.NOTICE: Connecting to a new instance {“settings”:{“authMode”:”OnlineFederation”,”crmUrl”:”https://xxxx.crm6.dynamics.com/”,”ignoreSslErrors”:false,”strictFederatedSTS”:false}} []
    [2023-08-21 05:00:20] crmtoolkit.DEBUG: cURL version {“curlVersion”:{“version_number”:481024,”age”:10,”features”:288343965,”ssl_version_number”:0,”version”:”7.87.0″,”host”:”x86_64-redhat-linux-gnu”,”ssl_version”:”OpenSSL/1.1.1p”,”libz_version”:”1.2.7″,”protocols”:[“dict”,”file”,”ftp”,”ftps”,”gopher”,”gophers”,”http”,”https”,”imap”,”imaps”,”ldap”,”ldaps”,”mqtt”,”pop3″,”pop3s”,”rtsp”,”scp”,”sftp”,”smb”,”smbs”,”smtp”,”smtps”,”telnet”,”tftp”],”ares”:””,”ares_num”:0,”libidn”:”2.3.0″,”iconv_ver_num”:0,”libssh_version”:”libssh2/1.10.0″,”brotli_ver_num”:0,”brotli_version”:””},”tls_constants”:{“CURL_SSLVERSION_TLSv1_2”:true}} []
    [2023-08-21 05:00:20] crmtoolkit.DEBUG: Executing Execute request {“request”:”AccessTypeDefaultRetrieveCurrentOrganization”} []
    [2023-08-21 05:00:21] crmtoolkit.DEBUG: Executed a SOAP request in 0.27267813682556 seconds {“request”:”https://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issueurn:uuid:55555555-6666-7777-8888-999999999999https://www.w3.org/2005/08/addressing/anonymoushttps://login.microsoftonline.com/RST2.srf2023-08-21T05:00:20.00Z2023-08-21T05:05:20.00Z11111111-2222-3333-4444-555555555555urn:crmoce:dynamics.comhttps://schemas.xmlsoap.org/ws/2005/02/trust/Issue”,”response”:”https://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issuehttps://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous2023-08-21T05:00:21.1660652Z2023-08-21T05:05:21.1660652Zurn:crmoce:dynamics.com0x8004882c0x80045b00″} []
    [2023-08-21 05:00:21] crmtoolkit.INFO: Issued a new security token [organization] – expires at: Sun, 31 Dec 1899 00:00:00 +0000 [] []
    [2023-08-21 05:00:21] wpcrm.ERROR: CRM connection attempt failed with exception. {“credentials”:[“https://xxxx.crm6.dynamics.com/”,”11111111-2222-3333-4444-555555555555″],”exception”:”[object] (TypeError(code: 0): Argument 1 passed to DOMDocument::importNode() must be an instance of DOMNode, null given at /home/xxxx/public_html/wp-content/plugins/integration-dynamics/vendor/alexacrm/php-crm-toolkit/src/Client.php:1410)”} []
    [2023-08-21 05:00:21] wpcrm.ALERT: Connection to CRM has been ceased. [] []

    (i have changed my username in the logs above to 111111-2222-3333-4444-555555555555)

    is there something that has changed at the Dynamics 365 end which requires remediation in this plugin? or a new procedure to be followed at the Dynamics 365 end?

    many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author alexacrm

    (@alexacrm)

    @wizdude

    i tried the trick of changing from username/password to OAuth 2.0, providing dummy details and then switching back which i read in another post, but this made no difference

    Is that a typo? Because username/password are no longer supported. You have to switch to a valid app id/secret combination.

    If you are using appid/secret then please send debug logs to [email protected] and we’ll have a look.

    Thread Starter wizdude

    (@wizdude)

    greetings,

    thank you. i have just realised now that I need to select the authentication method as “OAuth 2.0 / Shared Secret” and now it has successfully reconnected back to Dynamics 365.

    cheers, Wiz!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘connection broke to dynamics’ is closed to new replies.