CRA precache fails because of .LICENSE extension - .net-core

So, we have a situation where in production the precache is failing on our PWA because of a weird .LICENSE file on our server that is giving us 404
specifically an error like this
uncaught (in promise) bad-precaching-response: bad-precaching-response :: [{"url"
How we can fix that?

Well, the fix is simple.
Our web-server returns only known file extensions, and .LICENSE is not one of them.
Just enable the ServeUnknownFileTypes flag on your StaticFileServer options info

Related

How to show errors in browser?

I'm getting started with Sylius. Symfony version is 3.2.7. On some pages I have some errors. The pages show text:
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
I want the errors to be displayed in browser, with full stacktrace.
I know I can see the error in var/prod.log, but it doesn't show the whole stacktrace, only the last frame. And seeing the error in browser would be more convenient: that's what I'm used to after a lot of working with Yii and Magento.
Is that possible with Symfony/Sylius?
I added /app_dev.php to the url to run the website in development environment, and there I can see the stack trace.
That is, https://[my_domain]/app_dev.php/[page] instead of https://[my_domain]/[page]
By default Symfony show trace in dev environment. In prod environment it show simple error message. For running your project in dev you can use built-in PHP Web Server or Web Server Bundle
Also you can use symfony installer app to serve request
Use symfony serve --no-tls in symfony folder.
It will show you requests and errors in red.

Lucee not showing run-time errors

Running Lucee server 5.2.1.9 (hosted at Vivio), and I'm unable to get it to show any run-time errors.
I have debugging enabled
I have enabled all debug info types
I've set a debug template (for all IPs); currently set to "Classic", but I've tried "Comment" and "Modern" as well.
When an error occurs, I get an empty page. If a debug template set, I get dumps of all the appropriate scopes and DB activity, as well as execution times... but no error message/details or stack trace.
Is there a setting I'm missing?
How do I insure Lucee displays my run-time errors during development?
I'm not sure if you every figured this out (kind of a necro). If you are in Dev disect your application.cfc. I had an issue in my onRequest section. Someone threw a cftry around the target page include. This ran Lucee into the catch and it showed a blank page.
If that doesn't help try removing your OnError function in there. There might be something in there that is trying to serve up a friendly error page which could prevent error output.
Also, look in Lucee server administrator and check that it is pointing to the native error.cfm that comes with the Lucee package.
I have to add it even though it isn't likely the cause. Search your code for any abort. It could be someone was testing a routine and was aborting to see how far Lucee was processing.
Hope these suggestions help.

2sxc: 404 Error after adding App module on the page. API is missing?

I have a problem when placing an App module(v 8.4.8) on a page. When I placed an App module on a page I got a pop up saying "Had an error talking to the server (status 404). if you are an advanced user you can learn more about what went wrong - discover how on 2sxc.org/help?tag=debug".
This error happens on whatever action I try to do: trying to add and app, refresh page etc.
I checked a communication to the server using Firebug and seems that one of APIs are missing:
~/desktopmodules/2sxc/api/view/Module/GetSelectableApps
Referer: ~/desktopmodules/tosic_sexycontent/dist/dnn/ui.html?sxcver=8.4.8.19191
Did I missed something? Should I make some configuration after SexyContent module install (v 8.4.8)?
I just checked a video by Daniel Mettler where he showed how to install a module and seems that process is simple. Nothing to worry about.
Does anybody has any idea what might went wrong here?
The same actually happens when I install and Content module: Error about missing APIs:
~/desktopmodules/2sxc/api/view/Module/GetSelectableContentTypes
~/desktopmodules/2sxc/api/view/Module/GetSelectableTemplates
Thanks a lot for your time
My best guess is that it's an issue with the dnn domain/path configuration. So basically my guess is that
you have multiple domains, and if this is configured incorrectly, the paths in the js-calls won't fully match the original one
you have sub-portal (with paths like /products/) or something, and this isn't configured correctly in dnn
languages in portal-paths are causing similar issues.
So please compare EXACTLY the full base path and see if that's the issue.

MVC4/IIS7 Error 500 diagnostics. No stack trace, no event log

I have an MVC4 project which worked fine on the (IIS7) server. Then I moved to a new laptop, so of course all the NuGet packages I'd installed had to be uninstalled and reinstalled with different versions in order to get it to build (all I'm using is dotless and whatever dependencies it has, but that appears to be more than nuget was ever designed to cope with).
It now works fine again on my new laptop, but on the server all it does is give me an Error 500. No stack trace. There's nothing in the event log on the server. I set up Failed Request Tracing but the log file directory is empty.
I created a file on the server called test.html:
<p>test</p>
That can't be served either. Error 500 again. Nothing in the failed request log directory, nothing in the event log.
Everything else on that site on that server works fine.
So my question is: Is there any known way to set about diagnosing a situation like this?
UPDATE
It turns out I misconfigured Failed Request Tracing, and had it only enabled for *.aspx. When it's enabled for *, I do get fr00000?.xml in inetpub\logs\FailedReqLogFiles\W3SVC1, one for each failed request.
The problem turns out to have been something broken in web.config
Sounds like some configuration issue with the site and how it's set up in IIS. Without being at your computer, it's hard to say with any certainty, but my best guess based on experience is that you've got a permissions issue with the directory that's being used as the docroot of the site. Make sure IIS_IUSERS has at least read and execute access to that directory.
It turns out I misconfigured Failed Request Tracing, and had it only enabled for *.aspx. Once I had it enabled for *, then for each failed request a sequentially numbered log file was created:
inetpub\logs\FailedReqLogFiles\W3SVC1\fr00000?.xml
...etc. Those files contain a staggering amount of detail.
I searched for "exception" in that xml, and the problem turned out to have been something broken in web.config
So this was pure stupidity on my part.

Disable broken Drupal 8 module

Can't seem to manage to disable a broken D8 module, I'm suffering from WSOD right now, and can't seem to
get this off. I'm getting
PHP error
Uncaught PHP Exception ReflectionException: "Class \Drupal\restui\Controller\RestUIController
does not exist" at /mnt/www/html/xxxxx/docroot/core/lib/Drupal/Core/Entity/EntityResolverManager.php
line 132 request_id="v-210c8b9e-9aaa-11e4-9d97-22000a1f8652"
In my Acquia Cloud logs, I'm really just trying to get this out of there, but no dice. There was a hack for removing a module by modifying the active services yml, but it's not listed in the local repo.
Also this seems like part of a bigger problem - https://www.drupal.org/node/2225029
but there is little answer. Someone must know, right?
Try removing the module from your module folder and run rebuild.php
Remove routing file if any or module file such that there is only info file remaining inside your module folder, that way module will exits enabled but won't produce any error due to its faulty code.

Resources