Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not starting tests in IE11 and 404 errors in the network tab #293

Closed
web-padawan opened this issue May 2, 2018 · 8 comments · Fixed by #323
Closed

Not starting tests in IE11 and 404 errors in the network tab #293

web-padawan opened this issue May 2, 2018 · 8 comments · Fixed by #323

Comments

@web-padawan
Copy link
Contributor

web-padawan commented May 2, 2018

Description

After upgrading to latest polymer-cli 1.7.0-pre.16 released today, we get the 404 requests when running tests in IE11, and the tests are not starting at all.

Those 404 errors also appear in Edge but apparently not affecting tests. So there might be 2 problems here, actually. Also noticed that request URLs ending up with 404 errors in Edge look differently:

The issue is most likely caused by the new loader, assuming that was the only significant change since the pre.15 release of the CLI, which works in IE11 when serving the same code base.

I do not see such errors in the latest Firefox, though. And the requests in Edge seem related to the Babel stuff, so it might be that the problem is there.

Versions & Environment

  • polymer-cli: 1.7.0-pre.16
  • node: 8.11.1
  • Operating System: Mac OS

Steps to Reproduce

  1. Clone the repo:
git clone --depth 1 -b p3-preview-next git://github.com/vaadin/vaadin-themable-mixin.git && cd vaadin-themable-mixin
  1. Install the modulizer:
git clone --depth 1 -b polyfill-v2 git://github.com/web-padawan/polymer-modulizer.git && cd polymer-modulizer && npm link
  1. Install the tools:
npm i -g bower yarn magi-cli polymer-cli@next
  1. Install bower dependencies:
bower install
  1. Run the conversion:
magi p3-convert --out . --import-style=name
  1. Install dependencies:
yarn installl --flat
  1. Serve the component:
polymer serve --npm --module-resolution=node
  1. Open IE11 and go to http://127.0.0.1:8081/components/@vaadin/vaadin-themable-mixin/test/

Expected Results (polymer-cli 1.7.0-pre.15)

Tests are passing, no 404 errors in the network tab:

screen shot 2018-05-02 at 11 12 48

Actual Results (polymer-cli 1.7.0-pre.16)

Tests not starting, the 404 errors in the network tab:

screen shot 2018-05-02 at 11 10 34

Errors in Edge (different number - 6 errors, also different request URLs):
screen shot 2018-05-02 at 11 25 10

@aomarks aomarks self-assigned this May 2, 2018
@aomarks
Copy link
Member

aomarks commented May 2, 2018

Did the modulizer version change at all between before the regression above and now?

@web-padawan
Copy link
Contributor Author

web-padawan commented May 2, 2018

I'm only able to reproduce the issue with the latest modulizer Polymer/polymer-modulizer#413
When running the older one, referencing polyfill v1 and polymer 3.0.0-pre.12, the error does not appear.

But the output of the latest modulizer still works with the CLI 1.7.0-pre.15 so it seems that indeed there are actually 2 problems here, and one is either on the polyfill v2 or modulizer side.

@aomarks aomarks changed the title [esm-amd-loader] Not starting tests in IE11 and 404 errors in the network tab Not starting tests in IE11 and 404 errors in the network tab May 2, 2018
@aomarks aomarks removed their assignment May 2, 2018
@aomarks
Copy link
Member

aomarks commented May 2, 2018

I was able to reproduce this in a VM, although I still don't have much of an idea what's going on. I don't think it's related to the AMD loader -- the 404ing URLs seem to be things from webcomponentsjs, which makes me think it's probably an issue with the new webcomponentsjs loader. I see that 2.0.0-beta.2 is installed, which is the latest version.

@kevinpschaaf FYI

@web-padawan
Copy link
Contributor Author

web-padawan commented May 2, 2018

That makes sense, but please also consider the fact that tests with the same 2.0.0-beta.2 version of the polyfill are passing in IE11 with the earlier version of the CLI, as mentioned in the issue.

Se e. g. vaadin/vaadin-checkbox@59b4c96 and the Travis job for it.

@kevinpschaaf
Copy link
Member

@aomarks May be getting a similar error with latest CLI on IE11 in a polymer unit test:

http://10.0.2.2:8081/test/unit/polymer.legacyelement.html

The AMD loader is loading a file with name undefined:

image

Able to trap it by putting a conditional breakpoint in the AMD loader code injected into the test that traps 'undefined' showing in the filename:

image

aomarks added a commit that referenced this issue May 4, 2018
IE does not have document.baseURI. Use window.location or the base tag
instead.

Also updates tests to not use async/await, so that we don't need to
depend on a Promise polyfill in testing.

Possibly fixes #293
aomarks added a commit that referenced this issue May 4, 2018
IE does not have document.baseURI. Use window.location or the base tag
instead.

Also updates tests to not use async/await, so that we don't need to
depend on a Promise polyfill in testing.

Possibly fixes #293
@aomarks
Copy link
Member

aomarks commented May 4, 2018

We've released [email protected] with a bug fix to the new AMD loader. It seems to have fixed this problem, let me know if you can verify the fix on your side too!

@web-padawan
Copy link
Contributor Author

Thanks for the fix! I have tried it and it worked locally, will update our CI builds to ensure the tests pass.

@kevinpschaaf
Copy link
Member

Confirmed fixed the issue in polymer tests.

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

Successfully merging a pull request may close this issue.

3 participants