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

TypeError: Attempting to change enumerable attribute of unconfigurable property with PhantomJS #1396

Closed
sridharrajagopal opened this issue Mar 8, 2017 · 14 comments
Labels
guidance Question that needs advice or information.

Comments

@sridharrajagopal
Copy link

Hi,

I'm trying to use AWS SDK for Javascript in a browser environment, but with PhantomJS.

PhantomJS chokes with the following error stack with the aws-sdk-js

https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:40 in defineProperty
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:40 in error
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:37 in i
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:37 in n
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:37
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:39 in callListeners
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:39 in emit
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:38 in emitEvent
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:38 in e
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:40 in runTo
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:40
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:38
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:38
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:39 in callListeners
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:39 in i
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:37
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:36 in t
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:36
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:37 in get
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:36 in s
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:36 in getCredentials
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:37
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:39 in callListeners
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:39 in emit
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:38 in emitEvent
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:38 in e
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:40 in runTo
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:40
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:38
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:38
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:39 in callListeners
https://sdk.amazonaws.com/js/aws-sdk-2.24.0.min.js:39 in i

I'm referencing the corresponding issue in phantomjs github - ariya/phantomjs#13895

Any help is greatly appreciated!

Thanks,
Sridhar

@chrisradek
Copy link
Contributor

@sridharrajagopal
What version of phantomJS are you using? Travis currently runs anytime a PR is submitted to this SDK, and one of the steps is running the browser sdk tests using phantomjs 2.1.14.

@sridharrajagopal
Copy link
Author

sridharrajagopal commented Mar 9, 2017

@chrisradek

I'm running phantomjs 2.1.1
Can you tell me where I can find 2.1.14?

I get mine from https://bitbucket.org/ariya/phantomjs/downloads/?tab=downloads and only see 2.1.1 there.

Thanks,
Sridhar

@sridharrajagopal
Copy link
Author

sridharrajagopal commented Mar 9, 2017

@chrisradek

Here is such a call that phantomjs complains about -

        // s3.upload({
        //     Key: "file.png",
        //     Body: buf,
        //     ACL: 'public-read',
        //     ContentType: 'image/png'
        // }, function(err, data) {
        //     if (err) {
        //         return alert('There was an error uploading your chart: ', err.message); 
        //     }
        //     alert('Successfully uploaded chart.');
        // });

The other one was a dynamodb query

Both of these work in a "regular" browser.

@sridharrajagopal
Copy link
Author

Btw, I checked that 2.1.14 from npm is indeed version 2.1.1 that I got directly from the phantomjs github.

@bla0815
Copy link

bla0815 commented Mar 31, 2017

Hi i had the same error message using the AWS browser SDK in Apache Cordova, whenever i tried to invoke aws-lambda functions. Apparently it was due my restrictive Content-Security-Policy (albeit allowing for the aws-sdk), since i was able to get it running by using the wildcard (for development).

I have yet to figure out, which domain is specifically needed for my lambda-invocations, so feedback is appreciated, but i wanted to get this out, because i never would have guessed the cause from the error message alone and maybe it's also the cause for OP's problem.

@sridharrajagopal
Copy link
Author

Any updates or feedback on this issue?

Much appreciated!
Thanks,
Sridhar

@sridharrajagopal
Copy link
Author

Any updates?

Thanks,
Sridhar

1 similar comment
@sridharrajagopal
Copy link
Author

Any updates?

Thanks,
Sridhar

@1c7
Copy link

1c7 commented Jul 28, 2018

No updates?

Thanks
Cheng

@srchase srchase added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 3, 2018
@srchase
Copy link
Contributor

srchase commented Oct 3, 2018

@sridharrajagopal

Is this still an outstanding issue? Since you raised this issue, development on PhantomJS has stopped.

There are some more recent alternatives that would likely be a better fit for you long-term as they are being developed.

@no-response
Copy link

no-response bot commented Oct 10, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Oct 10, 2018
@sridharrajagopal
Copy link
Author

Yes, this is still an outstanding issue for me, though I haven't tried it again since I reported my issue above as it didn't work.

I can look into alternatives for PhantomJS as you suggest.

@no-response no-response bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 10, 2018
@no-response no-response bot reopened this Oct 10, 2018
@srchase
Copy link
Contributor

srchase commented Oct 15, 2018

As PhantomJS is no longer supported, I'm going to close this issue. Let us know if you have any issues using the SDK with the current alternatives.

@srchase srchase closed this as completed Oct 15, 2018
@srchase srchase added guidance Question that needs advice or information. and removed Question labels Jan 4, 2019
@lock
Copy link

lock bot commented Sep 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

5 participants