Comments (8)
I was seeing this issue with the latest release of the stoplight/prism:4
Docker image (released 8 days ago). I pinned the image at stoplight/prism:4.10.3
and the issue went away.
from prism.
I confirm that the problem disappears by using the image stoplight/prism:4.10.3
from prism.
i can also confirm that i had the same issues when using prism:4
and prism:latest
, and the issue was fixed by pinning it to 4.10.3
. thanks @captaincoordinates & @alexisjanvier !
from prism.
I have the same problem when I try to launch prism in a github workflow
middleware_1 | prism mock <document>
middleware_1 |
middleware_1 | Start a mock server with the given document file
middleware_1 |
middleware_1 | Positionals:
middleware_1 | document Path to a document file. Can be both a file or a fetchable resource on the web. [string] [required]
middleware_1 |
middleware_1 | Options:
middleware_1 | --version Show version number [boolean]
middleware_1 | --help Show help [boolean]
middleware_1 | -p, --port Port that Prism will run on. [number] [required] [default: 4010]
middleware_1 | -h, --host Host that Prism will listen to. [string] [required] [default: "127.0.0.1"]
middleware_1 | --cors Enables CORS headers. [boolean] [default: true]
middleware_1 | -m, --multiprocess Forks the http server from the CLI for faster log processing. [boolean] [default: true]
middleware_1 | --errors Specifies whether request/response violations marked as errors will produce an error response [boolean] [required] [default: false]
middleware_1 | -d, --dynamic Dynamically generate examples. [boolean] [default: false]
middleware_1 |
middleware_1 | TypeError: Cannot read properties of undefined (reading 'isMaster')
middleware_1 | at createMultiProcessPrism (/usr/src/prism/packages/cli/dist/util/createServer.js:27:32)
middleware_1 | at Object.runPrismAndSetupWatcher (/usr/src/prism/packages/cli/dist/util/runner.js:8:12)
middleware_1 | at Object.handler (/usr/src/prism/packages/cli/dist/commands/mock.js:27:25)
middleware_1 | at Object.runCommand (/usr/src/prism/node_modules/yargs/build/index.cjs:446:48)
middleware_1 | at Object.parseArgs [as _parseArgs] (/usr/src/prism/node_modules/yargs/build/index.cjs:2697:57)
middleware_1 | at Object.get [as argv] (/usr/src/prism/node_modules/yargs/build/index.cjs:2651:25)
middleware_1 | at Object.<anonymous> (/usr/src/prism/packages/cli/dist/index.js:15:26)
middleware_1 | at Module._compile (node:internal/modules/cjs/loader:1126:14)
middleware_1 | at Object.Module._extensions..js (node:internal/modules/cjs/loader:[118]
middleware_1 | at Module.load (node:internal/modules/cjs/loader:1004:32)
presse-front-e2e_middleware_1 exited with code 1
Prism is started with Docker-Compose :
version: '3.9'
services:
app:
image: presse-front
ports:
- 1312:3000
middleware:
image: stoplight/prism:4
command: 'mock -h 0.0.0.0 /tmp/api.oas3.yml'
volumes:
- ./middleware/api.oas3.yaml:/tmp/api.oas3.yaml:ro
But I don't encounter the problem in local :
➜ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
➜ docker --version
Docker version 20.10.16, build aa7e414
➜ docker-compose --version
docker-compose version 1.27.4, build 40524192
from prism.
Hey team! Please add your planning poker estimate with Zenhub @brendarearden @daniel-white @EdVinyard @fcasad
from prism.
Hello all!
I have the reported issue with 4.10.4, but it is sporadic :(
I have read you use cluster.isMaster
but it is deprecated, can you use cluster.isPrimary
? I cannot prove it is the root cause, but the sporadic failing is not a production usage :(
from prism.
rollback to 4.10.2 solves my problem
thanks to @fcasad notes: #2143
from prism.
Hi everyone,
Sorry you were affected by the regression in 4.10.4! It should be resolved in 4.10.5.
from prism.
Related Issues (20)
- Behaviors and state HOT 1
- Mock server fails to start if recursive schema definitions are used HOT 2
- JSE Ref Selector Height Changes
- Please update uri-template-lite to 22.9.0 HOT 3
- Docker Hub Images with graceful shutdown
- As a prototyper, I want to be able to use Prefer header to choose one of the examples in a callback HOT 2
- Prism shaves off decimals for double HOT 4
- Parameters in Callback request are not included
- How do I get a 404 HOT 1
- How to simulate a 500 if the open api doesn't define it HOT 1
- Security Schema Logic is incorrect HOT 2
- Unable to define variable array sizes HOT 4
- Feature request: request header to ignore request validation HOT 3
- Run different services in different ports? HOT 2
- Investigate jsf.options HOT 1
- [Validation Proxy] – Documentation of all Validation possibilities? HOT 2
- Not required query params are not validated HOT 1
- support for basePath HOT 6
- Date pattern mismatch error on response validation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prism.