mojodna / heroku-buildpack-cairo

Heroku buildpack with Cairo (and Pixman and FreeType)
34 stars 63 forks source link

Issues with update made on 4/17/2015 #9

Closed staceymoore closed 8 years ago

staceymoore commented 9 years ago

Hi @mojodna , just wanted to give you a head's up... I just spent the last three hours trying to figure out why my site's layout was suddenly broken when I only made some minor js changes that had nothing to do with layout. I finally isolated the problem to the latest updates in this buildpack. I forked heroku-buildpack-cairo, rolled it back to before the pull request three hours ago, set my rolled back fork as the buildpack for heroku to use, and now everything in my app works fine again. Thought I would post here in case anyone else has trouble. Aside from these recent changes, this has been a great addition to my multipack app. Thanks!

mojodna commented 9 years ago

Aie, sorry about that.

Can you characterize the issues you're seeing?

Are you using the cedar-10 or cedar-14 stack? (heroku stack will tell you)

What other buildpack(s) are you using it with?

I can tag the version you're using so people can refer to that directly. In fact, I'll probably do that in the morning and add a note to both the docs and the build output.

mojodna commented 9 years ago

Assuming you're using node-canvas, did you happen to notice it recompile on the deploy that broke? I'm wondering if it might be a caching issue where the module cache needs to be cleared since the dependency versions changed...

staceymoore commented 9 years ago

Thanks for the quick response.

The issue was with layout...everything that was supposed to be centered was moved over to the left as if the right 1/3 of the viewport was missing. Very strange. When I reverted all the changes in my code and it was still happening I looked at the heroku build logs. The only thing different was from the cairo pack, so that's when I tried reverting and confirmed the issue.

I am using cedar-14 and the only other pack is the standard heroku nodejs pack. I am just running express to serve up a static backbone app. I needed cairo for my automatic spritesheet generator. I am using brunch as the build tool for the static site.

Here's a screenshot that shows how I identified the changes. screenshot 2015-04-17 22 22 07

staceymoore commented 9 years ago

There were no errors in the build log...everything was exactly the same as the previous build except for the version changes and and new files in the cairo buildpack.

mojodna commented 9 years ago

@staceymoore this definitely sounds like a nodejs module caching problem. I added a warning to the compile output:

NOTE: if you are experiencing problems, they may be resulting from a cached
library referencing and older version of Cairo. To bypass this with the nodejs
buildpack, set NODE_MODULES_CACHE=false to force node-canvas to be rebuilt
against newer versions of the libraries.

I also tagged the older version (the one you forked) as v1.1.0 and the newer version as v1.2.0.

Since you have a reproduction of this issue, would you mind testing out the new version again after running heroku config:set NODE_MODULES_CACHE=false? This will trigger rebuilding node-canvas similar to the way upgrading your node version would.

After you've tested and have a working build (using either the new or old libraries), re-enable caching with heroku config:unset NODE_MODULES_CACHE.

Thanks!!

staceymoore commented 9 years ago

Thanks @mojodna , I will test tonight and report back with results.

mojodna commented 9 years ago

@staceymoore did you have a chance to see if that helped?

staceymoore commented 9 years ago

@mojodna , I am so sorry I haven't been able to test it yet. I have been working crazy long hours 7 days a week for an upcoming launch. I promise I will get to it as soon as I can and will report back. In the meantime, anyone who has an issue can use my fork of the buildpack as a temporary fix.

mojodna commented 9 years ago

No problem. Just ran back across this. Thanks for hosting the (hopefully) temporary version!