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

IE 11 error: Object doesn't support this action #154

Closed
devuxer opened this issue Mar 3, 2019 · 7 comments · Fixed by #155
Closed

IE 11 error: Object doesn't support this action #154

devuxer opened this issue Mar 3, 2019 · 7 comments · Fixed by #155

Comments

@devuxer
Copy link

devuxer commented Mar 3, 2019

I'm experiencing a perplexing error in Internet Explorer 11 (IE 11) when the following line is hit in this script:

var desc = Object.getOwnPropertyDescriptor(from, nextKey);

The error is:

SCRIPT445: Object doesn't support this action

It's not clear to me what object and action are being referred to in this message since Object.getOwnPropertyDescriptor has existed since IE 8.

I've pushed a github repo that reproduces this bug. Please see the README for additional details and screen captures from the debugger.

Steps to reproduce:

  1. Clone the repo to your machine
  2. Open a command line to the root directory
  3. npm install
  4. npm start
  5. Open IE 11
  6. Hit F12
  7. Browse to localhost:3000
  8. Note the errors in the console

(Note, you must have node installed on your machine)

@devuxer devuxer changed the title Object doesn't support this action IE 11 error: Object doesn't support this action Mar 3, 2019
@devuxer
Copy link
Author

devuxer commented Mar 3, 2019

After a lot Googling, I think the error I'm getting is probably caused by this: ljharb/es-abstract#39

@ljharb
Copy link

ljharb commented Mar 5, 2019

Looks like this is an issue in this repo's broken Object.assign polyfill - Object.getOwnPropertyDescriptor(window.location, anything) crashes in IE 11.

Since Object.getOwnPropertyDescriptor isn't actually required for a correct polyfill - see https://github.com/ljharb/object.assign/blob/master/implementation.js#L12 specifically, for the most correct polyfill for Object.assign i'm aware of - this is a bug in this repo's assign polyfill.

@devuxer
Copy link
Author

devuxer commented Mar 6, 2019

I can confirm that the "Object doesn't support this action" error went away when I switched from using polyfill.io to core-js, so @ljharb's comment appears to be the correct explanation.

@JakeChampion JakeChampion transferred this issue from polyfillpolyfill/polyfill-service Mar 6, 2019
@markcellus
Copy link

Still running into this issue. @ljharb what is the correct polyfill to use? Looks like your link went stale.

@ljharb
Copy link

ljharb commented Sep 14, 2019

@mkay581 the link works for me - https://npmjs.com/object.assign works as well.

@JakeChampion
Copy link
Owner

@mkay581 What is the polyfill.io url you are using and what browsers do you see this issue in? The related patch for this was added on 6th March, I'm wondering if you are seeing another bug/issue.

@markcellus
Copy link

Actually we went with another solution. So I'm unable to recall the details of the issue now. Sorry!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants