Skip to content

v5.32.11 Crash on page load #10974

Description

@Hyzual

Q&A

  • OS: WIndows 11
  • Browser: Chromium
  • Version: 150.0.7871.46
  • Method of installation: npm
  • Swagger-UI version: 5.32.11
  • Swagger/OpenAPI version: Swagger 2.0

Content & configuration

Example Swagger/OpenAPI definition:

# your YAML here => It is likely irrelevant, I can reproduce the issue on two different definitions. I can provide one upon request.

Swagger-UI configuration options:

SwaggerUI({
  domNode: mount_point,
  url: swagger_uri,
  docExpansion: "none",
  tagsSorter: "alpha",
  operationsSorter: "alpha",
  validatorUrl: null,
  deepLinking: true,
  plugins: [TuleapLayoutPlugin],
  layout: "TuleapLayout",
})
?yourQueryStringConfig = none

Describe the bug you're encountering

swagger-ui v5.32.11 crashes on page load with the following JavaScript console error:

api-explorer-BLOwdZuZ.js:239 Uncaught TypeError: o is not a function
    at Object.render (api-explorer-BLOwdZuZ.js:239:5266)
    at u (api-explorer-BLOwdZuZ.js:246:7457)
    at u9 (api-explorer-BLOwdZuZ.js:246:7825)
    at HTMLDocument.<anonymous> (api-explorer-BLOwdZuZ.js:246:11751)
(anonymous) @ api-explorer-BLOwdZuZ.js:239
u @ api-explorer-BLOwdZuZ.js:246
u9 @ api-explorer-BLOwdZuZ.js:246
(anonymous) @ api-explorer-BLOwdZuZ.js:246

To reproduce...

Steps to reproduce the behavior:

  1. Go to the page loading the script that contains swagger-ui
  2. Open the developer tools, open the console
  3. See error

Expected behavior

I expected the application to start and display its Swagger spec.

Additional context or thoughts

I think it could be related to the upgrade of immutable, as I noticed some dependencies of swagger-ui like react-immutable-proptypes that do not seem compatible with version 4.x. Before attempting to upgrade to v5.32.11, I did try to override the dependency using pnpm, and there was a display glitch, the titles of the resources were duplicated.
Please let me know if you need additional details. Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions