snipe / snipe-it

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

Server Error : Unauthorized #8458

Closed bakfiets2 closed 3 years ago

bakfiets2 commented 4 years ago

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

Describe the bug Fresh install of Snipe-It on a server Running Plesk Onyx. PHP Composer installs fine. Tried installing 4.8.0 and 4.8.5. Tried all PHP versions from 7 and up.

The thing is. If i want to add a Category. Lets say. In Licenses. The drop down menu tells me that the Results could not be loaded. If i try to add the category the window says: Server Error : Unauthorized

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Licenses -> Category drop down -> Then New -> Add'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Server (please complete the following information):

Desktop (please complete the following information):

Error Messages Version v4.9.4 - build 4437 (master) Snipe-IT is open source software, made with love by @snipeitapp. 7.4.10358ms4MB5.5.50productionnlGET api/v1/categories/{item_type}/selectlist

Unauthenticated./var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php#66Illuminate\Auth\AuthenticationException

            }
        }

        throw new AuthenticationException('Unauthenticated.', $guards);
    }
}

#0 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(41): Illuminate\Auth\Middleware\Authenticate->authenticate()
#1 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Auth\Middleware\Authenticate->handle()
#2 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#3 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#4 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\Pipeline\Pipeline->then()
#5 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRouteWithinStack()
#6 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\Routing\Router->runRoute()
#7 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(590): Illuminate\Routing\Router->dispatchToRoute()
#8 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Routing\Router->dispatch()
#9 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#10 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(65): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#11 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#12 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#13 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#14 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\SecurityHeaders->handle()
#15 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#16 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#17 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#18 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#19 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#20 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForDebug->handle()
#21 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#22 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/app/Http/Middleware/CheckForSetup.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#23 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForSetup->handle()
#24 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#26 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\Proxy\TrustProxies->handle()
#27 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#29 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#30 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#31 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#32 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle()
#33 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#34 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#35 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
#36 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#37 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/barryvdh/laravel-cors/src/HandlePreflight.php(29): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#38 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\Cors\HandlePreflight->handle()
#39 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#40 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}()
#41 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then()
#42 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#43 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/public/index.php(58): Illuminate\Foundation\Http\Kernel->handle()
#44 {main}
yosiasz commented 4 years ago

Same exact error for me as well

snipeit version: v4.9.5 - build 4482 (master)

OS: Windows Server 2019 Windows IIS Server: 10.0.17763.1

LDAP enabled and working. AD user able to login Non AD Admin user created on setup works

All are unable to see anything in snipeit with the above error.

yosiasz commented 4 years ago

spun up snipe-it 4.8.0, identical issue. This means the issue is most probably environmental.

bakfiets2 commented 4 years ago

After 4 days of searching. No results yet. Checked a lot of right things. Tried 2 different servers. Not much to find about this error btw

yosiasz commented 4 years ago

for now, just to get out of the error (do not do this in production system) and to see what is going on, I commented out the following line 41 of C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php

// $this->authenticate($guards);

restart web server and things are looking good. So I can troubleshoot further.

bakfiets22 commented 4 years ago

Cool. Going to try that tomorrow!

snipe commented 4 years ago

So, we're starting to see a little bit of this with some of our customers (not-hosted). I don't have any definitive answers yet, but it's at least reproducible across multiple systems, which is a good start.

If you can tell me what happens if you run the following:

php artisan passport:install
php artisan migrate
php artisan passport:client --personal

log out, log back in, try to reproduce again, and tail the logs as you do.

We'll figure this out. Something changed, and it wasn't the version of Laravel, so I'm confident we can find the common thread here.

yosiasz commented 4 years ago

Never met forge :)

SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: YES)
snipe commented 4 years ago

If you see that, it means one of two things...

Either you didn't set your MySQL info in the .env, OR, you have a parse error higher up in the .env (weird characters that are not enclosed in quotes, for example) so that the .env cannot be read.

yosiasz commented 4 years ago

apologies, I was in another snipe 4.8 folder when I did this. went back to latest v4.9.5 - build 4482 (master) folder and those commands did not fix the original issue.

snipe commented 4 years ago

@yosiasz roger that - can you successfully create an API key through the web UI? (Go to your name in the top left, and then API keys)

yosiasz commented 4 years ago

yes I am able to create an API key (from top right)

snipe commented 4 years ago

So this is the same thing we're seeing on only self-hosted folks. Nothing big has changed in the last few versions of Snipe-IT, so I have to wonder if it's an environmental change? Do you know if you're running SELinux?

yosiasz commented 4 years ago

We are using IIS on Windows Server 2019. Not sure if that answers the question.

yosiasz commented 4 years ago
    public function handle($request, Closure $next, ...$guards)
    {
        //echo implode("X",$guards);
        $this->authenticate($guards); -->Commenting this out, makes it "work"

        return $next($request);
    }
snipe commented 4 years ago

It does :D

Can you show me the perms on your storage directory and subdirectories?

Sometimes we see highly conflated log errors because the log itself (or temp directories) are writable by the current user, but not the web server.

You can't realistically comment that out tho - It's literally what controls all permissions within the system.

snipe commented 4 years ago

Can all of you on the the thread let me know what specific version of PHP you're using? Wondering if maybe it's an esoteric artifact of a minor version change in PHP

yosiasz commented 4 years ago

PHP 7.4 nts.

I purposely gave IUSR full control on storage

image

yosiasz commented 4 years ago

I suspect, it is environmental php modules that were update such as ldap.

snipe commented 4 years ago

@yosiasz TYSM for your patience here. I know we run PHP 7.3 for all of our hosted customers.

I'd love to hear from others who are having this issue with respect to what version they're using. If we can figure out what's happening here, it would be a huge win for many of the folks who use this software.

snipe commented 4 years ago

@uberbrady can you reproduce this on your linux PHP 7.4 install?

snipe commented 4 years ago

@yosiasz I feel like we're getting closer. You're seeing it on windows, and the OP (and a few support - self-hosted - customers) are seeing it on linux, which definitely helps rule some things out. Suspecting it might be a PHP 7.4 issue, but we'll need to confirm. 7.3 -> 7.4 did some weird stuff that I'm not exactly in love with, and it might be that simple.

snipe commented 4 years ago

Folks - we've got all eyes on this one now. Any additional info you can provide is awesome, but at least know we're moving heaven and earth to at least reproduce this.

@yosiasz Really solid sleuthing on the guards thing. Again, not really tenable in production, but I think it may help us narrow this down a bit.

yosiasz commented 4 years ago

pointed latest to php v7.3 still same issue. Could be cached stuff on IIS. More reason for us to move away from IIS. php_ldap version change is what I suspect

snipe commented 4 years ago

It could be, but that's not what this feels like. We're seeing this (albeit rarely) on both IIS and Linux, so IIS (for once) isn't to blame :D It's something else, but I definitely appreciate all of your help in trying to track this down.

snipe commented 4 years ago

And FWIW, some people reporting this issue are not using any of the LDAP functions, so that shouldn't be an issue.

But, I mean, computers....

We'll keep working on it on our end.

bakfiets2 commented 4 years ago

@yosiasz I feel like we're getting closer. You're seeing it on windows, and the OP (and a few support - self-hosted - customers) are seeing it on linux, which definitely helps rule some things out. Suspecting it might be a PHP 7.4 issue, but we'll need to confirm. 7.3 -> 7.4 did some weird stuff that I'm not exactly in love with, and it might be that simple.

I Tried also installing on 7.2. No luck. Same error. Will try installing it again. The PHP version that comes with Plesk is having issues. So installed 7.2.33. Still no luck. Same error. It is on a VPS running on strato. I have 3 servers. Tried on 2 of them. One server has slighlty older software. Same error haha.

Computers are strange things...

bakfiets2 commented 4 years ago

BTW. i don't use LDAP

yosiasz commented 4 years ago

This works perfectly:

v4.8.0 - build 4186 (master) PHP 7.3.13

bakfiets22 commented 4 years ago

This works perfectly:

v4.8.0 - build 4186 (master)

PHP 7.3.13

Will give this a try tonight. Thnx

snipe commented 4 years ago

What's really baffling me here is that we still can't reproduce it anywhere. We have thousands of 4.9.5 instances deployed and we haven't seen this anywhere in our production systems or local development systems.

Please understand, I'm not doubting you - as I mentioned, you're not the only ones reporting this, but it's such a tiny number of cases that it makes it a real slog to troubleshoot. Even looking at the changes within the past few versions, we didn't change anything there that would affect anything like permissions, gates, sessions, etc. Plus the OP is saying this happened on 4.6.4, which is a very old version.

We had a self-hosted customer send over their database just so we could confirm it wasn't a failed migration or something, and it loaded up just fine. This is a real head-scratcher.

snipe commented 4 years ago

Can anyone on this thread try switching to the develop branch on a test install? (You should run migrations, as the DB has changed a little.) We're about to release v5 this week, and part of me doesn't want to spend too much time on this if it's somehow resolved in v5.

bakfiets2 commented 4 years ago

What's really baffling me here is that we still can't reproduce it anywhere. We have thousands of 4.9.5 instances deployed and we haven't seen this anywhere in our production systems or local development systems.

Please understand, I'm not doubting you - as I mentioned, you're not the only ones reporting this, but it's such a tiny number of cases that it makes it a real slog to troubleshoot. Even looking at the changes within the past few versions, we didn't change anything there that would affect anything like permissions, gates, sessions, etc. Plus the OP is saying this happened on 4.6.4, which is a very old version.

We had a self-hosted customer send over their database just so we could confirm it wasn't a failed migration or something, and it loaded up just fine. This is a real head-scratcher.

Big typo. Should be 4.9.0 and 4.9.6

bakfiets2 commented 4 years ago

Can anyone on this thread try switching to the develop branch on a test install? (You should run migrations, as the DB has changed a little.) We're about to release v5 this week, and part of me doesn't want to spend too much time on this if it's somehow resolved in v5.

Going to test it this evening! Wil do a clean install on v5

snipe commented 4 years ago

Big typo. Should be 4.9.0 and 4.9.6

Ah, thanks for the clarification!

Going to test it this evening! Wil do a clean install on v5

Thanks so much - I'm so sorry you folks are having this issue. I wish I had a smoking gun for you. Still trying to figure it out tho :(

bakfiets2 commented 4 years ago

Big typo. Should be 4.9.0 and 4.9.6

Ah, thanks for the clarification!

Going to test it this evening! Wil do a clean install on v5

Thanks so much - I'm so sorry you folks are having this issue. I wish I had a smoking gun for you. Still trying to figure it out tho :(

No big deal. I really would like this to work because it will make some things a lot easier. So no worries!

snipe commented 4 years ago

Hm, I was rubber-ducking this with @uberbrady and I think we might have an idea here?

First off, let's do the "IT 101" version:

What I'm thinking right now is that we did make some security header changes a few versions ago, specifically setting HSTS headers (which should default to off so it doesn't monkey anyone up if they don't support it, but it's possible that I donked something up when checking for that .env var).

I have a theory, but I'd love it if either of you can test this for me.

If you comment out this line (TEMPORARILY) : https://github.com/snipe/snipe-it/blob/master/app/Http/Kernel.php#L24

So change that line in /app/Http/Kernel.php from

\App\Http\Middleware\SecurityHeaders::class,

to

//  \App\Http\Middleware\SecurityHeaders::class,

clear your cookies, log out, and login again, do you still have the problem on v4.9.4 or 4.9.5?

GitHub
snipe/snipe-it
A free open source IT asset/license management system - snipe/snipe-it
bakfiets2 commented 4 years ago

Hm, I was rubber-ducking this with @uberbrady and I think we might have an idea here?

First off, let's do the "IT 101" version:

* Trying in different browsers after clearing cookies, you see the same thing, correct?

* Are you running any additional hardware or network appliances (load balancer, proxy, etc)?

What I'm thinking right now is that we did make some security header changes a few versions ago, specifically setting HSTS headers (which should default to off so it doesn't monkey anyone up if they don't support it, but it's possible that I donked something up when checking for that .env var).

I have a theory, but I'd love it if either of you can test this for me.

If you comment out this line (TEMPORARILY) : https://github.com/snipe/snipe-it/blob/master/app/Http/Kernel.php#L24

So change that line in /app/Http/Kernel.php from

\App\Http\Middleware\SecurityHeaders::class,

to

//  \App\Http\Middleware\SecurityHeaders::class,

clear your cookies, log out, and login again, do you still have the problem on v4.9.4 or 4.9.5?

GitHubsnipe/snipe-itA free open source IT asset/license management system - snipe/snipe-it

Same error. I tried with Safari. Firefox. Firefox on windows and Edge. No other network balancing stuff. Running PHP 7.2.33.

Is there something i can send you?

GitHub
snipe/snipe-it
A free open source IT asset/license management system - snipe/snipe-it
snipe commented 4 years ago

DAMMIT. I was sure the HSTS stuff was it. Arglebargle.

This still feels like a header issue to me, like some new setting we introduced is causing the authentication/authorization headers to be stripped out when it's making the API calls.

Let me chew on this some more. Again, sorry for the hassle, and I really appreciate your patience.

bakfiets2 commented 4 years ago

Just happy with your support! If you need something let me know!

snipe commented 4 years ago

If you create an API token and run a curl command to an API endpoint (like /api/v1/users) does that work? LMK if you need help figuring out how to do that.

yosiasz commented 4 years ago

IIS Windows 2019 snipe-it-4.9.0 PHP 7.3.13

Works

snipe commented 4 years ago

@yosiasz to clarify, you're saying 4.9.0 does work, but even with the change I proposed above, 4.9.5 does not?

snipe commented 4 years ago

There are (unfortunately) a ton of differences between 4.9.0 and 4.9.5: https://github.com/snipe/snipe-it/compare/v4.9.0...v4.9.5

It would be really helpful if we could determine the latest working version of 4.9.x where this issue wasn't a problem. That can at least narrow a few things down.

yosiasz commented 4 years ago

with 4.9.5 along with the changes you proposed above are not working

I am going through each version starting from 4.9.0 and testing each versions up to 4.9.4

4.9.1 is next

snipe commented 4 years ago

@yosiasz thank you so much - that will be enormously helpful!

bakfiets2 commented 4 years ago

If you create an API token and run a curl command to an API endpoint (like /api/v1/users) does that work? LMK if you need help figuring out how to do that.

Big error. Creating a API. Looks like some DB's are missing

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipe.oauth_personal_access_clients' doesn't exist (SQL: select * from oauth_personal_access_clients order by id desc limit 1) /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Database/Connection.php#664 Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipe.oauth_personal_access_clients' doesn't exist /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php#63 Doctrine\DBAL\Driver\PDOException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipe.oauth_personal_access_clients' doesn't exist /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php#61

snipe commented 4 years ago

Try php artisan migrate

yosiasz commented 4 years ago

4.9.1 works!

bakfiets2 commented 4 years ago

php artisan migrate

And the next one

Trying to get property 'client' of non-object /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/passport/src/ClientRepository.php#81 ErrorException return $this->find(Passport::$personalAccessClient); }

    return PersonalAccessClient::orderBy('id', 'desc')->first()->client;
}

/**

0 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/passport/src/ClientRepository.php(81): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Trying to get p...', '/var/www/vhosts...', 81, Array)

1 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/passport/src/PersonalAccessTokenFactory.php(71): Laravel\Passport\ClientRepository->personalAccessClient()

2 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/passport/src/HasApiTokens.php(67): Laravel\Passport\PersonalAccessTokenFactory->make(1, 'test', Array)

3 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/passport/src/Http/Controllers/PersonalAccessTokenController.php(70): App\Models\User->createToken('test', Array)

4 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(48): Laravel\Passport\Http\Controllers\PersonalAccessTokenController->store(Object(Illuminate\Http\Request))

5 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Laravel\Passport\Http\Controllers\PersonalAccessTokenController), 'store')

6 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\Routing\Route->runController()

7 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Route->run()

8 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

9 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(43): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

10 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Auth\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))

11 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

12 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

13 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle(Object(Illuminate\Http\Request), Object(Closure))

14 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

15 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/app/Http/Middleware/CheckForTwoFactor.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

16 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForTwoFactor->handle(Object(Illuminate\Http\Request), Object(Closure))

17 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

18 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/app/Http/Middleware/CheckLocale.php(42): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

19 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))

20 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

21 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(68): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

22 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))

23 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

24 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

25 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))

26 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

27 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(68): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

28 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))

29 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

30 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

31 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\Pipeline\Pipeline->then(Object(Closure))

32 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))

33 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))

34 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(590): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

35 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

36 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))

37 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(65): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

38 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(Object(Illuminate\Http\Request), Object(Closure))

39 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

40 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

41 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))

42 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

43 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

44 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForDebug->handle(Object(Illuminate\Http\Request), Object(Closure))

45 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

46 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/app/Http/Middleware/CheckForSetup.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

47 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))

48 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

49 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

50 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))

51 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

52 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

53 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))

54 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

55 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

56 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))

57 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

58 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

59 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))

60 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

61 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/barryvdh/laravel-cors/src/HandlePreflight.php(29): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

62 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\Cors\HandlePreflight->handle(Object(Illuminate\Http\Request), Object(Closure))

63 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

64 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

65 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))

66 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

67 /var/www/vhosts/ict.jellevansetten.nl/httpdocs/public/index.php(58): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

68 {main}

snipe commented 4 years ago

Run php artisan passport:client --personal

(You can use the default data it prompts you for there.)