Vaadin deployment is failing on AWS beanstalk

My deployment isn’t successful with the below error:

"java.lang.RuntimeException: Unable to initialize com.vaadin.flow.spring.VaadinServletContextInitializer

Caused by: java.lang.IllegalStateException: Failed to determine project directory for dev mode. Directory ‘/var/app/current’ does not look like a Maven or Gradle project. Ensure that you have run the prepare-frontend Maven goal, which generates ‘flow-build-info.json’, prior to deploying your application

"

I can run the app on local without any issues. I’ve tried deploying the app in both ‘dev’ and ‘prod’ environments and both having same issue. Already tested by adding vaadin.servlet.productionMode=true in properties file.

I’m attaching the full logs for reference. Any suggestions would be really helpful.
web.stdout.log (3.57 MB)

did you build build the application for production=?

mvn package -Pproduction

@keen-quelea I looks like it runs in dev mode

@adaptable-uakari
Thank you for pointing it out. Let me check it further and revert back.

@adaptable-uakari
I followed your tips and deployment is successful.
But, the UI is taking forever time to load :frowning_with_open_mouth:
I don’t know if it has to do with inbound/outbound rules in AWS, but I already enabled all HTTP/HTTPS traffic , both inbound/outbound.
The application load just fine when tested (both dev/prod envs) from local.

Open the browser console and check for errors

I see this error. Looks like a vaadin error, but can’t confirm if this actually has any effect. Logo is not loading from beanstalk, but loading from local
unknown.png

    at Object.<anonymous> (vaadin-1-330b8b9e92ad567a6c9a.cache.js:5865:2009)
    at r (vaadin-bundle-e03eeb1da33e5d2832b8.cache.js:1:361)
    at 253 (vaadin-4-87f0786366e000b6a512.cache.js:1:4163)
    at r (vaadin-bundle-e03eeb1da33e5d2832b8.cache.js:1:361)
    at async Object.flowInit (vaadin-bundle-e03eeb1da33e5d2832b8.cache.js:64:33684)
    at async Object.action (vaadin-bundle-e03eeb1da33e5d2832b8.cache.js:64:32193)```

can you please also show what you see in the network tab?

Here is what I see when I load from beanstalk
beanstalk.jpg

Here is the screenshot for working condition (tested from local)
working.jpg

do you access a database?

no, just few public apis
home page just load the logo uri

I currently don’t have a BeansTalk app

And I don’t have time to reproduce the problem.

Maybe on Monday

no problem Simon
in the meantime, I will try to deploy it in digitalocean droplet
If it works, then it is an env/AWS specific issue
otherwise, we know it is a vaadin issue

@adaptable-uakari
Quick update:
I deployed the vaadin application to digitalocean droplet (another cloud service) successfully. But the same error there as well.
unknown.png