Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
ProGet: Exception when NuGet README links to image that is not contained in the package
-
Occurs in: 2024.2 (Build 2)
The following exception shows up in the Diagnostic Center every time when viewing a NuGet package which contains a README.md which in turn links to images that were not included in the package:
An error occurred in the web application: image-20220120113554562.png not found. URL: https://xxxxxxxxx/feeds/xxxxxxxx/xxxxxxxxxx/README.assets/image-20220120113554562.png Referrer: https://xxxxxxxxx/feeds/xxxxxxxxx/xxxxxxxxx/3.0.0 User: xxxxxxxxxxxxxxxxxxx User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Stack trace: at Inedo.ProGet.WebApplication.Pages.Packages.PackagePageBase.CreateChildControlsAsync() at Inedo.ProGet.WebApplication.Pages.ProGetSimplePage.InitializeAsync() at Inedo.Web.PageFree.SimplePageBase.ExecutePageLifeCycleAsync() at Inedo.Web.PageFree.SimplePageBase.ProcessRequestAsync(AhHttpContext context) at Inedo.Web.AhWebMiddleware.InvokeAsync(HttpContext context)
-
Hi @jw,
This is expected behavior, as 404 errors are logged for non-API requests, and that's a relative URL. Is
README.assets
a kind of documented standard? It might just intended for GitHub?Thanks,
Steve
-
I don't think there is a standard for that, it probably depends on the markdown editor where it puts its assets.
The README.md had a link like that:
![image-20220120113554562](README.assets/image-20220120113554562.png)
The reason I reported it is, every time some clicks on such a "broken" package, the Diagnostic Center is spammed with these pointless exceptions.
When those packages are coming from a 3rd party feed, then there is no real way to fix it other than praying a new version of that package is released.
-
Thanks for clarifying @jw !
I understand how this can be annoying, but I don't think we want to change the
404
not logging error for this issue in particular. Open to ideas if you have them.As an FYI..
- I think we use the marked library to turn text into Markdown, like this:
el.innerHTML = marked(el.textContent);
- some users definitely use absolute urls within readmes to navigate and show content/images within ProGet
- some users may use relative urls for links, but I can't imagine that ever working for images
If there's a way to supress relative urls in the marked library somehow, we could probably add it if you know how!
- I think we use the marked library to turn text into Markdown, like this:
-
Thanks for the insights.
I think a good option could be to configure the marked library to use a nested baseUrl using marked-base-url, something like
https://host/feeds/feedname/packagename/markdown/README.assets/image-20220120113554562.png
and then filter error logging URLs beyond themarkdown/*
URL segment.Personally, I always try to keep the Diagnostic Center clean and empty, so when new issues show up I can easily spot and address them. Sifting through messages that are basically spam, without being able to filter or ignore them costs me more of my time that I would like to invest for monitoring.
-
@jw we'll definitely keep this in mind, it doesn't look trivial based on our usage of that marked library
Personally, I always try to keep the Diagnostic Center clean and empty, so when new issues show up I can easily spot and address them. Sifting through messages that are basically spam, without being able to filter or ignore them costs me more of my time that I would like to invest for monitoring.
We do not recommend using the Diagnostic Center for proactive monitoring. It's only intended as a tool for troubleshooting things like connector or 500 errors that you / end-users encounter.
There are a lot of non-problem errors and warnings logged that aren't worth time even looking at.