-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Error: The specified procedure could not be found. #1067
Comments
👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-791). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps. |
I reckon this is the problem. Npm can handle duplicate dependencies with different versions, but I doubt the DLL loader can. I don't know much about windows. Would naming the DLL differently in each version help? This is a good argument generally for the Pact-CLI being separated, because that's the only reason you'd need multiple pact-core versions. I took a stab at this here, https://github.com/TimothyJones/pact-cli but the windows build is failing (unrelated to this issue) and I haven't looked in to it. |
Yep, it's definitely my current suspicion, because the e2e suite runs just fine on another agent without all of the extra build complexity we do here.
It might, it would need some investigation. I don't think it would be too hard to version each I'd love to be able to get a trace like Automattic/node-canvas#930 (comment), so my next step is to work out how to set that registry value on the CI agent.
Yes, and if it is the problem it also would solve the related issue around OS/arch support here (pact-foundation/pact-js-core#416). Thanks for doing that, I think it should be done regardless of this specific issue. I think we would have to:
I think this would have the effect of keeping (1) backwards compatible, and then in the next major version of Pact we remove the dependency and let the user choose if they want that behaviour or not. |
I can make PRs for both of these things this week.
I can also do this, but I don't have access to |
Oh, that would be amazing - thanks! I was half putting that list up as "this is what we need to do" but also looking for anyone to poke holes in that approach. |
We believe this problem stemmed from two versions of pact-core living together. From Tim in a slack chat:
Tim has kindly donated https://github.com/pact-foundation/pact-js-cli to the foundation, which we can then use to do (1). |
The error "Error: The specified procedure could not be found." is thrown on most Windows builds, resulting in CI failures for Pact JS builds.
Example build
The issue is thrown when loading
pact.node
, which is a native library produced by https://github.com/pact-foundation/pact-js-core/. The error seems to indicate a symbol in the shared library is not found on the CI runtime, and is therefore unable to execute the library, and subsequent tests.The behaviour did seem to be non-deterministic, at least historically (update: previous build histories referred to here are now beyond reach of GitHub's memory), however, it does seem to consistently fail when executing the first example (V3 e2e: D:\a\pact-js\pact-js\examples\v3\e2e).
Example build that mostly succeeded with previous examples, and then died during the v3 e2e test: https://github.com/pact-foundation/pact-js/actions/runs/4193805789/jobs/7271156646.
I have been unable to reproduce on my own Windows environment, albeit I wasn't able to get something as close to the CI runner as I'd have liked.
Error
Example log file: 1_build-and-test-windows (14.x).txt
Possible problem candidates
file:../../../dist
) that loads a relative version of Pact JS that was compiled and packaged in the current build (to ensure the examples continue to work with the latest changes). It's plausible there is a conflicting version ofpact-core
in the relativenode_modules
folder that is conflicting with the one imported by the importedpact
package from thedist
folderpact-core
which is conflicting.Research
I have extracted the e2e test into its own repo, and the consumer test runs and passes(the provider test is failing as expected, but is executing just fine).
This lends credence to the possibility of conflicting dependencies.
Other similar issues from the Internet
a) and c) worry me, because this doesn't strike me as a "rare" scenario or edge case.
Debugging suggestions
The text was updated successfully, but these errors were encountered: