karma-runner / karma-ie-launcher

A Karma plugin. Launcher for Internet Explorer.
MIT License
59 stars 23 forks source link

Cannot launch multiple instances of IE 11 #104

Open joshuafodera opened 5 years ago

joshuafodera commented 5 years ago

Problem: karma-ie-launcher fails to launch multiple instances of IE. It always reports "IE crashed" despite the IE window opening.

Cause: Its because launching IE the first time creates two processes, the initial process and a "tab" process. Node creates a socket to the initial process and listens to events. However when a second IE instance is created it spawns a new "tab" process and kills the initial process it spawns. Thus node disconnects from it, and believes its crashed (even though the "tab" process lives, and is clearly visible). Sharing the same process in IE is known as "frame merging".

Fix:

      IE_no_merge: {
        base: 'IE',
        flags: ['-noframemerging'],
      },

By setting the noframemerging it won't merge the processes and will keep the process around along with the tab process.

I think we should add this to the readme, as this issue will hit anyone that wants to run multiple instances if IE, and was quite frustrating and time consuming to debug.

Thanks,

Josh