Category Archives: IE11

My Karma tests are failing in IE on my Jenkins and I don’t know why

We had a small problem I would like to share today. We have Windows 2012 R2 with Jenkis as one of means to build our stuff (I know, W2012 man… others in our company use different CI systems and there was also some other reason for W2012 R2, but if I had the choice I would definitely pick some newer OS).

Some days ago, our IE tests started to fail. The reason from Jenkis : Timeout. Wait, what? We didn’t changed anything in the build and test process!!! Indeed there were code changes but no one touched the build pipeline.

After short investigation, the reason to this was quite simple (as always) :
It seems like there was some update that changed IE or touched it’s settings and it wanted me to confirm security setting when I ran tests from my account.

Something like this :
ie 11 security settings

OK, let’s suppose that IE timeouted for the same reason on Jenkins job. But Jenkins runs as service, as special privileged Local System Account. How can I run IE like this account?

This link helped : https://marckean.com/2010/12/17/run-internet-explorer-as-the-local-system-account/

You need to :

  1. download PsExec from this URL : https://technet.microsoft.com/en-us/sysinternals/bb897553
  2. execute this command : psexec -s -i “%programfiles%\Internet Explorer\iexplore.exe”
  3. IE will open
  4. make IE happy
  5. close it
  6. never touch it again

The tests should be good again 🙂
Thanks to the author of aforementioned blog for this time saver.

window.showModalDialog behaves differently on IE, FireFox and on Chrome

I would like to share one small “feature” I have found on current latest browsers. By “latest browsers” I mean (I tested this behavior on IE 11, FireFox 29 and Chrome 37).

The problem:
If say for whatever reason you are using JavaScript modal dialogs with

window.showModalDialog()

like in older web app (chrome and firefox displays waring you should use

window.open()

instead, more on this here : http://stackoverflow.com/questions/20733962/why-is-window-showmodaldialog-deprecated-what-to-use-instead ) and you are passing in multiple same arguments (for whatever reason, maybe you had default values + new values as params and previously IE took second parameter, that is the mystery of legacy code and I don’t suppose majority of you will do this, but it might happen), than you will have problem on FireFox.

So given JavaScript call like this

window.showModalDialog('HtmlPage1.html', null, 'resizable:0;status:0;dialogwidth:900px;dialogheight:200px;dialogwidth:100px;dialogheight:300px');

the following will happen :

no Error will be thrown, IE and Chrome will use second pair of dialogwidth and dialogheight, FireFox will use first one and all of these popups will be styled using these values so the same code will result in different UX.

Small side note though, Chrome will make dialog really 100px and IE will hit some internal min value I suppose and Chrome’s window will not be modal (you can click away) but  everywhere the window will be opened.

Hope this might save you some time in case you run into the same problem.

Internet Explorer 11 isn’t displaying all .htc files in JavaScript debugger part

Since I upgraded my Windows 7 developer box with Internet Explorer 11 I am very satisfied with how Microsoft upgraded developer tools. They have added new stuff and it works (well from time to time IE freezes but that might be also my problem with my JavaScript since other browsers hang/crash from time to time on my code also). But that is another story.

Today I came across small “feature” that took me few minutes to realize, what is happening.

I am using IE 11 to debug older ASP.NET WebForms app (with older I mean we are just now moving away from HTC files – Microsoft specific stuff).

IE is loading page from my local IIS with x-ua-compatible flag like described on the link provided, setting rendering core to use version 8 so behaving like IE8.

Loading my page like this results to loading just some .htc files referenced. If I set breakpoint to some code in .htc file, it will be not hit, even some objects are declared as undefined but strangely executing any method over these yields results and works as expected (so I suppose the JS core works as it should , it’s just matter of developer tools).

Quick fix to this is : just reload the page, then all files will be loaded and you can happily work as expected.

Small sample how it looks like in IE developer tools (the very same page, just loaded 2 times) :

First load:

ie11 developer tools load error

Second load:

ie11 developer tools load OK

Just in the case, version of my IE 11 :

my ie11 version

Hope this helps someone, enjoy.