Closed Astriel closed 7 months ago
Hey @Astriel. We also use Forge to deploy some of our projects. Actually our demo is deployed on forge https://demo.backpackforlaravel.com
Can you check if you have the file there at all ? Or is it trying to read a non existent file ?
Is phar
support enable there ? Can you ran commands like composer
?
Cheers
Hey @pxpm !
I've got it deloyed on many forge servers, but never had this error. The file is indeed existing :
I can run composer commands indeed, I did a composer dump-autoload.
Sounds like phar can not be executed in this folder. But it sounds like it's existing on the server
Sounds like a permission issue.
Can you check if the permissions match the same permissions of the same file in other project ?
Shouldn't the file be inside the basset
folder ?
Maybe php artisan basset:clear && php artisan basset:cache
could solve this ?
I already did this, every command seems to work fine, but still the same problem. Should I maybe delete the tar file ?
No indeed about the permission, most of the time it's a 775 with forge user, but for this specific file :
-rw-r--r-- 1 root root 1347113 Oct 11 11:14 source-sans-3.052R.tar.gz
I've tried to put a 755 permission, also a 775, for root and or forge user ... But still facing the same problem.
Hello @pxpm any feedback ? Could you check on our of your environment the permission on the file ? I also tried to do a composer update, and then switching to the core-uiv4 but still the same problem (even if this file is only used for the core-uiv2).
Hey @pxpm ! Still pinging to have a feedback / an info. Still bugging on my side.
I am sorry @Astriel I was hopping someone would face the same issue.
I was not able to reproduce it, and nobody yet reported the same.
Our demo is hosted with forge too, in a digital ocean droplet.
Can you try using a completely different disk for basset like I suggested in this reply: https://github.com/Laravel-Backpack/basset/issues/104#issuecomment-1820677638
Let me know if that helps.
got exact same error. tried php artisan basset:clear && php artisan basset:cache - not helped. tried set project permission from scratch - no effect
I still need to try the disk changing method. I managed to put a chmod 755 on the file with the root user and after few days it seems to work, but after that got also some problem with basset which was not able to write on other folders such as gravatar for example etc ... Will try to keep you updated.
We are seeing this on a project that was just upgraded to L10/Backpack 6.3/pro 2.0.18. It is almost certainly a permissions issue, but I also find it a bit surprising that a package would ever assume it has write access to 'vendor'. Chmoding the 'resources' folder to 777 got us past the first issue, but then we also received an error about not being able to create a directory in storage/app/public/basset.
On the second issue, the problem is this. When we deploy, artisan is running as the "app" user, not www-data. So running 'artisan basset:cache' results in files being created in storage/app/public/basset that are owned by app:app rather than 'www-data:app'.
This begs a bigger question about which user artisan should run as on deployments or indeed what queue workers should run as --- ala the discussion at https://stackoverflow.com/questions/59196317/laravel-file-permission-incompatibility-between-user-running-the-jobs-and-the-we -- but this comes full circle back to, it is almost certainly a permissions issue.
A difficult one in a sense, because who is ever going to remember to sudo run 'artisan' as www-data to avoid the issue?
This has been plaguing us for awhile now and I finally spent some time figuring out a work around (besides making vendor/backpack/theme-coreuiv2/resources/assets/fonts writable by our web server).
If we run this command, it resolves the issue:
./artisan tinker --execute="Basset::bassetArchive(base_path('vendor/backpack/theme-coreuiv2/resources/assets/fonts/source-sans-3.052R.tar.gz'), 'source-sans-pro');"
I think something needs to change in BassetManager::bassetArchive such that it does the work in a directory that is expected to be writable by the web server -- for example copy source-sans-3.052R.tar.gz to somewhere in storage
first.
Hey @tjarrett @tibbsa @Astriel @vdomah
This was automatically closed by automation. Sorry guys.
So, I've just pushed some code that will move the file to the storage before attempting to extract it. Do you think this will be enough to solve the issues your reported with the .tar file ?
Can any of you pull basset 1.2.3 and test if it works now on your side ?
Cheers
I'm assuming it is solved and closing it Due to no activity.
Re-open if the issue persists.
Hello,
on fresh install i had this issues:
cURL error 28: Operation timed out after 10001 milliseconds with 0 out of 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://github.com/jquery/jquery-ui/archive/refs/tags/1.13.2.tar.gz
cURL error 28: Operation timed out after 10001 milliseconds with 0 out of 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://github.com/Studio-42/elFinder/archive/refs/tags/2.1.62.tar.gz
the solution given by @tjarrett solved the problem
Bug report
What I did
I've deployed a new version of my project into production.
What I expected to happen
To be able to login on Backack.
What happened
I've got the following error when trying to go the Backpack login screen :
unable to open new phar "/home/forge/default/vendor/backpack/theme-coreuiv2/resources/assets/fonts/source-sans-3.052R.tar" for writing
What I've already tried to fix it
Changing the chmod for boostrap/cache and storage.
Context to replicate the bug - Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:Project is deployed on Laravel Forge, using PHP 8.2.