Note that there are some explanatory texts on larger screens.

plurals
  1. POSymfony assetic:dump runtime exception
    primarykey
    data
    text
    <p>I'm stepping into deploying my Symfony app using Capifony. When Capifony executes assetic:dump I get a runtime Exception.</p> <blockquote> <p>[RuntimeException]<br> Unable to write file {path}/releases/20130314071536/app/../web/js/.</p> </blockquote> <p>I tried executing the command manually and get the same Exception.<br> Then I tried the command using the --verbose parameter and realized that all files with a source path that has a dot in it where written without the file name, only the extension. The Exception comes up when hitting a file name with no extension (Makefile in this case) and trying to write the file "." (only a dot).</p> <p>On another domain on the same server I have the exactly same code but deployed manually. There I don't get this error. So it can't be a problem with PHP version. I also checked Assetic and Assetic-Bundle versions and they are the same.</p> <p>What could be the cause of assetic working different?</p> <p>EDIT:<br> I forgot to mention that it also works correctly on my development machine.</p> <p>EDIT 2:<br> It starts failing on file </p> <p>EDIT 3:<br> I just realized that it works fine for dev environment... but for --env=prod it gives the problem arises</p> <blockquote> <p>web/bundles/assets/assets/images/icons/aws.png</p> </blockquote> <p>a file I'm not using in any template</p> <p>Stacktrace from the error</p> <pre><code>Exception trace: () at /home/yanic.info/domains/pe.yanic.info/public_html/releases/20130318143912/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:249 Symfony\Bundle\AsseticBundle\Command\DumpCommand-&gt;doDump() at /home/yanic.info/domains/pe.yanic.info/public_html/releases/20130318143912/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:187 Symfony\Bundle\AsseticBundle\Command\DumpCommand-&gt;dumpAsset() at /home/yanic.info/domains/pe.yanic.info/public_html/releases/20130318143912/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:64 Symfony\Bundle\AsseticBundle\Command\DumpCommand-&gt;execute() at /home/yanic.info/domains/pe.yanic.info/public_html/releases/20130318143912/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:238 Symfony\Component\Console\Command\Command-&gt;run() at /home/yanic.info/domains/pe.yanic.info/public_html/releases/20130318143912/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192 Symfony\Component\Console\Application-&gt;doRun() at /home/yanic.info/domains/pe.yanic.info/public_html/releases/20130318143912/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:78 Symfony\Bundle\FrameworkBundle\Console\Application-&gt;doRun() at /home/yanic.info/domains/pe.yanic.info/public_html/releases/20130318143912/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:105 Symfony\Component\Console\Application-&gt;run() at /home/yanic.info/domains/pe.yanic.info/public_html/releases/20130318143912/app/console:33 </code></pre> <p>config.yml</p> <pre><code># Twig Configuration twig: debug: %kernel.debug% strict_variables: %kernel.debug% form: resources: [HomeBundle:Form:fields.html.twig] # Assetic Configuration assetic: write_to: "%kernel.root_dir%/../web" debug: %kernel.debug% use_controller: false bundles: ['YanicSecurityBundle','HomeBundle','UsersBundle','CmsBundle','AssetsBundle','FormBundle','TranslationBundle','EventBundle','ShopBundle','NewsletterBundle','IssueBundle','ProjectBundle'] filters: cssrewrite: ~ </code></pre> <p>EDIT 4:<br> When searching for aws.png (the first result to be broken) there are 2 results inside the cache files:</p> <pre><code>/Applications/MAMP/htdocs/symfony-standard-2.1/app/cache/dev/appDevUrlGenerator.php: 112 '_assetic_e4d7f8d' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; 'e4d7f8d', 'pos' =&gt; NULL, '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/assets/images/icons/arrow_rotate_clockwise.png', ), ),), 113 '_assetic_e4d7f8d_0' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; 'e4d7f8d', 'pos' =&gt; '0', '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/assets/images/icons/arrow_rotate_clockwise_arrow_rotate_clockwise_1.png', ), ),), 114: '_assetic_e1ec2e3' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; 'e1ec2e3', 'pos' =&gt; NULL, '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/assets/images/icons/aws.png', ), ),), 115 '_assetic_e1ec2e3_0' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; 'e1ec2e3', 'pos' =&gt; '0', '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/assets/images/icons/aws_aws_1.png', ), ),), 116 '_assetic_490c282' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; '490c282', 'pos' =&gt; NULL, '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/assets/images/icons/cancel.png', ), ),), ... 874 '_assetic_13192a1' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; '13192a1', 'pos' =&gt; NULL, '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/images/icons/arrow_rotate_clockwise.png', ), ),), 875 '_assetic_13192a1_0' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; '13192a1', 'pos' =&gt; '0', '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/images/icons/arrow_rotate_clockwise_arrow_rotate_clockwise_1.png', ), ),), 876: '_assetic_3d6d4c9' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; '3d6d4c9', 'pos' =&gt; NULL, '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/images/icons/aws.png', ), ),), 877 '_assetic_3d6d4c9_0' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; '3d6d4c9', 'pos' =&gt; '0', '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/images/icons/aws_aws_1.png', ), ),), 878 '_assetic_5ea17b1' =&gt; array ( 0 =&gt; array ( ), 1 =&gt; array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; '5ea17b1', 'pos' =&gt; NULL, '_format' =&gt; 'png', ), 2 =&gt; array ( ), 3 =&gt; array ( 0 =&gt; array ( 0 =&gt; 'text', 1 =&gt; '/js/images/icons/cancel.png', ), ),), /Applications/MAMP/htdocs/symfony-standard-2.1/app/cache/dev/appDevUrlMatcher.php: 517 518 // _assetic_e1ec2e3 519: if ($pathinfo === '/js/assets/images/icons/aws.png') { 520 return array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; 'e1ec2e3', 'pos' =&gt; NULL, '_format' =&gt; 'png', '_route' =&gt; '_assetic_e1ec2e3',); 521 } ... 4327 4328 // _assetic_3d6d4c9 4329: if ($pathinfo === '/js/images/icons/aws.png') { 4330 return array ( '_controller' =&gt; 'assetic.controller:render', 'name' =&gt; '3d6d4c9', 'pos' =&gt; NULL, '_format' =&gt; 'png', '_route' =&gt; '_assetic_3d6d4c9',); 4331 </code></pre> <p>EDIT 5:<br> As recommended by @cheesemacfly I removed the hearsay_require_js bundle and the issue is gone. Now that I know what to blame for the error, I'd need to know why it does only happen on the staging server and when deploying with Capifony.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload