Skip to content

Cannot set property 2011-06-15 of #<Object> which has only a getter #3555

@misogihagi

Description

@misogihagi

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Uncaught TypeError: Cannot set property 2011-06-15 of # which has only a getter
when I tried
node dist-tools/browser-builder.js s3,ec2 > aws-sdk-s3-ec2.js

and saw this index.html,

<!DOCTYPE html>
<html>
  <head>
    <script type="module">
    import AWS from './aws-sdk-s3-ec2.js'
    console.log(AWS)
</script>
  </body>
</html>

occurs:

aws-sdk-s3-ec2.js:54153 Uncaught TypeError: Cannot set property 2011-06-15 of #<Object> which has only a getter
at Object.115.../apis/ec2-2016-11-15.min (aws-sdk-s3-ec2.js:54153)
at o (aws-sdk-s3-ec2.js:4)
at r (aws-sdk-s3-ec2.js:4)
at aws-sdk-s3-ec2.js:4

Is the issue in the browser/Node.js?
Browser

SDK version number
v2.799.0

Activity

added
bugThis issue is a bug.
needs-triageThis issue or PR still needs to be triaged.
on Nov 26, 2020
added a commit that references this issue on Nov 26, 2020
ajredniwja

ajredniwja commented on Dec 16, 2020

@ajredniwja
Contributor

Hey @misogihagi thanks for opening this issue and submitting a pull request: can you please address build failures for the PR.

misogihagi

misogihagi commented on Dec 18, 2020

@misogihagi
Author

Phew, fixed as test succeed. check it up!

jcorteza

jcorteza commented on Oct 21, 2021

@jcorteza

Is there a resolution to this? I'm running into the same problem

ctwomblyamzn

ctwomblyamzn commented on Dec 15, 2021

@ctwomblyamzn

Our package amazon-connect-streams is affected by this bug. Can we please get some attention to this?

ahmedyounis

ahmedyounis commented on Apr 2, 2022

@ahmedyounis

Our dev team is getting the same error when integrating https://github.com/amazon-connect/amazon-connect-streams into our angular project.

ctunna

ctunna commented on May 5, 2022

@ctunna

Our team is also experiencing this issue.

jonatandmapser

jonatandmapser commented on May 30, 2022

@jonatandmapser

any news about this?

apdarshan

apdarshan commented on Jun 27, 2022

@apdarshan

Facing the same issue #amazon-connect/amazon-connect-streams#577 (comment)

Currently blocked on it, any short-term fix for this ?

SatoshiTomita

SatoshiTomita commented on Jun 30, 2022

@SatoshiTomita

It's not a pretty solution, but I solved the error by downloading the following amazon-connect-streams release file and commenting out the code below.
AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.min');

I have not checked in detail, so there may be some impact.

yenfryherrerafeliz

yenfryherrerafeliz commented on Jul 15, 2022

@yenfryherrerafeliz

Hi, we are currently investigating this, and we may come up with a solution as soon as possible. However, in the meantime you could do the following:

  • Open the generated js file
  • Search for:
AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.min');
  • And then, replace the text above with:
Object.defineProperty(AWS.apiLoader.services['sts'], '2011-06-15' , {
  value: require('../apis/sts-2011-06-15.min'),
  enumerable: false,
  configurable: true
});

That solution came from the following PR, so thank you @misogihagi for it.

Thanks!

self-assigned this
on Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @apdarshan@ctunna@AllanZhengYP@ahmedyounis@ajredniwja

    Issue actions

      Cannot set property 2011-06-15 of #<Object> which has only a getter · Issue #3555 · aws/aws-sdk-js