Skip to content

Fix names only in soap messages. #1205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

alex-eri
Copy link

@alex-eri alex-eri commented Dec 6, 2022

Without namespace check this function fails with Exception has occurred: TypeError: Cannot read properties of undefined (reading 'description') if Message>Body tags deepper inside answer.

Copy link

@pestig pestig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a same problem with deep Body tag. It's fixed my problem also.

@w666
Copy link
Collaborator

w666 commented Jul 17, 2024

Hi @alex-eri @pestig

I am happy to merge it and include into next release, it just requires a test. If you can add one that would be great.

@w666 w666 self-requested a review August 7, 2024 09:22
Copy link
Collaborator

@w666 w666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a unit test

Fails with `Exception has occurred: TypeError: Cannot read properties of undefined (reading 'description')` if Message>Body tags deepper inside answer.
@w666
Copy link
Collaborator

w666 commented Jul 9, 2025

I rebased this, but some tests failed. I was about to approve it without a test but seems like this change breaks something.

@smokhov
Copy link
Contributor

smokhov commented Jul 10, 2025

Weird. Those appear timeout errors though. Possible infra issues of GitHub? Maybe can simply re-run the job in GitHub's GUI?

@w666
Copy link
Collaborator

w666 commented Jul 16, 2025

The test suite is a bit weird, it does log errors as timeouts, debugging it is a kinda pita.

@smokhov
Copy link
Contributor

smokhov commented Jul 17, 2025

it seems the errors are in WSSecurityPlusCert.ts. When running npm cover locally I get the same exact errors even without the change proposed here by removing it.

@smokhov
Copy link
Contributor

smokhov commented Jul 18, 2025

Very weird. Now most tests on my local system pass. It went down from 11 to 1 (WSSecurityCert rsa-sha1), then to 2 not passing ("before all" hook for "lastElapsedTime is computed"). And this includes master without the proposed change. It seems almost each time I run npm run cover the numer of tests failing changes. Something is off here...

I get no more time out errors (previously I tried with the timeout settings, as well as catcbing done (per this post), but that led to more errors that I could not make sense of.

My current failures locally are:

  587 passing (3s)
  2 pending
  2 failing

  1) SOAP Client
       "before all" hook for "lastElapsedTime is computed":
     Uncaught Error: listen EADDRINUSE: address already in use :::54454
      at Server.setupListenHandle [as _listen2] (node:net:1908:16)
      at listenInCluster (node:net:1965:12)
      at Server.listen (node:net:2067:7)
      at Context.<anonymous> (test/client-response-options-test.js:33:12)
      at process.processImmediate (node:internal/timers:483:21)

  2) WSSecurityCert
       should use rsa-sha1 signature method when the signatureAlgorithm option is set to WSSecurityCert:
     Error: error:03000098:digital envelope routines::invalid digest
      at Sign.sign (node:internal/crypto/sig:128:29)
      at node-soap/node_modules/xml-crypto/lib/signature-algorithms.js:11:32
      at RsaSha1.getSignature (node_modules/xml-crypto/lib/types.js:52:20)
      at SignedXml.calculateSignatureValue (node_modules/xml-crypto/lib/signed-xml.js:327:42)
      at SignedXml.computeSignature (node_modules/xml-crypto/lib/signed-xml.js:763:18)
      at WSSecurityCert.postProcess (lib/security/WSSecurityCert.js:2:10622)
      at Context.<anonymous> (test/security/WSSecurityCert.js:285:26)
      at process.processImmediate (node:internal/timers:483:21)

but yesterday (1) was not there. And I changed nothing in this instance... (2) may be related to the recent update of xml-crypto in 0b159d1 but that should have been caught sooner than now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants