I'm developing a React app and incorporated a few packages, some of which seem to be spitting out uncaught console.error messages despite UI and functionality working just fine. The Console output currently looks like this:
I can't seem to find anything online about this, but is there any way I can track down and silence these messages? In particular I'm looking at the one saying Failed to load resource: net::ERR_FAILED, since the others seem to be coming from the React debugger.
EDIT: The error seems to be a side effect of some sort of Adblocker/tracker blocker built into Brave. Is there anyway I can still catch that in my Javascript code?
At first glance it could be something like a cache or some extension. Since you've said that you searched for a solution online and didn't find anything, I believe you already tried these solutions, but if not, here is something you can try:
Start Chrome with your extensions disabled or start in incoginito mode (the extensions will be disabled by default).
Clean your browser cache and cookies.
If you are like me (I hope not) and open 99+ tabs in your broswer, close them, it could be a problem due lack of memory.
Check the network tab to see if Chrome failed to download any resource file.
These are the tips I can give to you, I hope it helps.
Related
this is my first time asking a question through stackoverflow, while I've been a reader for years. It's the first time I really couldn't find an answer to my problem through the search function and it is probably because it's specific to my website.
I don't know when or after which modification I did, some javascript modules started behaving weird. The website would load partially the first time you visit it on chrome and then will load correctly if you refresh the browser. This won't happen on Firefox where the website will always be uncomplete. All javascript modules aren't loading correctly.
Website URL: www.levicechocolat.com
What I've tried so far:
Disabling Prestashop's Smart Caché for JavaScript features. This fixed 1 script, the navigation hover menu so I'll keep it off.
Disable CSS Smart Caché didn't fix anything, I kept it on. Same for all other prestashop optimizing features, tried one by one enabling/disabling and the only change I noticed was the above mentioned so that's the unique PS optimizing feature I kept off. I'll keep HTML compression off till I solve this issue.
Read that putting JS code at the end just before the </body> tag may fix this problem but it didn't.
I'd really appreciate if you can help me to figure this out. If you need me to post a code just let me know and I will.
Thank you very much for your help. If you live in Chile or come to Chile and you help me out I'd be glad to offer you some chocolates :).
Most probably there are some issues with the theme or some modules installed.
On Chrome it's working correctly for me and I see no Javascript errors. The wierdness is happening on Firefox, the homepage is not loading correctly and in developer console I see this javascript error: ReferenceError: writeCookie is not defined
You definetly need to debug this. What I recommend doing is moving your store on a local development machine and do the following:
Activate Prestashop's development mode: edit config/defines.inc.php at line 29 change: define('_PS_MODE_DEV_', false); to true: define('_PS_MODE_DEV_', true);
From Back Office > Advanced Parameters > Performance disable all CCC (COMBINE, COMPRESS AND CACHE) options - mainly "Move JavaScript to the end" and "Compress inline JavaScript in HTML" give errors on some themes
If it's still not working right (check for errors on Firefox and Chrome) and no other javascript errors show up try to "Disable non PrestaShop modules" from Advanced Parameters > Performance > DEBUG MODE
You can also have a look at the theme's custom javascript code maybe you can spot something there.
I hope this sheds some light on your issues.
it might be an issue with http and https.
Browsers might complain or don't load at all if resources are coming from mixed sources (secured and unsecured).
If your site is unsecured (http), try loading only resources (scripts, images) from unsecured sources.
If you cannot avoid loading resources from secured sources (https), you should consider get a SSL certificate and secure your website.
Is there a way to remotely debug a website?
I've just finished putting together a website that has some jquery animations. The site works fine on every machine/configuration I've tested it on.
One of the people the site needs to work for, however, reports that the animations don't work; which effectively breaks the website.
I strongly suspect his companies' network is the root of the problem; however diagnosing this is challenging as he is not a technical user and guiding him through the webkit inspector/console, etc. is not really an option.
Ideally I'd like to be able to 'capture' the network/javascript logs from IE or Chrome so that I can inspect them and attempt to work out what's gone wrong.
Aside:
I'm using an off-the-shelf Wordpress theme (http://theme.co/x/) for the site; so I expect the code is good.
While it doesn't seem possible to remotely capture and inspect the network or javascript logs from another machine's browser; there are a number of services that allow you to add automatic error reporting to your javascript code, which you can then inspect to find the root of the problem.
Examples of these are Errorception and Raygun.
As far as I have found, there aren't any similar tools to do so for monitoring network performance / loading specifically- although a similar approach with a custom script to detect if specific items have been loaded could be written.
I keep seeing the following error in Firebug but I do not understand what it means or if it is important:
Exposing chrome JS objects to content without __exposedProps__ is insecure and deprecated. See https://developer.mozilla.org/en/XPConnect_wrappers for more information.
The link provided is a bit over my head.
My questions are:
Should I be concerned about this error on my website?
How do I prevent this error?
Can someone explain the basics of what this means in layman's terms?
According to this bug report with jQuery, it'll be an issue with FireQuery rather than anything you're doing.
Do you have FireQuery installed with Firebug? If so, try disabling it and seeing if the error still happens.
Simple question, but I haven't been able to find an answer anywhere on SO or otherwise. In webkit's (Chrome/Safari) Developer Tools I can use the "Timeline" functionality to get an exactly look at precisely what is going on inside the browser while it loads a page (when it's evaluating script, when it's painting the screen, when it's downloading resources, etc.). I can also get the same information through Chrome's "Page Speed" extension.
Is there anything like this for Firefox?
I'm experiencing an issue where basically a script is not executing properly but there are no error messages in the console to give me any hit as to what is wrong. I want to try to get a more "in-depth" look at exactly what is happening and when so that I might find a clue as to what is going awry.
Thanks in advance!
Firebug has a timeline feature.
I'm using YUI's browser history manager, and my browsers no longer report runtime errors. They will still show a parse error in the error console, but if I call a bogus function, for example, inside some event handler, the browser just stops all js processing it seems. Even firebug's debugger will just quit when I get to a line with an error. Anyone else seen this? Is it even YUI?
The only solution I found to this problem ( which I've experienced a couple times now ) is to create an entirely new profile. I haven't narrowed down what exactly is going wrong with FF but my money is on a weird combination of Firebug, web developer tool bar, and one other extension. If firebug is missing or the web developer toolbar is missing in a FF profile, it doesn't happen.
Getting closer to storing my firefox profile in svn but it only happens every few months and not everyday after I recreate my profile.
As a half-assed solution, I keep a personnel and developer profile in Firefox now and the extensions I need for the developer profile on one of my websites.
Turns out the answer to this question is here...