# GrapeJS not working after fresh install

**URL:** <https://forum.mautic.org/t/grapejs-not-working-after-fresh-install/32534>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [June 25, 2024, 9:27am UTC](https://forum.mautic.org/t/grapejs-not-working-after-fresh-install/32534 "2024-06-25T09:27:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![savrat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savrat/32/14293_2.png) [@savrat](https://forum.mautic.org/u/savrat)\
**Post date:** [June 25, 2024, 9:27am UTC](https://forum.mautic.org/t/grapejs-not-working-after-fresh-install/32534/1 "2024-06-25T09:27:16Z")

</div>

Mautic version: 4.4.12  
My PHP version is : 7.4  
My MySQL version is 8.0.37

I have similar issue as in this topic: [Landing Page Builder in 4.1.1 not working](https://forum.mautic.org/t/landing-page-builder-in-4-1-1-not-working/22170)  
when i try to create email with theme in Grape JS builder, it is blank - no matter if its custom theme or built-in

 ![Zrzut ekranu 2024-06-25 o 11.25.11](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/15cde0168a7da73b20a97c7cabe99461869a6630.png)

I installed Mautic yesterday on cpanel  
this is example log i get after opening Builder:  
mautic.CRITICAL: Uncaught PHP Exception RuntimeException: “Unable to create the cache directory (/home/…/public\_html/mautic.com/app/…/var/tmp/twig/98).” at /home/…/public\_html/mautic.com/vendor/twig/twig/src/Cache/FilesystemCache.php line 53 {“exception”:“[object] (RuntimeException(code: 0): Unable to create the cache directory (/home/…/public\_html/mautic.com/app/…/var/tmp/twig/98). at /home/…/public\_html/mautic.com/vendor/twig/twig/src/Cache/FilesystemCache.php:53)”} {“hostname”:“[my-cpanel.com](http://my-cpanel.com)”,“pid”:66650}  
i get few errors like this every time, only number at the end of ‘var/tmp/twig/98’ and pid change

i tried clearing cache but it only made /var/tmp/twig/ empty and logs changed from “Unable to write in the cache directory” to "Unable to create the cache directory "  
also i ran php bin/console mautic:assets:generate --env=prod, but it didnt resolve the issue either

is there anything I can do, or must I update Mautic to 5.x and try MJML builder?

---

<div class="post-metadata">

**Author:** ![savrat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savrat/32/14293_2.png) [@savrat](https://forum.mautic.org/u/savrat)\
**Post date:** [June 25, 2024, 12:33pm UTC](https://forum.mautic.org/t/grapejs-not-working-after-fresh-install/32534/2 "2024-06-25T12:33:08Z")

</div>

and before question will appear: yes, i have grapejs enabled.  
also, now i know that what is appearing is legacy builder, but as it can be seen, it does not work properly either

---

<div class="post-metadata">

**Author:** ![savrat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savrat/32/14293_2.png) [@savrat](https://forum.mautic.org/u/savrat)\
**Post date:** [June 28, 2024, 12:34pm UTC](https://forum.mautic.org/t/grapejs-not-working-after-fresh-install/32534/3 "2024-06-28T12:34:14Z")

</div>

Guys, I have solution  
Today log was:  
[2024-06-28 14:17:03] mautic.WARNING: PHP Warning - file\_put\_contents(/home/user/public\_html/mautic.com/var/cache/prod/lastUpdateCheck.txt): failed to open stream: Permission denied - in file /home/user/public\_html/mautic.com/app/bundles/CoreBundle/Helper/UpdateHelper.php - at line 195 {“overrideCache”:false,“cacheFile”:“/home/user/public\_html/mautic.com/var/cache/prod/lastUpdateCheck.txt”,“updateStability”:“stable”,“exception”:“[object] (Mautic\CoreBundle\Helper\Update\Exception\UpdateCacheDataNeedsToBeRefreshedException(code: 0): at /home/user/public\_html/mautic.com/app/bundles/CoreBundle/Helper/UpdateHelper.php:315)”,“release”:“[object] (Mautic\CoreBundle\Helper\Update\Github\Release: {})”,“data”:{“error”:false,“message”:“mautic.core.updater.update.available”,“version”:“5.1.0”,“announcement”:“[https://github.com/mautic/mautic/releases/tag/5.1.0",“package”:“https://github.com/mautic/mautic/releases/download/5.1.0/5.1.0-update.zip”,“stability”:“stable”,“checkedTime”:1719577023,“metadata”:"[object]](https://github.com/mautic/mautic/releases/tag/5.1.0%22,%22package%22:%22https://github.com/mautic/mautic/releases/download/5.1.0/5.1.0-update.zip%22,%22stability%22:%22stable%22,%22checkedTime%22:1719577023,%22metadata%22:%22%5Bobject%5D) (Mautic\CoreBundle\Release\Metadata: {"version":"5.1.0","stability":"stable","minimum\_php\_version":"8.0.2","maximum\_php\_version":"8.2.99","show\_php\_version\_warning\_if\_under":"8.0.2","minimum\_mautic\_version":"4.4.10","announcement\_url":"[https://github.com/mautic/mautic/releases/tag/5.1.0\“,\“minimum\_mysql\_version\”:\“5.7.14\”,\“minimum\_mariadb\_version\”:\“10.2.7\”})”](https://github.com/mautic/mautic/releases/tag/5.1.0%5C%22,%5C%22minimum_mysql_version%5C%22:%5C%225.7.14%5C%22,%5C%22minimum_mariadb_version%5C%22:%5C%2210.2.7%5C%22%7D)%22)}} {“hostname”:“my-cpanel”,“pid”:596344} [2024-06-28 14:17:04] mautic.CRITICAL: Uncaught PHP Exception RuntimeException: “Unable to write in the cache directory (/home/user/public\_html/mautic.com/app/…/var/tmp/twig/18).” at /home/user/public\_html/mautic.com/vendor/twig/twig/src/Cache/FilesystemCache.php line 57 {“exception”:”[object] (RuntimeException(code: 0): Unable to write in the cache directory (/home/user/public\_html/mautic.com/app/…/var/tmp/twig/18). at /home/user/public\_html/mautic.com/vendor/twig/twig/src/Cache/FilesystemCache.php:57)“} {“hostname”:“my-cpanel”,“pid”:596380} [2024-06-28 14:17:09] mautic.CRITICAL: Uncaught PHP Exception RuntimeException: “Unable to write in the cache directory (/home/user/public\_html/mautic.com/app/…/var/tmp/twig/ad).” at /home/user/public\_html/mautic.com/vendor/twig/twig/src/Cache/FilesystemCache.php line 57 {“exception”:”[object] (RuntimeException(code: 0): Unable to write in the cache directory (/home/user/public\_html/mautic.com/app/…/var/tmp/twig/ad). at /home/user/public\_html/mautic.com/vendor/twig/twig/src/Cache/FilesystemCache.php:57)“} {“hostname”:“my-cpanel”,“pid”:596344} [2024-06-28 14:17:10] mautic.CRITICAL: Uncaught PHP Exception RuntimeException: “Unable to write in the cache directory (/home/user/public\_html/mautic.com/app/…/var/tmp/twig/18).” at /home/user/public\_html/mautic.com/vendor/twig/twig/src/Cache/FilesystemCache.php line 57 {“exception”:”[object] (RuntimeException(code: 0): Unable to write in the cache directory (/home/user/public\_html/mautic.com/app/…/var/tmp/twig/18). at /home/user/public\_html/mautic.com/vendor/twig/twig/src/Cache/FilesystemCache.php:57)“} {“hostname”:“my-cpanel”,“pid”:596380} [2024-06-28 14:17:14] mautic.WARNING: PHP Warning - file\_put\_contents(/home/user/public\_html/mautic.com/var/cache/prod/lastUpdateCheck.txt): failed to open stream: Permission denied - in file /home/user/public\_html/mautic.com/app/bundles/CoreBundle/Helper/UpdateHelper.php - at line 195 {“overrideCache”:false,“cacheFile”:”/home/user/public\_html/mautic.com/var/cache/prod/lastUpdateCheck.txt",“updateStability”:“stable”,“exception”:“[object] (Mautic\CoreBundle\Helper\Update\Exception\UpdateCacheDataNeedsToBeRefreshedException(code: 0): at /home/user/public\_html/mautic.com/app/bundles/CoreBundle/Helper/UpdateHelper.php:315)”,“release”:“[object] (Mautic\CoreBundle\Helper\Update\Github\Release: {})”,“data”:{“error”:false,“message”:“mautic.core.updater.update.available”,“version”:“5.1.0”,“announcement”:"[https://github.com/mautic/mautic/releases/tag/5.1.0",“package”:“https://github.com/mautic/mautic/releases/download/5.1.0/5.1.0-update.zip”,“stability”:“stable”,“checkedTime”:1719577034,“metadata”:"[object]](https://github.com/mautic/mautic/releases/tag/5.1.0%22,%22package%22:%22https://github.com/mautic/mautic/releases/download/5.1.0/5.1.0-update.zip%22,%22stability%22:%22stable%22,%22checkedTime%22:1719577034,%22metadata%22:%22%5Bobject%5D) (Mautic\CoreBundle\Release\Metadata: {"version":"5.1.0","stability":"stable","minimum\_php\_version":"8.0.2","maximum\_php\_version":"8.2.99","show\_php\_version\_warning\_if\_under":"8.0.2","minimum\_mautic\_version":"4.4.10","announcement\_url":"[https://github.com/mautic/mautic/releases/tag/5.1.0\“,\“minimum\_mysql\_version\”:\“5.7.14\”,\“minimum\_mariadb\_version\”:\“10.2.7\”})”](https://github.com/mautic/mautic/releases/tag/5.1.0%5C%22,%5C%22minimum_mysql_version%5C%22:%5C%225.7.14%5C%22,%5C%22minimum_mariadb_version%5C%22:%5C%2210.2.7%5C%22%7D)%22)}} {“hostname”:“my-cpanel”,“pid”:596344}

**what i did next was changing permissions:**  
**sudo chown -R www-data:www-data path/to/mautic**  
**sudo chmod -R 775 path/to/mautic/var/cache**  
**sudo chmod -R 775 path/to/mautic/var/tmp**

and my grape js now works fine  
topic is ready to be closed 🙂

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [June 28, 2024, 1:33pm UTC](https://forum.mautic.org/t/grapejs-not-working-after-fresh-install/32534/4 "2024-06-28T13:33:53Z")

</div>

Thanks for reporting back the solution!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [June 30, 2024, 1:34am UTC](https://forum.mautic.org/t/grapejs-not-working-after-fresh-install/32534/5 "2024-06-30T01:34:06Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
