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

Running the UI locally does not work #44

Open
Laazarus opened this issue Oct 10, 2024 · 5 comments
Open

Running the UI locally does not work #44

Laazarus opened this issue Oct 10, 2024 · 5 comments

Comments

@Laazarus
Copy link

Hello,

Thanks so much for the help in configuring the workflow I can confirm that I am able to deploy everything.

When I try to run the UI locally though I am not able to execute it.

Running the command npm

npm i --legacy-peer-deps
and
npm start

results in the following.

`> [email protected] start

react-scripts start

Cannot find module 'ajv/dist/compile/codegen'
Require stack:

  • /home/nicola/projects/ac/aws-mre-original/aws-media-replay-engine/source/frontend/node_modules/ajv-keywords/dist/definitions/typeof.js
  • /home/nicola/projects/ac/aws-mre-original/aws-media-replay-engine/source/frontend/node_modules/ajv-keywords/dist/keywords/typeof.js
  • /home/nicola/projects/ac/aws-mre-original/aws-media-replay-engine/source/frontend/node_modules/ajv-keywords/dist/keywords/index.js
  • /home/nicola/projects/ac/aws-mre-original/aws-media-replay-engine/source/frontend/node_modules/ajv-keywords/dist/index.js
  • /home/nicola/projects/ac/aws-mre-original/aws-media-replay-engine/source/frontend/node_modules/schema-utils/dist/validate.js
  • /home/nicola/projects/ac/aws-mre-original/aws-media-replay-engine/source/frontend/node_modules/schema-utils/dist/index.js
  • /home/nicola/projects/ac/aws-mre-original/aws-media-replay-engine/source/frontend/node_modules/webpack-dev-server/lib/Server.js
  • /home/nicola/projects/ac/aws-mre-original/aws-media-replay-engine/source/frontend/node_modules/react-scripts/scripts/start.js`

I tried to install the packages using the --force command and in this case I am able to run the UI locally but I get a lot of errors in the console log and the message "A network Error has occurred" in the UI.

I configured the correct parameters in the .env file too.

I will try to deploy the front end too (even if I would like to avoid it) to see if I can run the UI in this way

Thanks again for the support

@Laazarus
Copy link
Author

Hello @aravindkaws ,

So using force fixes the problem, in order to make the UI work locally it is also needed to create the cognito user pool manually and the identity pool.

I did that but I forgot to assign enough permissions to the user that I created for the login of the application.

After doing so, the UI was able to retrieve the data :)

Thanks for your assistance and an amazing job once again

@araviraj-aws
Copy link
Contributor

@Laazarus : You are not required to manually create a Cognito user pool or identity pool for the UI access since MRE already creates them for you. You can find these exported as CloudFormation outputs under the mre-frontend-stack CloudFormation stack and you would need to reuse them in the .env file for running the UI locally. I'm resolving this issue for now but please reopen if you have any further questions!

@Laazarus
Copy link
Author

Hello @araviraj-aws ,

I was referring to when you decide to run the front end in local mode and therefore you run the deploy command with the option --disableui. In this case, the procedure did not create the cognito pool for us and we had to create it manually. I don't know if this will happen to anyone or if we did something wrong.
Another problem we are facing is the fact that we cannot find the S3 bucket that (we think) the framework should create to host the source of the videos that should start the process.
Does it need to be created manually? We have read all the documentation but there is no mention of it so I think probably the installation process should make it, we ran the installation process multiple times but we cannot find any bucket that could be used as a source bucket.

@araviraj-aws
Copy link
Contributor

Hi @Laazarus ! The --disable-ui option is to be used only when upgrading MRE and not for greenfield deployment (i.e., fresh install). Including this flag during a fresh install will make MRE skip creating all the UI related resources (including Cognito). Regarding your question on the S3 bucket to host source videos, the only relevant bucket that the solution creates is to store the HLS chunks streamed using something like MediaLive which will in-turn by used by MRE for processing (as MRE currently is based on HLS chunk processing). To host source videos owned by you (such as .MP4 videos), you have to create an S3 bucket outside MRE and for starters, configure a MediaLive channel using it for HLS streaming which can then be processed by MRE.

@araviraj-aws araviraj-aws reopened this Oct 21, 2024
@Laazarus
Copy link
Author

Thanks @araviraj-aws ,
Regarding the UI, this is exactly the effect we wanted. We did not want to create resources for the UI which we wanted to use it locally only to test the framework. As per the MediaLive service to kick-start the process we thought that the framework offered that as an option along with the S3 bucket one by reading the documentation and seeing the dropdown field in the creation of the event.

We will try to find a way to start the framework as this is still a problem for us.

Thanks so much for your help and your support and sorry if we asked so many questions.

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

No branches or pull requests

2 participants