I'm getting EXC_BAD_ACCESS crashes in a WebThread, while my app is trying to process some javascript on a page startup. The javascript is long and involved and is probably what's bringing this down. The only hint is that the call stack says it's happening in WebCore::StorageMap::key(unsigned int). Can't debug it in the web debugger because it crashes on page startup so I never get to a point where the page can be selected in the developer menu. Has anyone seen an error like this, or have a good way to track this down?
We finally figured out what was wrong. There were two pages - both used a third party Javascript library. When you ran either of them, it was fine. It was only after you ran one after the other where the second one crashed. The reason was although they were running the same library, they were running different versions of the same library, which stayed resident in cache. When the second page tried to run the library of the first page (because it was still in cache) it crashed.
Related
I'm trying to automate some online work through JavaScript and the Firefox (or Chrome) dev console. The work is mostly inputting the same (or similar) data on the same exact pages for many many people.
Example:
unique id
date 1 and 2
some more numbers
I wrote a very simple script that runs in the console and enters the data just fine.
The Problem
My script stops execution whenever it requires the page to reload or it loads another page. I cannot find any information on how to continue executing a script after a page has loaded.
My Limitations
I'm basically limited to what's on FireFox, Chrome, or Edge. Unfortunately, I cannot download any programs or tools that would make the automation any easier right now. Otherwise, I would just use Selenium and Python.
What I've Tried
First I tried to use the script that I describe above (simple DOM manipulation)
Then I tried to use the Selenium browser add-on, but I had to enter a starting URL for it to run. Selenium was not able to get past the login page of our system which is the only static URL that I can use as a starting point.
I then tried to use the Firefox Browser Console (different from the dev console) because the documentation seemed to suggest that I can use JavaScript on the entire browser (not just one tab). Unfortunately, I cannot find any helpful information on how to use the browser console for DOM manipulation. Everything that I search for points to how you create a browser extension, add-on, or how to use JavaScript on your own website.
What I Want To Do
I want to create a script that runs in a dev console. The script should take all of the data either from a separate page or an array then enter the data on each page for each person. I'll also have it prompt the user to verify the data before submission.
What I'm Looking For
What I'm hoping to get from this question is at least one three things.
An answer to the question's title.
Being directed to documentation or some other solution that can solve any of the above problems.
Being told if this is impossible and why by those who have more experience than me (I don't understand if the problem is just a lack of knowledge or limitations on the tools themselves.)
I think you can create a chrome extension and put your code in the background service worker. or use workers read this link
I've been working on an Angular app for a couple months now, and recently I started seeing a condition where the app compiles without errors, but when it reloads in Chrome there's just a blank screen. Also, no errors in the console. When I look at the markup, I can see the tag for my root component, but nothing else renders. I'm fairly certain I should NOT see the tag for the root component, but rather the rendered HTML, right? So it loads index.html, then craps out without any indication of what the issue could be. I have been attempting to move my components out of app.module and into feature modules to clean things up, but when I reverse those changes I still can't get the app to load. I've tried stopping and restarting the live dev server, but still no joy.
I'd post code here, but there's a ton of code in this app, and I don't know where the problem is. Why would Angular refuse to render without any compile or console errors, or any indication of what I can do to fix this?? If anyone has any idea where I can start to look, I'll be happy to post code.
FYI, I'm using Angular CLI 7.2.3, Angular 7.2.2. I'm developing in Visual Studio Code with the latest updates on a Windows 10 machine. I should also say that this has happened a few times during development, but I was always able to figure out what was causing the problem.
As requested, here is my answer. It's a bit embarrassing, given that I've been doing web development for over 20 years, but I forgot that I had disabled some options in the Chrome debugger settings. So Angular WAS sending errors when I got the blank screens, I just couldn't see those errors because I had disabled them. Once I reset the options to the default for Chrome, I was able to see all of the errors causing the page not to render. I realized this when I loaded the app in IE Edge and was able to see the errors in the console. I figured if IE is showing me the errors, I must have disabled them in Chrome.
I have been using ZAP to find any final kinks for a website I'm working on. Everything is working great except for I've noticed that there are no alerts being logged in the ZAP gui when I run an active scan following a passive spider.
The initial passive scan for a new session logs alerts just fine but I'd really like to see the alerts from the active scan. Am I missing something? I tried restarting a new session and going straight to attacking but it's still not logging anything. Does it maybe need to finish before it starts logging the alerts? I have checked the generated html report and it doesn't indicate whether the alert was flagged by a passive or active scan so I really can't tell. I doubt there are so few vulrnabilities in my little web app.
If anyone has an idea as to what setting I'm missing or if I'm doing something wrong I'd appreciate the advice.
Ah, I think I may have found what was going on. I checked the real time scan progress and ZAP skipped many attacks because of low rule limits I set to speed up the scan.
How are you exploring your app?
The number of requests are very low, that suggests to me that you are not exploring your app effectively.
You can either explore the app manually (which proxying your browser through ZAP) or using automation via:
The standard spider (fast, but doesnt handle javascript so well)
The ajax spider (slower, but launches browsers so handled JS well)
Your own unit tests (good but only if you have some)
Have a look at you app in the Sites tree - if it doesnt appear to be showing as many pages as you expect then you need to focus on exploring your app more effectively.
The active scanner doesnt do any exploring, it only attacks the urls you've found by other means.
I am the developer for a large enterprise website, after the upgrade to chrome 32 the website stopped working completely. I Get the 'aw snap' about the time we have to render most of the elements on the page.
Its a massive code base so i haven't been able to find what's causing it. Ive been booting chrome in debug mode and watching the logs there.
Wierd behavior:
1)If i disable flash it works, we are using swfobject with a flash library.
2)I sometimes see in the logs when it crashes "Uncaught RangeError: Maximum call stack size exceeded" so i must have a infinite loop, but its not a always thing.
3)If i refresh enough it will boot all the way up, and work for good until i kill tab and start over. But again thats a sometimes cause it may start the crash cycle again after a few refreshes.
4) I sometimes see the error "file_descriptor_set_posix.cc(22)] FileDescriptorSet destroyed with unconsumed descriptors" Which i think relates to a infinite loop in the rendering of the webpage which would relate to the maximum call stack exceeded error.
Does anyone know what has changed in Chrome Version 32 that would be a good starting place to find the bug?
Libraries used: SWFobject, Backbone, underscore, soundmanager.js
I dont know why this fixed it, or what chrome changed that caused the code to break but if anyone is interested in what we did to resolve the error i'll explain.
1) I made all events going out of swfobject and our swf code go directly to the Flash.js class we had to interface with flash. Before it was propagating through a Backbone.dispatcher to the flash class. That caused the aw snap error to go away.
2) We were using a datetime library called Moment.js version 2.2.0. It was the one throwing the maximum call stack error, after updating that to 2.3.0 it stopped. Would love to know what chrome changed to cause a infinite loop.
If anyone has info on what chrome changed between the two versions that caused either error, I would love the answer because its a bit scary fixing the symptoms but not knowing the cause.
chrome will open multi tasks in the task manager, and it is sensitive to many plugins
try the following
1- go to settings in chrome
2- open extentions
3- disable all the extensions that you can
4- close chrome
5- open task manager in windows
6- go to processes
7- close all the processes related to chrome
8- reopen chrome and check your problem again
I installed this popular, light-weight script on a website but it is running very poorly and maxing out my processor.
http://www.leigeber.com/2008/12/javascript-slideshow/
This is for sure my problem and nothing wrong with that script which runs fine for me on the demo site, but I have no errors and do not understand where the conflict lies. Any ideas on how to root this out?
Install firebug
Find an action (e.g. clicking on a picture) that causes slow down.
Using firebug put a break point next to where that action starts
examine the code