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

/docs leads to 404 #356

Open
davidtorosyan opened this issue Sep 7, 2023 · 4 comments
Open

/docs leads to 404 #356

davidtorosyan opened this issue Sep 7, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@davidtorosyan
Copy link

Describe the bug
The docs link leads to a 404: https://batch.openaddresses.io/docs

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://batch.openaddresses.io/data
  2. Click on the question mark icon
  3. Observe 404 page

Expected behavior
Expected a docs page.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: Version 116.0.5845.142 (Official Build) (64-bit)

Additional context
This was previously filed in a different repo (openaddresses/openaddresses#6669), opening here since this is more applicable.

From my investigation I found that the nginx config specifies that the link should be /docs/

location /docs/ {

And if we go to the route (https://batch.openaddresses.io/docs/) we see a different 404 page, which indicates the nginx filter gets hit:
image

But I also see that there's a route to /docs, without the slash.

app.use('/docs', SwaggerUI.serve, SwaggerUI.setup(schema.docs.base));

My guess is that the nginx override is messing with the proper path.

Also, I'm thinking this broke with 1967934, which switched to Swagger. cc @ingalls

@ingalls
Copy link
Member

ingalls commented Sep 7, 2023

image

Fixed.

@ingalls ingalls closed this as completed Sep 7, 2023
@davidtorosyan
Copy link
Author

I think this is only partly fixed.

The question mark icon leads to: https://batch.openaddresses.io/docs

This redirects to http://batch.openaddresses.io:5000/docs/ which then fails to load.

On the other hand https://batch.openaddresses.io/docs/ works as expected.

So either the question mark link needs to be updated, or the redirect from /docs to /docs/ needs to fix the port. Or both!

@ingalls ingalls reopened this Sep 8, 2023
@ingalls
Copy link
Member

ingalls commented Sep 8, 2023

I'm afraid I can't reproduce this? Can you try clearing your cache? This looks like the behavior I fixed.

I've tried all the permutations and am seeing it correctly direct to the Swagger Docs.

@ingalls ingalls closed this as completed Sep 8, 2023
@iandees
Copy link
Member

iandees commented Sep 8, 2023

Something about generating the https://batch.openaddresses.io/docs/ page content is taking a very long time. I intermittently get 503s, blank pages after ~50 seconds, and the actual content you shared in the screenshot above.

Also, I see the URL without the slash at the end redirecting to :5000:

$ curl -sv https://batch.openaddresses.io/docs -o /dev/null
< HTTP/2 301
...
< location: http://batch.openaddresses.io:5000/docs/

@ingalls ingalls reopened this Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants