-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Object.defineProperty TypeError: Attempting to configurable attribute of unconfigurable property #13895
Comments
I've run into the same issue. I'm running phonegap tests inside the ripple emulator inside phantomjs. During part of it's initialization it runs something like the following: Object.defineProperty(window, 'name', {
value: {}, configurable: true, enumerable: true
}); which throws this error:
This doesn't happen in Chrome. Interestingly enough I'm seeing the crash trying to define a property with the same name ( |
Good observation. I have changed all uses of the property "name" in my code and everything seems to run fine now. |
I wish I had that option. I'm using a third party tool (apache ripple emulator), and so I can't change the properties they use. |
When trying out the web page in https://www.browserstack.com by using their Iphone, I got an error "TypeError: Attempting to change configurable attribute of unconfigurable property." Searching Google for the error text led me to: ariya/phantomjs#13895 Just speculating that name() could be causing the error so I renamed it to filename(). There are two more name() functions that have yet to be renamed.
by using their Iphone, I got an error "TypeError: Attempting to change configurable attribute of unconfigurable property." Searching Google for the error text led me to: ariya/phantomjs#13895 Just speculating that name() could be causing the error so I renamed it to parser_name(). There is one more name() function that has yet to be renamed.
When trying out the web page in https://www.browserstack.com by using their Iphone, I got an error "TypeError: Attempting to change configurable attribute of unconfigurable property." Searching Google for the error text led me to: ariya/phantomjs#13895 Just speculating that name() could be causing the error so I renamed it to layout_creator_name().
Just checking in on this issue. Has it been fixed? |
I can confirm that this is still failing in phantomjs 2.1.1 |
I had the same problem when testing my SPA which uses CasperJS+PhantomJS and InfernoJS. |
I have the same issue when using AWS SDK - aws-sdk-2.2.19.min.js |
Any updates on this? Thanks, |
See Function.name, before ES6, Function.name is not configurable. I think for fixing this bug, PhantomJS needs to upgrade QtWebkit to latest version. Current QtWebkit 2.2 is released 2011, there will be more and more bugs like this one. |
On my end I'm using: Object.defineProperty(domElement, attributeToWatch, {
set: val => {
console.log('value has changed', val);
},
}); where |
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution! |
Do you guys have any work around about this issue? I'm updating mt project with angular 1.7.9 and got the |
@limingli0707 , Have you got any fix for This issue. I am also trying to update to Angular 1.7.9 and stuck. Can you help with the solution. |
Any progress? |
I also have similar issue, im using phatomJs for running unit tests for legacy browsers (es5 support) and my tests keep failing, in the beginning ive used Object.defineProperty(document.body, 'scrollHeight', {
value: 1000,
writable: true,
configurable: true
}); but i still get this error, not sure what to do, thinking on just dropping this test for phantomJs but i dont like it because its a hack and not a real solution |
When I run this code in phantomjs:
I am getting the error TypeError: Attempting to configurable attribute of unconfigurable property.
Running this code in Firefox, Chrome and IE does not seem to produce an issue.
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: