Skip to content
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

pact-node\standalone\win32-1.88.83\pact\lib\ruby\bin.real\ruby.exe is not compatible with the version of Windows you're running #487

Closed
1 of 5 tasks
DmitriiFedorov opened this issue Feb 19, 2024 · 8 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@DmitriiFedorov
Copy link

Software versions

  • OS: Windows 11 23H2
  • Pact Node version: "@pact-foundation/pact": "9.17.2", "@pact-foundation/pact-node": "10.17.1"
  • Node Version: 18.19.0

Issue Checklist

Please confirm the following:

  • I have upgraded to the latest
  • I have the read the FAQs in the Readme
  • I have triple checked, that there are no unhandled promises in my code
  • I have set my log level to debug and attached a log file showing the complete request/response cycle
  • For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem

Expected behaviour

Tests run locally

Actual behaviour

Errors when start tests:

[email protected]: Pact Binary Error: This version of ..\node_modules\@pact-foundation\pact\node_modules\@pact-foundation\pact-node\standalone\win32-1.88.83\pact\lib\ruby\bin.real\ruby.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher."
[email protected]: The pact mock service doesn't appear to be running
  - Please check the logs above to ensure that there are no pact service startup failures
  - Please check that pact lifecycle methods are called in the correct order (setup() needs to be called before this method)
  - Please check that your test code waits for the promises returned from lifecycle methods to complete before calling the next one
  - To learn more about what is happening during your pact run, try setting logLevel: 'DEBUG'
@DmitriiFedorov DmitriiFedorov added the bug Indicates an unexpected problem or unintended behavior label Feb 19, 2024
@YOU54F
Copy link
Member

YOU54F commented Feb 19, 2024

Hey, is there any reason you aren't running the latest version of pact-js? It replaces the ruby core, with a rust core, which should bring several QoL improvments

@DmitriiFedorov
Copy link
Author

Hi, I'm considering updating the package, but it seems that it will require a significant amount of time because I also need to update Jest by several major versions. I was wondering if there is a short-term solution to fix the errors preventing tests execution, while I'm updating the packages.

@YOU54F
Copy link
Member

YOU54F commented Feb 20, 2024

I was wondering if there is a short-term solution to fix the errors preventing tests execution, while I'm updating the packages.

  1. Don't run the windows version, try with WSL or Docker, and run a linux version
  2. Download the latest release of pact ruby standalone directly from https:/pact-foundation/pact-ruby-standalone and test that they work. If these do, I believe you can tell Pact JS where the pact cli tools are located, and not to download binaries.

@DmitriiFedorov
Copy link
Author

Thanks for the advice. The latest release of pact-ruby-standalone works fine on Windows.
I replaced the old version in the node_modules directory with it and tests stated working.
But I didn't get the part regarding

you can tell Pact JS where the pact cli tools are located.

Is there a more appropriate way of replacing pact-ruby-standalone? I noticed there is a monkeypatch prop, but it does not seem to be the solution.

@YOU54F
Copy link
Member

YOU54F commented Feb 21, 2024

Great, glad that is working. Which package out of interest, x86 or x86_64?

https:/pact-foundation/pact-js-core/tree/pact-node?tab=readme-ov-file#pact-download-location

@DmitriiFedorov
Copy link
Author

Which package out of interest, x86 or x86_64?

I replaced the existing version in node_modules with pact-2.4.1-windows-x86.

However, I encountered an issue: I can't use this version with pact_binary_location because the installation process requires pact-1.91.0-win32. It seems that everything below 2.x.x is not working on Windows.

@YOU54F
Copy link
Member

YOU54F commented Feb 22, 2024

ahh yeah, it will check both the file name, but you cant change that as it will check against the checksum which is stored in the package.

the proper alternative would be to do a change in the pact-node branch to update the binaries, and consume that in the v9 branch of pact-js

I’ve previously done it on my fork to test out the arm64 binaries in the v2 release of the pact ruby standalones.

@mefellows do you think we would want to backport the arm64 changes and go through the motions of a release?

we could couple it with two rfc’s in the mainline - one to remove the standalone, and release pact-js-cli. one to being in the alpine prebuilds

the musl prebuilds will bring in 45mb for each arch (amd/arm64) but removing the standalone will save 50mb per platform/arch. i think it stands at 250mb uncompressed we’d save.

with regards to pact-js-cli, retaining the js interface in the cli package, might allow a more frictionless migration.

@YOU54F
Copy link
Member

YOU54F commented Mar 13, 2024

@DmitriiFedorov you should see the problem resolved with

"@pact-foundation/pact": "9.18.1", 
"@pact-foundation/pact-node": "10.18.0"

Note you should only need to install @pact-foundation/pact as @pact-foundation/pact-node is installed as a dependency

@YOU54F YOU54F closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants