-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
"500 Server Error" when creating or editing any asset models #11203
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
@uberbrady is this just a permissions problem, or is it something funny with LW? |
|
@DSenger1789 you can just hit the "subscribe" button on the right-hand side of an issue. |
fixed the issue by doing chmod 755 on /var/www/html/snipeit/bootstrap/cache |
Same issue, but Same 500 | Server Error when going to an asset and going to Actions --> Edit Model. I am however able to make a new model when creating a new Asset. |
We'd need a stack trace from your error logs. |
https://flareapp.io/share/x7X6jqRm#F85
|
|
here is the output of ls -la for /var/www/html/snipeit/bootstrap directory. drwxr-xr-x 3 ituser www-data 4096 May 18 14:29 . ituser is the non root account used to run composer |
Do you have SELinux installed? |
No, I do not. |
Well, it's clearly a permissions issue tho - the system is telling you what's wrong. So either it's a weird owner/group problem, or SElinux is actually installed and being a butthole (which it does). |
Thanks @snipe I was able to get it working by doing chmod -R 777 on the cache folder. |
Our cache folder and files within are set to 755:
In testing, changing the cache folder and files to 777 does fix it, yet is this best practice? I did notice that after changing permissions and running php upgrade.php on our installation, it added the file livewire-components.php to our cache folder (which was not there previously). |
FYI: In our upgrade guide I also noted that we always adjust/correct the permissions as follows:
|
Got this working for us by doing the following:
Creating and editing models from the Asset Models blade now work again after applying these steps above. It would seem the livewire-components.php file must be present in the cache folder for it to work, I can't recall if it was present in versions v.5.x.x |
Thanks. This sorted out my issue of being unable to create or edit asset models. For anyone else's information, the cache folder in my instance was /var/www/html/snipeit/bootstrap/cache for those who like me are noobs to ubuntu. |
Debug mode
Describe the bug
Attempting to create or edit any models from the Asset Model blade, produces a "500 | Server Error" message.
Deleting an existing asset model functions correctly.
Creating a new asset model only works from within the Create Asset page.
Reproduction steps
Create a new Asset Model:
Edit an existing Asset Model:
Expected behavior
We expected that selecting the Create New icon in the Asset Models blade would allow us to create a new model, or selecting Update on an existing asset model would allow us to edit the asset model detail.
This expected behaviour had functioned correctly in versions prior to v.6.0.x
Screenshots
No response
Snipe-IT Version
6.0.2
Operating System
Ubuntu 20.04
Web Server
Apache
PHP Version
7.4.3
Operating System
Windows 10
Browser
Microsoft Edge
Version
101
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
This issue was noticed after we upgraded to version 6.0.0. Upgrading to version 6.0.1 then 6.0.2 did not make any difference.
The strange thing is that why we are unable to edit or create asset models from the Asset Model blade, we can still delete them and we can create a new model from within the Create Asset page.
The log mentions that The /var/www/html/snipeit/bootstrap/cache directory must be present and writable which is does exist and is writable by the web server user www-data
Previously (when we had version 5.4.x running), we had run the tasks to fix server permissions to fix another issue https://snipe-it.readme.io/docs/debugging-permissions
Applying these same steps now did not fix the issue for us.
The text was updated successfully, but these errors were encountered: