Skip to content
This repository has been archived by the owner on Nov 16, 2017. It is now read-only.

Edge opens with wrong address #27

Closed
gmisiolek opened this issue Nov 23, 2016 · 6 comments
Closed

Edge opens with wrong address #27

gmisiolek opened this issue Nov 23, 2016 · 6 comments
Labels

Comments

@gmisiolek
Copy link

Hi there,

I have no idea what I am doing wrong, but while I run tests with Edge browser, it opens example.com instead of localhost.
If I change browser to Chrome, Firefox even IE - everything works good.

I tried that with:

  • karma start --browsers Edge
  • using grunt and grunt-karma
  • using Webstorm

Any ideas?

Best regards,
Greg.

@pchorus
Copy link

pchorus commented Dec 2, 2016

Hi everybody,

I have exactly the same issue like @gmisiolek.

@nickmccurdy
Copy link
Owner

Sorry for the delayed response, this seems like an issue with edge-launcher (the executable that this package calls internally, since Edge can't be launched as a traditional exe). This plugin relies on edge-launcher's -k (keepalive) flag, since the launching process has to stay open in order for Karma to continue listening to the browser. Unfortunately, there are some known issues with this feature:

This release adds support for a extra parameter -k that when set will keep the exe running for as long as the Edge process that was launched is alive. It does not work 100% of the time as Edge might decided to have multiple tabs in a process (keeping the process alive) or it might decide to kill the process during a navigation. Launching without this flag should be unaffected.

Your mileage may vary, but it might help to manually close Edge before launching Karma. If that doesn't work and you'd like to test against that project directly, please download edge-launcher 1.2.0.0, run MicrosoftEdgeLauncher.exe -k URL, and comment with your results. This plugin just waits for Karma's server and passes its URL to the same exe, so you should get similar behavior.

@nickmccurdy nickmccurdy self-assigned this Dec 10, 2016
@nickmccurdy
Copy link
Owner

@gmisiolek @pchorus Were you able to try this out? Unfortunately I still can't reproduce this error, so I don't know if I can fix it.

@leandro86
Copy link

I'm having this issue as well. Trying to run edge-launcher with -k flag results in edge opening example.com, instead of the provided URL parameter.

@leandro86
Copy link

I fixed the problem, at least in my case. Edge-launcher first opens the domain www.example.com, and then searches for that tab, comparing the url (you can see that in the method WatchForEdgeTab). Once it founds the tab, it tells edge to navigate to the url provided in the command line.

I don't know why, but I can't seem to access www.example.com. Even though I see example.com in the navigation bar, internally the url is actually something like this: ms-appx-web://microsoft.microsoftedge/assets/errorpages/dnserror.html#http://example.com/?619. Hence, edge-launcher will never find the tab.

I just recompiled edge-launcher, changing the url string example.com to example.net (to which I do have access). Nevertheless, I think there's no need to open initially an existing page: perhaps an empty url could work as well, I didn't try.

@nickmccurdy
Copy link
Owner

nickmccurdy commented Mar 19, 2017

I'm closing this because I still get the same behavior in karma-edge-launcher and edge-launcher (example.com loads successfully and then the same tab changes to the given URL as expected), suggesting that this is an issue in edge-launcher and not this package.

Please refer to MicrosoftEdge/edge-launcher#23.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants