https://linen.dev logo
#help
Title
d

Darren Rose

07/07/2023, 12:56 PM
I am trying to make recordings of using
<https://api.europe-west1.gcp.commercetools.com>
and
<https://auth.europe-west1.gcp.commercetools.com>
but seem to be missing some configuration - example error from the client
Failed to load schema from <http://localhost:10001/test/graphql>:
- any help welcomed
I am using the container
wiremock/wiremock:2.35.0
with
--local-response-templating --disable-banner --port=10000 --verbose
o

Oleg Nenashev

07/07/2023, 2:15 PM
Where do you expect to download the schema from? Localhost looks really suspicious
d

Darren Rose

07/07/2023, 2:23 PM
that's the wiremock proxy
which targets
<https://api.europe-west1.gcp.commercetools.com>
o

Oleg Nenashev

07/07/2023, 2:43 PM
Do you have any logs from the WireMock instance?
I would suspect misconfiguration
d

Darren Rose

07/10/2023, 8:40 AM
I start 2 wiremock instances as follows
Copy code
#!/bin/bash
readonly name=commerce-tools-auth
readonly port=10000
echo "Starting $name server at: <http://localhost>:$port"
cat $name/ascii.txt
docker run --rm -v $(PWD)/$name:/home/wiremock -p $port:$port --name $name wiremock/wiremock:2.35.0 --local-response-templating --disable-banner --port=$port --verbose
and
Copy code
#!/bin/bash
readonly name=commerce-tools-api
readonly port=10001
echo "Starting $name server at: <http://localhost>:$port"
cat $name/ascii.txt
docker run --rm -v $(PWD)/$name:/home/wiremock -p $port:$port --name $name wiremock/wiremock:2.35.0 --local-response-templating --disable-banner --port=$port --verbose
I then configure the target URL via
<http://localhost:10000/__admin/recorder/>
and
<http://localhost:10001/__admin/recorder/>
o

Oleg Nenashev

07/10/2023, 9:21 AM
So, do you have any logs that we could investigate together? At the moment I don't have information that would allow me to make an informed assumption
d

Darren Rose

07/11/2023, 9:01 AM
Am I correct in thinking that requests are passed to the target as is without changes? Meaning the request headers and body etc remain unchanged?
o

Oleg Nenashev

07/11/2023, 9:01 AM
By default, yea
d

Darren Rose

07/11/2023, 9:43 AM
Is it possible that recording for playback would not work for urls of the following format?
<http://localhost:3000/_next/data/development/en-MY/men/shoes/helsinki-2.json?categories=shoes&categories=helsinki-2>
o

Oleg Nenashev

07/11/2023, 9:49 AM
@Darren Rose sorry if I raise it again, but did you have a chance to get logs from the instance? I do not think I could help without proper data
d

Darren Rose

07/11/2023, 9:54 AM
I'll hopefully upload some today