Giter Site home page Giter Site logo

Comments (8)

captaincoordinates avatar captaincoordinates commented on June 15, 2024 12

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.

alexisjanvier avatar alexisjanvier commented on June 15, 2024 8

I confirm that the problem disappears by using the image stoplight/prism:4.10.3

from prism.

alan-lee-12 avatar alan-lee-12 commented on June 15, 2024 2

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.

alexisjanvier avatar alexisjanvier commented on June 15, 2024

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.

chohmann avatar chohmann commented on June 15, 2024

Hey team! Please add your planning poker estimate with Zenhub @brendarearden @daniel-white @EdVinyard @fcasad

from prism.

gulyas-istvan-netlock-hu avatar gulyas-istvan-netlock-hu commented on June 15, 2024

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.

gulyas-istvan-netlock-hu avatar gulyas-istvan-netlock-hu commented on June 15, 2024

rollback to 4.10.2 solves my problem
thanks to @fcasad notes: #2143

from prism.

fcasad avatar fcasad commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.