snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Server Error: Unauthorized.

Open Jannik2017 opened this issue 6 years ago • 10 comments

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

Describe the bug Server Error: Unauthorized. is displayed if i want to Save Assets or Licenses

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Settings'
  2. Click on 'Locations'
  3. Click on 'Main Categorie'
  4. Click on 'New'
  5. Click on 'Save'
  6. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • Snipe-IT Versionv5.0.6 build 5526 (g8a7cd8764)
  • OS: Suse Leap 15.1
  • Web Server: Apache
  • PHP Version 7.2

Desktop (please complete the following information):

  • OS: Windows 7/10
  • Browser chrome and firefox

Additional context -fresh install

  • manual installation

My Problem is that i cant create Assets Licenses or Locations if i want to proceed with save aafter Entering the details Snipe it gets a Server Error: Unauthorized. like on the Screenshot below i tried to upgrade Snipeit via upgrade.php but this have no effect on the Problem

Bildschirmfoto_2020-11-25_08-47-47

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

Jannik2017 avatar Nov 25 '20 15:11 Jannik2017

Bildschirmfoto_2020-11-25_17-10-30

Jannik2017 avatar Nov 25 '20 16:11 Jannik2017

i guess that must be a database connection error because if i create a user it says in users

No matching records found

the Users are in the Database but SnipeIT cant reach because the connection failture the function not know that the user admin is real Bildschirmfoto_2020-11-25_17-27-26

Jannik2017 avatar Nov 25 '20 16:11 Jannik2017

It's not a database connection issue.

As I mentioned in the other issue, you need to tell me what you've tried, specifically:

https://snipe-it.readme.io/docs/installation-issues#table-listing-pages-load-with-401-unauthorizedunauthenticated https://snipe-it.readme.io/docs/common-issues#quick-tip-handy-commands

And post the output of the commands mentioned in both of those links.

You can then try a git pull and try running php upgrade.php again.

Also please state the version of Snipe-IT you're using.

Snipe-IT Documentation
Common installation/upgrading issues and solutions
Snipe-IT Documentation
These commands should be run from your Snipe-IT project root, just like every other cli command we mention. They should not need to be run as root/sudo/admin.These commands clear out cached service files that help speed up modern PHP applications but can also very occasionally be out of date, resu...

snipe avatar Nov 25 '20 17:11 snipe

Snipe-IT Versionv5.0.6 build 5526 (g8a7cd8764) The linked articles unfortunately do not fit to the problem

Jannik2017 avatar Nov 25 '20 17:11 Jannik2017

Please explain what you actually did, and what the output of those commands each were. The linked articles have resolved just about every example of "Unauthorized". If there's something else happening, seeing your output could be helpful

snipe avatar Nov 25 '20 18:11 snipe

which output should i have to display ? i dont use LDAP or Slack Settings

Jannik2017 avatar Nov 25 '20 21:11 Jannik2017

composer clear-compiled Wenn 'composer' kein Tippfehler ist, können Sie command-not-found benutzen, um das Paket zu finden, das den Befehl enthält, z. B.: cnf composer php artisan config:clear san view:clear php artisan cache:clear php artisan route:clearConfiguration cache cleared! php artisan view:clear Compiled views cleared! php artisan cache:clear Application cache cleared!

Jannik2017 avatar Nov 26 '20 15:11 Jannik2017

I don’t speak German, but that output looks okay to me. Did you delete the bootstrap caches as recommended?

What’s the output of php -m?

snipe avatar Nov 26 '20 16:11 snipe

jannik@Jannik:~> php -m [PHP Modules] bcmath Core ctype curl date dom fileinfo filter gd hash iconv imagick json ldap libxml mbstring mysqli mysqlnd openssl pcre PDO pdo_mysql pdo_sqlite Phar posix Reflection session SimpleXML SPL sqlite3 standard tokenizer xml xmlreader xmlrpc xmlwriter zip zlib

[Zend Modules]

Jannik2017 avatar Nov 26 '20 17:11 Jannik2017

Hi everyone,

Any resolution on this issue? I have absolutely the same issue.

Thanks

slaviknowsbest avatar Jan 09 '21 23:01 slaviknowsbest