Trying to create a new asset fails with The asset tag must be unique.
Please confirm you have done the following before posting your bug report:
- [x] I have enabled debug mode
- [x] I have read checked the Common Issues page
Describe the bug Trying to create a new asset on a fresh install fails with "The Asset Tag must be unique." Auto increment is enabled but it also fails with any Asset Tag i can think of. The asset table is afterwards empty. I checked. Debug mode does not throw any exceptions.
To Reproduce Steps to reproduce the behavior:
- Go to 'Create new'
- Click on 'Asset'
- Enter mandatory information. Anything. (I only created a new model so I can create an asset).
- See error
Expected behavior Asset is created
Screenshots Pretty self explanatory. But if wished for, I can provide one.
Server (please complete the following information):
- Snipe-IT Version: v4.9.2 build 4352 (gec723a3da)
- OS: CentOS 8
- Web Server: Apache
- PHP Version 7.2.11
Desktop (please complete the following information):
- OS: Ubuntu 18.04
- Browser Firefox, Chromium
- Version 75, 80.0.3987.163
Smartphone (please complete the following information): Not tried on smartphone
Error Messages
- Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
As a matter of fact, it is reproducible! Recent Bug maybe?
Additional context
- Is this a fresh install or an upgrade?: Fresh install
- What OS and web server you're running Snipe-IT on : Centos 8, with Apache
- What method you used to install Snipe-IT: manual installation, pulled from Git
- Include what you've done so far in the installation, and if you got any error messages along the way: Not much. Fresh install
- Indicate whether or not you've manually edited any data directly in the database: I have not
Add any other context about the problem here.
I don't have a solution for you but I'm seeing the same problem under nearly identical circumstances. I've got SnipeIT on Ubuntu Server 18.04 and have gotten the error in Firefox and Chrome in Windows 10 and Firefox on Android. Other than that, my answers would've been the exact same.
I have same issue under Ubuntu Server 18.04 , fresh install
I have the same issue with docker container (latest tag -4.9.2-). Then I tested creating a new asset in snipe-IT live demo and the problem exists there too. I installed v4.9.0 and everything is normal now.
Thanks for the tip @fozkan . For anyone else who also installed from git - this should work while we wait for the bug to get solved:
git checkout tags/v4.9.0
got this as well this morning
same problem. updated from 4.8.0 to 4.9.2
I also have same issue after upgrading to 4.9.2
Same issue here, updated from 4.9.0 to 4.9.2 on Centos 8 via git.
I have the same issue when I change the Status of an asset.
Error: "The asset tag must be unique."
v 4.9.2
If you go back to v4.9.0 this bug goes away by doing git checkout tags/v4.9.0
If you want to stay on v4.9.2 what I did was edit the /app/Http/Requests/AssetRequest.php file and comment out line 34:
//'asset_tag' => 'required|min:1|max:255|unique_undeleted',
I'm pretty sure this isn't the official fix but it works for me, for now, until a new release comes out.
cant add any assets until this is fixed... appreciate the eyes on this one it's a bit of a show stopper cheers,
cant add any assets until this is fixed... appreciate the eyes on this one it's a bit of a show stopper cheers,
I did another git pull via php upgrade.php that gave me a different build of 4.9.2 that fixed this issue.
thanks! just tried and all good. much apprecaited!
Thanks for the tip @fozkan . For anyone else who also installed from git - this should work while we wait for the bug to get solved:
git checkout tags/v4.9.0
@snipeit>git checkout -b tags/4.9.0 <<it's solved for me. T-T
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.