Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open ReDoc page anymore #418

Closed
JFCote opened this issue Feb 19, 2018 · 8 comments
Closed

Unable to open ReDoc page anymore #418

JFCote opened this issue Feb 19, 2018 · 8 comments

Comments

@JFCote
Copy link

JFCote commented Feb 19, 2018

Hi,

I'm not sure for how long, but this morning I went to check our documentation using ReDoc and it's not working. I receive this stack trace after waiting for like 1 or 2 minutes

ReDoc initialized!
redoc.min.js:sourcemap:7 ERROR TypeError: Cannot read property 'externalDocs' of null
    at Object.updateDirectives (redoc.min.js:sourcemap:7)
    at Object.updateDirectives (redoc.min.js:sourcemap:7)
    at ur (redoc.min.js:sourcemap:7)
    at xr (redoc.min.js:sourcemap:7)
    at _r (redoc.min.js:sourcemap:7)
    at ur (redoc.min.js:sourcemap:7)
    at xr (redoc.min.js:sourcemap:7)
    at wr (redoc.min.js:sourcemap:7)
    at ur (redoc.min.js:sourcemap:7)
    at xr (redoc.min.js:sourcemap:7)
_ @ redoc.min.js:sourcemap:7
redoc.min.js:sourcemap:7 ERROR Error: Uncaught (in promise): RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at Array.join (native)
    at Function.r.compile (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:697669)
    at Function.e.join (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:264505)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368244)
    at Function.e.walkEach (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368490)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:367874)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368325)
    at Function.e.walkEach (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368490)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:367874)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368325)
    at Array.join (native)
    at Function.r.compile (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:697669)
    at Function.e.join (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:264505)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368244)
    at Function.e.walkEach (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368490)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:367874)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368325)
    at Function.e.walkEach (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368490)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:367874)
    at Function.e.walk (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:368325)
    at u (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:565152)
    at https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:565697
    at e.invokeTask (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:561233)
    at Object.onInvokeTask (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:10451)
    at e.invokeTask (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:561154)
    at r.runTask (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:556407)
    at o (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:553507)
    at t.invokeTask (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:562376)
    at i.useG.invoke (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:562238)
    at n (https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js:7:546175)

Our spec loads fine in swagger-ui.

Any idea what is going on?
Thanks!

@RomanHotsiy
Copy link
Member

@JFCote, this may be caused by the recent update. As a quick workaround, please, use release 1.20.0 instead of the latest: https://rebilly.github.io/ReDoc/releases/1.20.0/redoc.min.js

Send me a link to your spec here or via email so I can reproduce and investigate.

Also, note that using latest is discouraged in production:

image

@misos1
Copy link

misos1 commented Feb 19, 2018

Does not have this something together with https://unpkg.com/redoc/bundles/redoc.standalone.js or https://unpkg.com/redoc@2.0.0-alpha.0/bundles/redoc.standalone.js ?

Now when I open them is browser I see these messages:

Cannot find module "/bundles/redoc.standalone.js" in package redoc@1.21.0
Cannot find package redoc@2.0.0-alpha.0

By the way when will be release of redoc 2.0? There are many great possibilities with openapi 3.0.

@RomanHotsiy
Copy link
Member

@misos1 nope, it has nothing to do with those. The release of 2.0 is really close. I'm just a bit busy with other things to finish as quick as I wanted but I'm working on this.

@misos1
Copy link

misos1 commented Feb 19, 2018

Ok but still, I was playing with that alpha version and it today stopped working. I mean probably because instead of getting .js files it will just return that message.

@RomanHotsiy
Copy link
Member

There is no alpha.0 and latest stable version (1.x) doesn't have bundles folder. Use next npm tag for the latest alpha: https://unpkg.com/redoc@next/bundles/redoc.standalone.js

@misos1
Copy link

misos1 commented Feb 19, 2018

I found these links on https://github.com/Rebilly/ReDoc/tree/react-rewrite under "Releases ... Important: all the 2.x releases are deployed to npm and can be used via unpkg:..."

Oh ok, this new link worked, thanks.

@JFCote
Copy link
Author

JFCote commented Feb 20, 2018

@RomanGotsiy Thanks for the quick reply.

Just so people who follow this thread don't have the same problem as me, the link to the version 1.20.0 is this one (added a v in yours)

https://rebilly.github.io/ReDoc/releases/v1.20.0/redoc.min.js

Even with this version, I have the exact same problem. I'm sending you my spec by email right now and I will keep experimenting with older version. Thanks!

@JFCote
Copy link
Author

JFCote commented Feb 20, 2018

After some experimentation with older version, I'm starting to think that maybe the breaking change is in my spec itself, even if it's valid. Before I did deeper, I will let you debug with my spec that I sent you by email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants