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

Cache and cookie delete results in Error 500

Open MacCaloway opened this issue 7 years ago • 9 comments

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

Describe the bug

Hello,

We have Snipe IT hosted on our servers and we've encountered the problem that we saw nothing on "All Assets", so i cleared the cookies and cache like an old ticket here said so, but now we can't access to anything "500 Error, Whoops, something went wrong on our servers."

Can you help us please ? Thanks a lot !

Server (please complete the following information):

  • Snipe-IT Version 4.6.15
  • OS: Windows Server 2012
  • Web Server: IIS
  • PHP Version 7.3.4.0

MacCaloway avatar Apr 30 '19 10:04 MacCaloway

Hi, Maybe you can try the following.
Enable debug in the .env file located in the directory c:\inetpub\wwwroot\snipeit Change it to true.

image

Then log into your Snipe It software. In addition to seeing Whoops Something Went Wrong, you should see debugging information which will help provide additional information to troubleshoot the problem.

Post those results.

Good luck.

tamfadmin avatar May 01 '19 15:05 tamfadmin

Hi, Thanks a lot for your response.

Unfortunately i have nothing in the folder, image

I don't know what can i do .. Thank you

MacCaloway avatar May 14 '19 12:05 MacCaloway

@MacCaloway Hi, You may have installed snipeit to a different directory. Search for snipe on your c:\ and post a screenshot. Thanks, Cameshia

tamfadmin avatar May 14 '19 15:05 tamfadmin

Hello, I finally found it, here's what i got.

It seems that i got a log error but i don't know how to solve it :/

Do you need the environment and details report also ?

Thank you !

Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN) Cannot use Log as Log because the name is already in use

C:\inetpub\wwwroot\app\Http\Controllers\Auth\LoginController.php

<?php
 
namespace App\Http\Controllers\Auth;
 
use App\Http\Controllers\Controller;
use App\Models\Setting;
use App\Models\User;
use App\Services\LdapAd;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Validator;
use Redirect;
use Log;
use View;
use Otp\Otp;
use Otp\GoogleAuthenticator;
use ParagonIE\ConstantTime\Encoding;
 
/**
 * This controller handles authentication for the user, including local
 * database users and LDAP users.
 *
 * @author [A. Gianotto] [<[email protected]>]
 * @version    v1.0
 */
class LoginController extends Controller
{
 
    use ThrottlesLogins;
 
    // This tells the auth controller to use username instead of email address
    protected $username = 'username';
 
    /**
     * Where to redirect users after login / registration.

Arguments

"Cannot use Log as Log because the name is already in use"

MacCaloway avatar May 15 '19 10:05 MacCaloway

@MacCaloway Hi, I'm not familiar with the problem. This is what I found on the internet: Make sure you have a backup of your LoginController.php file.

Remove the "app/Http/Controllers" from your classmap. Add namespace App\Http\Controllers; above your use blocks. Then run composer dump-auto

Here's the link (this info is in the middle of the website): https://stackoverflow.com/questions/40406418/cannot-declare-class-controller-because-the-name-is-already-in-use

I hope this helps! Cameshia

Stack Overflow
I recently migrated a laravel 4.2 project to 5.0. So far I have completed all the necessary steps but I keep getting an error. Cannot declare class Controller, because the name is already in us...

tamfadmin avatar May 15 '19 17:05 tamfadmin

Try removing use Illuminate\Support\Facades\Log; from that file.

snipe avatar May 16 '19 01:05 snipe

Hi guys,

Removing "use Illuminate\Support\Facades\Log;" from the file "LoginController.php" worked perfectly !

Thanks you sooo much !!!!

MacCaloway avatar May 16 '19 06:05 MacCaloway

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!

stale[bot] avatar Jul 15 '19 07:07 stale[bot]

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.

stale[bot] avatar Jul 22 '19 08:07 stale[bot]