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

Assets fail to load #2973

Closed
malicioustoker opened this Issue May 10, 2017 · 16 comments

Comments

Projects
None yet
5 participants
@malicioustoker

malicioustoker commented May 10, 2017

Hello, having an issue with the master (go figure right 🤷🏼‍♂️). As of yesterday, (not sure what commit caused it), the website no longer displays the assets. There are no errors while building, or running assets:precompile, but no images load up on the website. Downgrading to 1.3.3 fixes the issue and loads the assets, but updating to master breaks the assets again. Running using Docker on MacOS.

@malicioustoker malicioustoker changed the title from Asset issue on Master to Assets fail to load May 11, 2017

@jbalsip

This comment has been minimized.

Show comment
Hide comment
@jbalsip

jbalsip May 11, 2017

I encountered this same problem, and while I haven't had an opportunity to get to a root cause it looks to me like there is an effort to change how assets are hosted. Bringing up the dev tools in a browser I can see the page attempt to download from localhost:8080, but I have no clue what needs to be done to get that working. Some updated documentation on how this impacts setup and configuration would be most helpful I think.

jbalsip commented May 11, 2017

I encountered this same problem, and while I haven't had an opportunity to get to a root cause it looks to me like there is an effort to change how assets are hosted. Bringing up the dev tools in a browser I can see the page attempt to download from localhost:8080, but I have no clue what needs to be done to get that working. Some updated documentation on how this impacts setup and configuration would be most helpful I think.

@jbalsip

This comment has been minimized.

Show comment
Hide comment
@jbalsip

jbalsip May 11, 2017

Did a little digging and found this PR which sheds a little light on the subject. Certainly a change with some impact.

#2617

jbalsip commented May 11, 2017

Did a little digging and found this PR which sheds a little light on the subject. Certainly a change with some impact.

#2617

@malicioustoker

This comment has been minimized.

Show comment
Hide comment
@malicioustoker

malicioustoker May 11, 2017

The problem I have with that theory is that was posted 10+ days ago. I update to EVERY new commit, and this issue didn't start until yesterday 09 May

malicioustoker commented May 11, 2017

The problem I have with that theory is that was posted 10+ days ago. I update to EVERY new commit, and this issue didn't start until yesterday 09 May

@jbalsip

This comment has been minimized.

Show comment
Hide comment
@jbalsip

jbalsip May 11, 2017

Ah yes, you're using Docker. Well there was #2949 which may have affect that, but I can't say as I know little of Docker. I'd also still recommend getting more information out of the browser as far as what status codes it is getting for the assets and what Url it is trying to access them through. Could be helpful for troubleshooting.

jbalsip commented May 11, 2017

Ah yes, you're using Docker. Well there was #2949 which may have affect that, but I can't say as I know little of Docker. I'd also still recommend getting more information out of the browser as far as what status codes it is getting for the assets and what Url it is trying to access them through. Could be helpful for troubleshooting.

@Gargron

This comment has been minimized.

Show comment
Hide comment
@Gargron

Gargron May 11, 2017

Member

Probably something related to #2901. Make sure nginx is actually serving your public directory?

Member

Gargron commented May 11, 2017

Probably something related to #2901. Make sure nginx is actually serving your public directory?

@malicioustoker

This comment has been minimized.

Show comment
Hide comment
@malicioustoker

malicioustoker May 11, 2017

I don't think #2901 is the issue, as when I was running that 3 days ago, it was working fine. There are no issues when it builds, so I can't really post an error log :-/ #2949 would make sense just because that's around the timeframe when it stopped loading the assets

malicioustoker commented May 11, 2017

I don't think #2901 is the issue, as when I was running that 3 days ago, it was working fine. There are no issues when it builds, so I can't really post an error log :-/ #2949 would make sense just because that's around the timeframe when it stopped loading the assets

@Gargron

This comment has been minimized.

Show comment
Hide comment
@Gargron

Gargron May 11, 2017

Member

Do you properly set the environment when building assets? RAILS_ENV=production?

Member

Gargron commented May 11, 2017

Do you properly set the environment when building assets? RAILS_ENV=production?

@malicioustoker

This comment has been minimized.

Show comment
Hide comment
@malicioustoker

malicioustoker May 11, 2017

I'm using Docker, isn't the only file I'm suppose to change is .env.production? I've been running Mastodon fine for about 3 weeks now :-/ it was only after a commit from May 9th that broke assets :-/.

malicioustoker commented May 11, 2017

I'm using Docker, isn't the only file I'm suppose to change is .env.production? I've been running Mastodon fine for about 3 weeks now :-/ it was only after a commit from May 9th that broke assets :-/.

@Gargron

This comment has been minimized.

Show comment
Hide comment
@Gargron

Gargron May 11, 2017

Member

The only commit that could've touched anything related to assets on May 9th was #2901 (ef226a6). Perhaps you can try reverting to before that, see if that fixes your problem, then we can know for sure?

Member

Gargron commented May 11, 2017

The only commit that could've touched anything related to assets on May 9th was #2901 (ef226a6). Perhaps you can try reverting to before that, see if that fixes your problem, then we can know for sure?

@malicioustoker

This comment has been minimized.

Show comment
Hide comment
@malicioustoker

malicioustoker May 11, 2017

Can do! Give me a few moments and I'll let you know 😊

malicioustoker commented May 11, 2017

Can do! Give me a few moments and I'll let you know 😊

@ykzts

This comment has been minimized.

Show comment
Hide comment
@ykzts

ykzts May 11, 2017

Collaborator

@malicioustoker What happens if you add RAILS_SERVE_STATIC_FILES=true to .env.production?

Collaborator

ykzts commented May 11, 2017

@malicioustoker What happens if you add RAILS_SERVE_STATIC_FILES=true to .env.production?

@malicioustoker

This comment has been minimized.

Show comment
Hide comment
@malicioustoker

malicioustoker May 11, 2017

@ykzts just add it to the top? Or any place specific?

malicioustoker commented May 11, 2017

@ykzts just add it to the top? Or any place specific?

@ykzts

This comment has been minimized.

Show comment
Hide comment
@ykzts

ykzts May 11, 2017

Collaborator

@malicioustoker There is no problem anywhere. The order is not evaluated. Please add it in the place you like.

Collaborator

ykzts commented May 11, 2017

@malicioustoker There is no problem anywhere. The order is not evaluated. Please add it in the place you like.

@Gargron

This comment has been minimized.

Show comment
Hide comment
@Gargron

Gargron May 11, 2017

Member

The interesting thing is that the nginx config I provided would serve static assets from the public directory. But I am now hearing for the 3rd time that people relied on Puma/Rails serving static assets. I am surprised.

Member

Gargron commented May 11, 2017

The interesting thing is that the nginx config I provided would serve static assets from the public directory. But I am now hearing for the 3rd time that people relied on Puma/Rails serving static assets. I am surprised.

@malicioustoker

This comment has been minimized.

Show comment
Hide comment
@malicioustoker

malicioustoker May 11, 2017

@ykzts your solution worked!!! Thank you so very much!!!!!!

malicioustoker commented May 11, 2017

@ykzts your solution worked!!! Thank you so very much!!!!!!

@Bashy

This comment has been minimized.

Show comment
Hide comment
@Bashy

Bashy May 12, 2017

Seems to be related to #2953
@Gargron The thing is it used to work in the past as is, then people did not look into it until it changed.

Bashy commented May 12, 2017

Seems to be related to #2953
@Gargron The thing is it used to work in the past as is, then people did not look into it until it changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment