Hi everyone, I am having some troubles running a p...
# pact-js
t
Hi everyone, I am having some troubles running a provider verification test on a mac. I am getting the following error
Copy code
RUNS src/lambda/on-example-kafka-message/test/fake-provider-test.spec.ts
[12:31:20.662] DEBUG (37860): pact-core@14.0.4: We detected your platform as:

RUNS src/lambda/on-example-kafka-message/test/fake-provider-test.spec.ts
[12:31:22.324] INFO (37860): pact@12.1.1: Verifying message
[12:31:22.343] INFO (37860): pact-core@14.0.4: Verifying Pacts.
[12:31:22.344] INFO (37860): pact-core@14.0.4: Verifying Pact Files
[12:31:22.345] DEBUG (37860): pact-core@14.0.4: Initalising native core at log level 'debug'
[12:31:22.346] DEBUG (37860): pact-core@14.0.4: binding path #0: : attempting to load native module from:

/Users/tmangombe/dev/repeat-lambda-template/node_modules/@pact-foundation/pact-core/prebuilds/darwin-arm64
source: pact-js-core binding lookup

You can override via PACT_PREBUILD_LOCATION

[12:31:22.351] INFO (37860): 0.4.7: pact native library successfully found, and the correct version
2023-11-28T02:31:22.351682Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_new_for_application FFI function invoked
2023-11-28T02:31:22.351862Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_set_provider_info FFI function invoked
[12:31:22.351] DEBUG (37860): pact-core@14.0.4: the optional ffi function 'pactffiVerifierSetFilterInfo' was not executed as it had non-fatal validation errors: None of PACT_DESCRIPTION, PACT_PROVIDER_STATE or PACT_PROVIDER_NO_STATE were set in the environment
[12:31:22.352] DEBUG (37860): pact-core@14.0.4: the optional ffi function 'pactffiVerifierSetProviderState' was not executed as it had non-fatal validation errors: No failIfNoPactsFound option provided
2023-11-28T02:31:22.352189Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_set_verification_options FFI function invoked
[12:31:22.352] DEBUG (37860): pact-core@14.0.4: the optional ffi function 'pactffiVerifierSetPublishOptions' was not executed as it had non-fatal validation errors: No publishVerificationResult option / PACT_BROKER_PUBLISH_VERIFICATION_RESULTS set, or no providerVersion option
[12:31:22.352] DEBUG (37860): pact-core@14.0.4: the optional ffi function 'pactffiVerifierSetConsumerFilters' was not executed as it had non-fatal validation errors: Either no consumerFilters option provided, or the array was empty
[12:31:22.352] DEBUG (37860): pact-core@14.0.4: the optional ffi function 'pactffiVerifierSetFailIfNoPactsFound' was not executed as it had non-fatal validation errors: No failIfNoPactsFound option provided
[12:31:22.353] DEBUG (37860): pact-core@14.0.4: the optional ffi function 'pactffiVerifierAddCustomHeader' was not executed as it had non-fatal validation errors: No customProviderHeaders option provided
[12:31:22.353] DEBUG (37860): pact-core@14.0.4: the optional ffi function 'pactffiVerifierAddDirectorySource' was not executed as it had non-fatal validation errors: No pactUrls option provided
2023-11-28T02:31:22.353474Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_broker_source_with_selectors FFI function invoked
[12:31:22.353] DEBUG (37860): pact-core@14.0.4: the optional ffi function 'pactffiVerifierAddProviderTransport' was not executed as it had non-fatal validation errors: No additional provider transports provided
2023-11-28T02:31:22.353927Z DEBUG ThreadId(02) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_execute FFI function invoked
2023-11-28T02:31:22.353938Z DEBUG ThreadId(02) pact_ffi::verifier::handle: Pact source to verify = PactBrokerWithDynamicConfiguration(https://.<http://pactflow.io|pactflow.io>, provider_name='fake-provider', enable_pending=true, include_wip_since=None, provider_tags=[], provider_branch=Some("add-working-pact-tests"), consumer_version_selectors='[ConsumerVersionSelector { consumer: None, tag: None, fallback_tag: None, latest: None, deployed_or_released: None, deployed: None, released: None, environment: None, main_branch: Some(true), branch: None, matching_branch: None }, ConsumerVersionSelector { consumer: None, tag: None, fallback_tag: None, latest: None, deployed_or_released: None, deployed: None, released: None, environment: None, main_branch: None, branch: None, matching_branch: Some(true) }, ConsumerVersionSelector { consumer: None, tag: None, fallback_tag: None, latest: None, deployed_or_released: Some(true), deployed: None, released: None, environment: None, main_branch: None, branch: None, matching_branch: None }], auth=Token(O3Zq*************)')
2023-11-28T02:31:22.354299Z DEBUG ThreadId(02) pact_plugin_driver::catalogue_manager: Updated catalogue entries:
core/content-generator/binary
core/content-generator/json
core/content-matcher/json
core/content-matcher/multipart-form-data
core/content-matcher/text
core/content-matcher/xml
2023-11-28T02:31:22.354323Z DEBUG ThreadId(02) pact_plugin_driver::catalogue_manager: Updated catalogue entries:
core/matcher/v1-equality
core/matcher/v2-max-type
core/matcher/v2-min-type
core/matcher/v2-minmax-type
core/matcher/v2-regex
core/matcher/v2-type
core/matcher/v3-content-type
core/matcher/v3-date
core/matcher/v3-datetime
core/matcher/v3-decimal-type
core/matcher/v3-includes
core/matcher/v3-integer-type
core/matcher/v3-null
core/matcher/v3-number-type
core/matcher/v3-time
core/matcher/v4-array-contains
core/matcher/v4-equals-ignore-order
core/matcher/v4-max-equals-ignore-order
core/matcher/v4-min-equals-ignore-order
core/matcher/v4-minmax-equals-ignore-order
core/matcher/v4-not-empty
core/matcher/v4-semver
thread '' panicked at 'called Result::unwrap() on an Err value: reqwest::Error { kind: Builder, source: Os { code: 2, kind: NotFound, message: "No such file or directory" } }', pact_verifier/src/pact_broker.rs:530:10
stack backtrace:
0: 0x11c5c6c90 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3fbf720fbb1cb41b
1: 0x11c5e6e64 - core::fmt::write::h8ab6230d6f2a4204
2: 0x11c5c35a4 - std::io::Write::write_fmt::h15ecdca1916a179e
3: 0x11c5c6ae4 - std::sys_common::backtrace::print::hb6e94bab886a9ccf
4: 0x11c5c810c - std::panicking::default_hook::{{closure}}::h4a0e30e90cb1c7bb
5: 0x11c5c7f14 - std::panicking::default_hook::h0bb5bbf65ac7c64d
6: 0x11c5c857c - std::panicking::rust_panic_with_hook::h17facd9c53870157
7: 0x11c5c8488 - std::panicking::begin_panic_handler::{{closure}}::h9eab8195c369d860
8: 0x11c5c7070 - std::sys_common::backtrace::__rust_end_short_backtrace::hce5f67454da3493d
9: 0x11c5c81fc - _rust_begin_unwind
10: 0x11c63c674 - core::panicking::panic_fmt::hc7e96873bfc1c7ba
11: 0x11c63c9a8 - core::result::unwrap_failed::h364bae7050cb2efa
12: 0x11bc62efc - <pact_verifier::pact_broker::HALClient as core::default::Default>::default::hd325d92901bf551e
13: 0x11bc605ec - pact_verifier::pact_broker::HALClient::with_url::h2e2b1ff65b7db6ca
14: 0x11bbd1efc - pact_verifier::pact_broker::fetch_pacts_dynamically_from_broker::{{closure}}::h0efe5f6c3753a2d1
15: 0x11bbcd0f0 - pact_verifier::fetch_pact::{{closure}}::{{closure}}::ha4ba41399f5862cb
16: 0x11bbd9808 - <futures_util::stream::stream::flatten::Flatten<St,::Item> as futures_core::stream::Stream>::poll_next::h8eb667b07e0372c3
17: 0x11bb308c4 - <futures_util::stream::stream::collect::Collect<St,C> as core::future::future::Future>::poll::h1fcaf43d7bc897e6
18: 0x11baaa9cc - pact_verifier::fetch_pacts::{{closure}}::{{closure}}::h23bda17ee0ec6717
19: 0x11baba164 - pact_verifier::verify_provider_async::{{closure}}::{{closure}}::h814461e2ffa4a20e
20: 0x11bb03d98 - <tracing::instrument::Instrumented as core::future::future::Future>::poll::h7c429118268f87cb
21: 0x11b9fad40 - <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll::h7ec1ad83ec0849c3
22: 0x11b9bcfb8 - pact_verifier::verify_provider_async::{{closure}}::hf44501821f704b81
23: 0x11b9e60e8 - tokio::runtime::park::CachedParkThread::block_on::hfce2416cec7139be
24: 0x11bb928a0 - tokio::runtime::context::runtime::enter_runtime::hc621080d259a112c
25: 0x11bc03ccc - tokio::runtime::runtime::Runtime::block_on::h2989b66e42e6cbc9
26: 0x11b9ef714 - pact_ffi::verifier::handle::VerifierHandle::execute::h3b8325364b9592ba
27: 0x11ba647f8 - pact_ffi::error::panic::catch_panic::hb11aa34866f5e36d
28: 0x11bb2d7e0 - _pactffi_verifier_execute
29: 0x109f8b098 - __ZN18VerificationWorker7ExecuteEv
30: 0x109f8ada8 - __ZN4Napi11AsyncWorker9OnExecuteENS_3EnvE
Caught panic with error: called Result::unwrap() on an Err value: reqwest::Error { kind: Builder, source: Os { code: 2, kind: NotFound, message: "No such file or directory" } }
[12:31:22.360] DEBUG (37860): pact-core@14.0.4: shutting down verifier with handle 0
2023-11-28T02:31:22.360806Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_shutdown FFI function invoked
FAIL src/lambda/on-example-kafka-message/test/fake-provider-test.spec.ts1
● Fake Provider Tests › should verify the contract with the consumer

Verfication failed

  at node_modules/@pact-foundation/pact-core/src/verifier/nativeVerifier.ts:52:20
RUNS src/lambda/on-example-kafka-message/test/onExampleKafkaMessageHandlerContract.spec.ts
[12:31:30.792] DEBUG (37860): pact-core@14.0.4: We detected your platform as:

darwin-arm64
[12:31:31.634] DEBUG (37860): pact-core@14.0.4: Initalising native core at log level 'debug'
[12:31:31.634] DEBUG (37860): pact-core@14.0.4: binding path #0: : attempting to load native module from:

/Users/*****/dev/lambda-template/node_modules/@pact-foundation/pact-core/prebuilds/darwin-arm64
source: pact-js-core binding lookup

You can override via PACT_PREBUILD_LOCATION
more details here -> https://github.com/pact-foundation/pact-js/issues/1139
thankyou 1
m
Any chance you could please DM me a version of the above logs at TRACE level? That might reveal a few other bits and bobs