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

Building video resources...🛑 Cannot read properties of undefined (reading 'dev') #13514

Closed
2 tasks done
SalmonMode opened this issue Jan 3, 2024 · 5 comments
Closed
2 tasks done
Labels
pending-triage Issue is pending triage

Comments

@SalmonMode
Copy link

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

18.18.2

Amplify CLI Version

12.10.0

What operating system are you using?

Ubuntu

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

Only changes to generated cloud formation templates (mostly removing unnecessary env vars, or adjusting the dynamodb permissions to be shorter/include the exact permission I needed).

Describe the bug

When I try to use the amplify video add command, the generated GraphQL schema changes look like this:

type VodAsset @model (subscriptions: {level: public})
@auth(
  rules: [
    {allow: owner, ownerField: "owner", operations: [create, update, delete, read] },
    {allow: groups, groups:["Admin"], operations: [create, update, delete, read]},
    {allow: private, operations: [read]}
  ]
)
{
  id:ID!
  title:String!
  description:String!

  #DO NOT EDIT
  video:VideoObject @connection
}

#DO NOT EDIT
type VideoObject @model
@auth(
  rules: [
    {allow: owner, ownerField: "owner", operations: [create, update, delete, read] },
    {allow: groups, groups:["Admin"], operations: [create, update, delete, read]},
    {allow: private, operations: [read]}
  ]
)
{
  id:ID!
}

Which is already a problem, because @connection isn't supported anymore it seems, and so it complains about that. But if I fix that and switch it to @hasOne, it then gives this error:

Edit your schema at /home/chris/dev/NewSeat/document-dashboard/amplify/backend/api/documentdashboard/schema.graphql or place .graphql files in a directory at /home/chris/dev/NewSeat/document-dashboard/amplify/backend/api/documentdashboard/schema
⠋ Building video resources...🛑 Cannot read properties of undefined (reading 'dev')

Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Expected behavior

I'm not entirely sure what to expect, since this was the first time running this command, but I would expect it to not throw an error.

Reproduction steps

I'm not sure if I can provide exact recreation steps. But here's the options I chose while running the amplify video add command:

$ amplify video add
? Select from one of the below mentioned services: Video-On-Demand
? Provide a friendly name for your resource to be used as a label for this category in the project: videoService
? Select a system-provided encoding template, specify an already-created template name:  Default HLS+DASH Adaptive
Bitrate
? Do you want to get notifications on the video processing job? Yes
? Do you want a custom function executed for notifications? Yes
? Is this a production enviroment? Yes
? Do you want to protect your content with signed urls? No
? Do you want Amplify to create a new GraphQL API to manage your videos? (Beta) Yes
Using documentdashboard to manage API
? Define your permission schema Admins can only upload videos, Any authenticated user can upload videos
? Do you want to override your GraphQL schema? No
? Do you want to edit your newly created model? Yes

Many other options error out in various other ways.

Project Identifier

539310869d8d79b77347095522f128be

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@SalmonMode SalmonMode added the pending-triage Issue is pending triage label Jan 3, 2024
@armenr
Copy link

armenr commented Jan 4, 2024

@SalmonMode - I'm not a member of the Amplify team, but I am chiming in because I've closely worked on the video plugin with its original maintainer a while back.

That plugin/repo is archived...I wouldn't recommend using it. Your best bet might be to fork it, and try to update it.

If you'd like, we can collaborate on that together...but just so you're not stuck here waiting for a response (or with the hope that there's an easy fix coming), I wanted to warn you that it's a deprecated/unsupported/archived plugin.

With that being said, a LOT of good work had gone into the plugin, and my personal belief is that it's not worth abandoning.

@ykethan
Copy link
Member

ykethan commented Jan 4, 2024

Hey @SalmonMode, thank you for reaching out. This appears to be a duplicate of #11112, and amplify-video is a third party plugin which is currently deprecated as mentioned by @armenr. Please see #11112 (comment) for a more detailed explanation.
@armenr thank you for chiming into this.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2024
Copy link

github-actions bot commented Jan 4, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@SalmonMode
Copy link
Author

@armenr @ykethan ah, thanks for letting me know.

@armenr Gotcha. I was luckily able to find @aws-solutions-constructs/aws-cloudfront-s3 so I was able to get something up and running by adding a custom resource. I'll still need to hook up some transcoding stuff and manage my upload flow, but I think I have what I need. I appreciate the offer to collaborate, though!

@armenr
Copy link

armenr commented Jan 5, 2024

@SalmonMode - no problem! :)

I suspect that the gen2 incarnation of Amplify should make it easy to write a custom construct and plug it right in, even more easily than the current-gen CDK custom resource setup (although that's been improved a ton, as well).

Happy coding, friend.

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

No branches or pull requests

3 participants