-
Notifications
You must be signed in to change notification settings - Fork 4
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
unexpected end of JSON input #7
Comments
I can reproduce this, maybe should be reported to caddy project. |
Just in case anyone else is coming across this, I found that the following file was sufficient: {"status_code":200} These were in
|
This should now be fixed, see caddyserver/website#206. Could any of you give this a try again? |
@francislavoie just hit this, from a different endpoint though. I see it from json-schema cached docs not found for apps/http.handlers.prometheus.
json-schema fetching https://caddyserver.com/api/docs/config/apps/http.handlers.prometheus ...
json-schema
json-schema: unexpected end of JSON input |
I don't think that plugin was registered on the Caddy website, so there's no docs for it. But either way, metrics are built into Caddy now, so that plugin shouldn't be necessary 🤔 |
Ok I get it, there's a race condition to see which one breaks first. So of the ones sharnoff listed above endpoints for the following 3 were returning
After manually putting json files into the cache for those 3 generation completed susccessfully. I did not have to touch anything for I'm not really sure why its pulling in |
The "non-standard" label means it's not included with vanilla Caddy, i.e. a third party plugin. Also, I was wrong that they aren't registered on the website, they are listed here: https://caddyserver.com/docs/modules/ but I don't see which Go module they come from 🤔 I think @mholt will need to take a look at why those are causing issues. I don't have direct access to the website backend. |
That's weird. Looks like something is wrong with the site for those docs (JS errors) -- sigh, sorry about that. I will have to look into that as soon as I have a chance. (And I've noticed some docs where the yellow box explaining where the non-standard module's repo can be found is missing... hmm.) |
Ok, I think it's just that the auth plugin was moved/renamed to security: https://caddyserver.com/docs/modules/security And that does seem to work fine. |
Running into this when building docs for https://github.com/mholt/caddy-l4. Dockerfile
Build command:
Output:
I'm not a Go or Caddy expert, so maybe I'm doing something wrong? |
@AlexanderAllen Those paths look broken, starting with (That particular module does not appear to have docs btw. There's JSON response but the docs are null. Hmm.) |
Hmm, there's probably something wrong with my Docker build. I'm also using
Alpine, and usually that's an "all bets are off" for most people when it
comes to compiling anything. Cheers for the response.
…On Mon, Mar 28, 2022 at 12:04 AM Matt Holt ***@***.***> wrote:
@AlexanderAllen <https://github.com/AlexanderAllen> Those paths look
broken, starting with /api/docs/config/apps/layer4.matchers.crowdsec --
there is no app named layer4.matchers.crowdsec; the correct link should
probably be
https://caddyserver.com/api/docs/module/http.handlers.request_debug, but
this is different than config-traversal docs, if that makes sense. I'm not
sure what is generating those paths but it seems to be an error.
(That particular module does not appear to have docs btw. There's JSON
response but the docs are null. Hmm.)
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADK6SRMW5X7EBDBHM2B3RF3VCEVVFANCNFSM5HWKW2OQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Richard Allen
Mobile: 347 339 2153
|
We ship a There's definitely a bug in |
Hmm. Makes me want to jump in and debug my current use case, whatever that
is, since it looks from the comments it's not replicated across the board.
Could it be one of the dependencies getting pulled in during build causing
unexpected issues (works for you but not me scenario, different
"lockfiles"), but that's a tough one to confirm.
I'm not a Go supremo exceptionale, but this sounds like a good candidate to
burn 8 hours on the weekend :)
…On Tue, Mar 29, 2022 at 1:44 AM Francis Lavoie ***@***.***> wrote:
We ship a caddy:builder image variant that you can use (see
https://hub.docker.com/_/caddy) which is also based on Alpine. It's
definitely not an issue with your build.
There's definitely a bug in caddy-json-schema that needs to be fixed,
it's generating incorrect URLs for trying to fetch each module's docs.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADK6SRMPNK3V7XRII3JP22LVCKKE3ANCNFSM5HWKW2OQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Richard Allen
Mobile: 347 339 2153
|
I reproduced the issue:
Error is |
Fixed in #8 |
Was going to note that I was still hitting this when generating the schema for 2.5.0 but I see now that there's a PR to fix it which is great. If anyone is keeping track of which plugins have this doc issue, I hit it for all 3 of the ones I mentioned before plus one new one. Here's the current list of the plugins I had to manually fix
|
Thanks @mdegat01 -- quite likely a bug in the docs system I wrote. I'm not sure what those have in common yet, though, so I'll need to find some time to take a look and see what's going on. |
Hey,
go: 1.17.2
caddy: 2.4.5
The url
https://caddyserver.com/api/docs/config/apps/auth
response is empty with 502 error code.Might not be a good idea to use the web server from caddy itself, it's an external services which can always change.
Like in my case it looks like auth is gone?
The text was updated successfully, but these errors were encountered: