Shopify CLI React/Rails app - UI not rendering in production

Solved
shreyass
Shopify Partner
8 1 2

Hi there,

 

I've been trying to deploy the default shopify rails+react app generated via shopify cli

 

Deployment is successful but the UI doesn't get rendered. I get a blank screen with the message "This app does not appear to be loading and may be outdated. Try reloading the app in the legacy admin or contact the app's developer to update the app."

 

shreyass_0-1675365968853.png

 

I tried running the Dockerfile locally and its the same issue. Don't see any errors in Rails logs as well.

 

Can anyone please help?

 

Thanks

Accepted Solution (1)
shreyass
Shopify Partner
8 1 2

This is an accepted solution.

Found the issue. 

 

I missed the RAILS_SERVE_STATIC_FILES flag as mentioned here. Not sure why it needs to be added explicitly, but it worked after I added it!

 

Thanks @hardik355 

View solution in original post

Replies 4 (4)
hardik355
Shopify Partner
233 22 33

Hello Shreyass

I think you need to update the app-bridge version and also update the content security policy. Here is the link please follow this Click here .  

If helpful then please Like and Accept Solution.
For App Development and Design changes Hire Me.
Skype: live:hardikradadiya355
Thanks
shreyass
Shopify Partner
8 1 2

Hey Hardik,

 

This is the boilerplate app I generated with latest Shopify CLI version. Can confirm it uses the latest app-bridge version as well.

 

Here's the tech stack

 

Shopify CLI v3.39.0
Rails v7.0.3
Node version v19.1.0
Shopify App Gem v21.4

 

This issue doesn't occur when I run the app in dev mode with "npm run dev". Issue is only with production

hardik355
Shopify Partner
233 22 33

Hello @shreyass 

I get the same issue in my local environment. when I disable third-party cookies in chrome then generates an issue. Maybe you can check in firefox and then generate issue.  

If helpful then please Like and Accept Solution.
For App Development and Design changes Hire Me.
Skype: live:hardikradadiya355
Thanks
shreyass
Shopify Partner
8 1 2

This is an accepted solution.

Found the issue. 

 

I missed the RAILS_SERVE_STATIC_FILES flag as mentioned here. Not sure why it needs to be added explicitly, but it worked after I added it!

 

Thanks @hardik355