Meaning of Firefox 4's error console showing “CoCreateInstance() FAILED” - firefox4

While running Selenium IDE tests on Firefox 4, I seem to get in the FF4-built-in Error Console a number of these messages (meaning Messages, as opposed to Errors, etc.), but I can't quite tell at what point they're occurring or what might be the cause. I'm not sure whether it's even a Selenium issue or something on one of my pages causing it.
CoCreateInstance() FAILED.
Are they cause for alarm?

CoCreateInstance is a function in the Windows implementation of the Component Object Model (COM). Firefox uses a binary-compatible clone of COM as part of its native-code architecture, which is likely the way that Selenium allows you to control parts of Firefox that aren't exposed via JavaScript.
So it's plausible that the CoCreateInstance messages are from Selenium, but it could be Firefox itself. You could create a new Firefox profile without Selenium installed and try navigating to the test page that triggers the log messages, and manually performing the test actions that trigger the messages. If you still get the messages, then Selenium is probably not the source of the errors. You could also try running the tests with Selenium on on Firefox 3.6. If the messages go away, then it's probably a (likely minor) incompatibility between Selenium and the latest build of Firefox.
The messages are probably not cause for alarm, so long as it's not interfering with your tests.

Related

Stop VB application from running in background

I have a console application (written in VB6 ) which is behaving strangely on my machine. I kick it off from the command line and what should be a two minute job drops straight back to the prompt - if I run this on another machine the executable will sit and wait until the job finishes before returning control back to the prompt. If I check process explorer I can see that the executable is running as a background process and other than this strange background-ness is running as expected.
Any thoughts on why this could be happening? (Running on 32-bit Windows XP Pro SP3.)
It sounds to me as though the app isn't being recognised as a console app on one of your machines. Console apps weren't officially supported in VB6, although there are some well-known hacks for creating them (particularly the free add-in vbAdvance). Possibly your console app is a bit unreliable? If Windows thinks your app is a GUI rather than a console app, it won't wait for it to finish.
As a pragmatic workaround: try launching with start /wait rather than just using the exename. That forces the command prompt to wait for the program to finish, whether it's a GUI app or a console app.
It's totally unclear whether this is an application you wrote and have the source code for. If that's the case, you need to get in and start debugging. At the least, use OutputDebugString to send information about what's going on to any number of potential viewers. Taking that a step further, consider rewiring the app using the Console module I wrote, along with vbAdvance to recompile. This combination will allow you the full power of the VB6 IDE to debug within. No more guessing about what's going on.
Then again, if it's not your app, I'm not sure what VB6 has to do with it and wish you the best of luck trying to figure out what's up.
Sounds like an error is occurring that is being 'swallowed' by the application. Do you have the source code?
Errors in VB6 apps are often due to some COM component not installed and/or registered.
Download SysInternals Process Monitor and this will show up accesses to ProgIDs that fail (uninstalled/unregistered COM components).
Check out: Process Monitor - Hands-On Labs and Examples.
Have you checked permissions? Is the application accessing any network based resources?

How can I hit breakpoints (and see error line numbers) when debugging javascript on Android?

I'm trying to follow these instructions for debugging android javascript.
I am aware of How can I debug javascript on Android?, but it's not clear to me how (or if) I can hit breakpoints - either using Chrome on the Android device, or the Android browser.
I can see and 'inspect' the device OK:
But breakpoints don't get hit, nor can I see line numbers on the errors in the console:
Between these two problems, I'm not getting much useful information from the debugging experience! I have tried going to 'about:debug' in the android browser, and do see the debug options appear.
I will add that the js I am debugging works fine in the latest Chrome on the same Android device.
First off, it seems like there are a bunch of syntax errors that may be preventing mustache.js from executing at all - see if you can take care of those first.
I'd try setting a breakpoint on the next line down - line #9 - to see if anything in that IIFE is running at all.
Assuming you are using a module bundler (such as Webpack) in development (based on port 8080 in your screenshot), most likely the code you're trying to debug is executed via eval. In which case by the time you can see it in the devtools, it has already run.
You can either use the debugger statement in your code, or running in production mode - where there's a real script file being executed. In both cases, you should attach the remote debugger first, and only then navigate to your page (or refresh it).
I have now tried the same thing again, and this time didn't experience the problem. Unfortunately I can't put my finger on what the problem was exactly, as due to my dev machine dying I am running a new windows 10 installation, and potentially a different version of the Android SDK and ADB. The phone and android browser haven't changed.
Anyway, I can now set and hit breakpoints as I'd expect:
I also get better error descriptions and line numbers:
FWIW, the only problem that needed fixing was changing some 'let' declarations to 'var'.

React Native Did not get valid calls back from JS Error

often when I have the Chrome Dev Tools open while developing React Native Android on my device, I get the following Error:
Did not get valid calls back from JS: [[],[],[],[],[]]
callFunction
ReactBridge.java:-2
run
CatalystInstanceImpl.java:203
...
Any idea whats wrong?
I'm using react-native v0.19 with a Nexus 5
This error should no longer be appearing as of React Native 0.23 when debugging with Chrome Dev Tools. The issue was the debugger returning "bogus values" to the app when it fails to handle a request. See this commit for the fix.
However, this error still sometimes occurs when debugging with Nuclide. Here is the issue I opened regarding that problem.
Either way, the app showing this error is just a symptom, where the real problem is that a request from the app to the debugger (in its role as the JS engine) couldn't be handled.
One specific reason I ran into was the Batched Bridge not being set, due to the debugger failing to load the JS app bundle (in my case this was caused by issues with the port at which it tried to fetch the bundle). However, there are probably many other reasons this might happen.

Android Chrome constantly crashing with my HTML5 website — How to debug it?

i have built a HTML5 web site (or rather webapp as you wish) and it works fine in Chrome and firefox. I would say the only thing out of the ordinary is, that it uses
Google Closure in some parts (the issue persists in the simplest, non-optimized mode)
HTML5 canvas for 2D drawing
Now I was curious whether it would run on my Galaxy Tab Tablett and indeed it does. I was able to set up the remote debugging facility https://developers.google.com/chrome-developer-tools/docs/remote-debugging?hl=de and debug my code to get rid of a few things that were not working properly. However I notice that android-chrome regulary crashes while I use my app. The console in my desktop browser then complains about websocket being closed (thats why I suspect it really is a problem of the tablet side).
I would like to know what makes my website crash and am a bit flubbergusted that my HTML/js site can crash a browser like chrome so easily. I would have thought that it should be more stable than that.
Now as I would like to have an "entry" point into debugging the issue:
is there a crash log of chrome for android that I can inspect somehow?
can I somehow make it (chrome or android in general) more verbose on error messages?
There are a couple of things that you can do:
chrome://crashes will list the crashes that it has caught when a tab crashes - you might need to turn on crash reporting in the settings. You won't be able to fix it but you will be able to report it us so we can see if it is an issue.
Use logcat and see if there are any specific issues in the tracing output, such as an out of error message.

Inconsistent JavaScript behavior on same browser versions across machines

I'm looking at the weirdest thing and needs some help trying to identify what's going on. I've got some JavaScript running on a Microsoft SharePoint server that makes an asynchronous image request.
When I load pages in my 32bit & 64bit IE9 browser, the code runs as expected. When my colleague loads the exact same pages (pulled from a predefined list) in his 32bit and 64bit IE9 (note, all the browsing modes are set to the same value) the image request does not go out.
However if my colleague opens the dev tools and closes them again (not using it or submitting any commands) then reloads the page the request is made correctly. If he then closes his browser and reopens it, it stops working until the dev tools are reopened.
There is no ActiveX, flash, or anything else going on. It's 100% JavaScript, so I'm at a total loss as to how to trouble-shoot. Can anyone tell me what's going on or point me in the right direction?
Things to note:
His system does have JS enabled - all the other JavaScript on the page runs fine for him, it appears to just be my JavaScript that's affected.
We both tested Chrome and Firefox, all of which had successful results.
We both tested in different browser modes of IE9, IE8, and IE7 (through the IE9 executable).
If it matters, we're both on Windows 7.
I've found the source of the issue and it does indeed have to do with console.log(). Basically, what I've learned from Microsoft directly is that the window.console object does not exist until the browser's developer tool is opened. Until the first time it's opened, there is no window.console, and referencing it generates a code-interrupting error.
I found it a particularly annoying bug to hunt down, since I'm so conditioned to track bugs using the console... Anyway, MS said the issue is resolved in IE10, but for those of us who have to support current/previous versions, it'd be wise to use a wrapper for this function that tests that window.console is defined before calling it (I actually had a wrapper for other purposes, so it was really easy for me to just add the test condition).
Hopefully this will help others out who had the same difficulty tracking down IE bugs.

Resources