snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.04k stars 3.18k forks source link

Unable to edit / check out or add new licenses #10027

Open jreesd opened 3 years ago

jreesd commented 3 years ago

Please confirm you have done the following before posting your bug report:

Describe the bug: I am unable to check out any existing licences that have been imported, nor am I able to add new licences - nothing happens when either "checkout" or "save".

This works fine on the demo system, unfortunately!!

To Reproduce:

  1. Go to Licences > new > fill out form and hit save
  2. Go to Licences > check out existing licence > assign to user or asset, hit checkout.

Expected behavior: I expect to be able to check out existing licences and then add / check out new ones.

Server: Snipe-IT Version:: v5.1.8 build 6227 (g6b7d5ed5a) OS: [e.g. Ubuntu, CentOS] Windows Server 2016 Standard Web Server: [e.g. Apache, IIS] Apache under XAMPP PHP Version: 7.4.22 Laravel Version: 6.20.29 mysql Ver 15.1 Distrib 10.4.20-MariaDB

Error Messages: None whatsoever, which is the most frustrating thing. There's no Laravel log entries, no exceptions in the console log, no entries in the Apache log file. Running SnipeIT in debug mode gives me nothing - it just doesn't work.

I also see no UPDATE SQL statements being run after I've made a change when in debug mode, only selects.

I've cleared the cache, tried three different web browsers (Firefox, Chrome and the hell that is IE11)

Additional context:

snipe commented 3 years ago

That's super weird, especially since it works on the demo, which is the same code that's on the master branch. I'm not exactly sure how we troubleshoot this.

jreesd commented 3 years ago

er branch. I'm not exactly sure how we troubleshoot this.

Nor here. Quite frustrating...I guess I'll end up moving to hosted :s

snipe commented 3 years ago

Quite frustrating...I guess I'll end up moving to hosted :s

Hm, that seems sub-optimal tho. :( When you try to checkout/checkin a license, exactly what happens? What does the screen say after you hit submit? Is there even a standard "red box" error or "green box" success message? When you say "nothing happens", do you mean the form doesn't even get submitted, or it gets submitted but the license never actually gets checked out?

Can you confirm that your permissions are set correctly for the storage directory and all subdirectories within storage? That could explain the lack of laravel.log, if it can't write to it.

jreesd commented 3 years ago

Quite frustrating...I guess I'll end up moving to hosted :s

Hm, that seems sub-optimal tho. :( When you try to checkout/checkin a license, exactly what happens? What does the screen say after you hit submit? Is there even a standard "red box" error or "green box" success message? When you say "nothing happens", do you mean the form doesn't even get submitted, or it gets submitted but the license never actually gets checked out?

Can you confirm that your permissions are set correctly for the storage directory and all subdirectories within storage? That could explain the lack of laravel.log, if it can't write to it.

Thanks for the reply. The form submits but no changes are made to the database and therefore the license doesn't check out, nor does any new licences show up as they aren't saved. The same goes for editing licences - I hit save and the form submits, but no changes are made.

The storage directory has everyone r+w on it, as well as SYSTEM, which is the account under which Apache is running (am on Windows). I can perform backups successfully which write to the storage folder just fine.

snipe commented 3 years ago

The form submits but no changes are made to the database and therefore the license doesn't check out, nor does any new licences show up as they aren't saved

That's super weird. Do you see any form feedback (green banner or red banner) on save?

I can perform backups successfully which write to the storage folder just fine.

Can you check the permissions on the storage/logs directory?

jreesd commented 3 years ago

Everyone has r+w on the logs folder, as well as the parent directory. I've also previously added domain users and ensured that SYSTEM also has full r+w over the entire top level folder containing the project, inherited downwards.

No, there's no banner at all. Upon hitting save the page just changes back to the main /licenses page.

snipe commented 3 years ago

Okay, try creating a laravel.log file in that logs directory and make sure it’s writable. (Might also want to do full blown 777 on that dir just for now, to rule any weird permissions issues out.)

jreesd commented 3 years ago

Okay, try creating a laravel.log file in that logs directory and make sure it’s writable. (Might also want to do full blown 777 on that dir just for now, to rule any weird permissions issues out.)

Thanks - just got back to this. Unfortunately it still won't work, but now I've actually bothered to look at the Apache error.log, it says...

[Wed Sep 22 08:58:18.238075 2021] [authz_core:error] [pid 18928:tid 1792] [client x.x.x.x] AH01630: client denied by server configuration: C:/xampp7/licenses/2, referer: http://snipeit.internaldomain.local/licenses/2/checkout

SnipeIT's local directly is actually c:\xampp7\assets\ rather than c:\xampp7\ so this looks to be an Apache issue...although not sure why it's only the licenses module that's trying to call the incorrect path.

I'll have a fiddle with it, unless you have any other ideas?

Many thanks!

DIZERINER commented 3 weeks ago

Hello Snipe When checking the console on hitting the checkout, clone item, update and delete button an error shows "Failed to launch 'licensemanager.com:80/licenses/4' because the scheme does not have a registered handler." I am currently facing this challenge as i can add an license but cant edit or delete it

snipe commented 3 weeks ago

@DIZERINER https://stackoverflow.com/questions/64797802/what-is-this-scheme-dont-have-a-registered-handler-error

Stack Overflow
what is this "scheme don't have a registered handler" error?
I am working on a node app. i have an ejs file , where on clicking a button a get request is made to this url localhost:3000/posts/business-economics but the page doesn't load up and this error is ...
DIZERINER commented 3 weeks ago

Thanks, i was able to resolve the issue. Now the buttons are functional