Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login: Request failed with status code 500 #9

Open
titoff002 opened this issue Sep 8, 2019 · 9 comments
Open

Login: Request failed with status code 500 #9

titoff002 opened this issue Sep 8, 2019 · 9 comments
Assignees

Comments

@titoff002
Copy link

Hello,

I have this error :

[2019-09-08 02:56:52] local.ERROR: Undefined index: provider {"exception":"[object] (ErrorException(code: 0): Undefined index: provider at D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\tymon\\jwt-auth\\src\\Providers\\AbstractServiceProvider.php:101) [stacktrace] #0 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\tymon\\jwt-auth\\src\\Providers\\AbstractServiceProvider.php(101): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Undefined index...', 'D:\\\\test\\\\laravel...', 101, Array) #1 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Auth\\AuthManager.php(111): Tymon\\JWTAuth\\Providers\\AbstractServiceProvider->Tymon\\JWTAuth\\Providers\\{closure}(Object(Illuminate\\Foundation\\Application), 'api', Array) #2 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Auth\\AuthManager.php(88): Illuminate\\Auth\\AuthManager->callCustomCreator('api', Array) #3 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Auth\\AuthManager.php(68): Illuminate\\Auth\\AuthManager->resolve('api') #4 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Auth\\AuthManager.php(54): Illuminate\\Auth\\AuthManager->guard('api') #5 [internal function]: Illuminate\\Auth\\AuthManager->Illuminate\\Auth\\{closure}(NULL) #6 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Auth\\AuthServiceProvider.php(84): call_user_func(Object(Closure), NULL) #7 [internal function]: Illuminate\\Auth\\AuthServiceProvider->Illuminate\\Auth\\{closure}(NULL) #8 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Request.php(517): call_user_func(Object(Closure), NULL) #9 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\ThrottleRequests.php(96): Illuminate\\Http\\Request->user() #10 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\ThrottleRequests.php(48): Illuminate\\Routing\\Middleware\\ThrottleRequests->resolveRequestSignature(Object(Illuminate\\Http\\Request)) #11 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(163): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle(Object(Illuminate\\Http\\Request), Object(Closure), '60', '1') #12 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #13 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request)) #14 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(682): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) #15 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(657): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request)) #16 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(623): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route)) #17 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(612): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request)) #18 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request)) #19 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request)) #20 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\fideloper\\proxy\\src\\TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request)) #21 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(163): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #22 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #23 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request)) #24 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #25 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #26 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request)) #27 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #28 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #29 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request)) #30 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #31 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #32 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request)) #33 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #34 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #35 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request)) #36 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) #37 D:\\test\\laravelbuefy\\laravue\\laravue3\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request)) #38 D:\\test\\laravelbuefy\\laravue\\laravue3\\public\\index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request)) #39 D:\\test\\laravelbuefy\\laravue\\laravue3\\server.php(21): require_once('D:\\\\test\\\\laravel...') #40 {main} "}

I have configured correctly : config/auth.php

But don't work.

Can you help me please ?

Capture

Thanks

@caraffa
Copy link
Contributor

caraffa commented Oct 2, 2019

Same issue for me.
Apparently everything is setup according to the instructions (database migration/seed, auth.php, etc, eaverything with the defaults provided by Tuandm/laravue) but when I try to login I get "Login failed with error code 500)
I'm serving the project with "php artisan serve" (maybe wrong way to serve the project?)
I'm attaching my console.log

Thanks

127.0.0.1-1570031545622.log

@tuandm tuandm self-assigned this Oct 3, 2019
@tuandm
Copy link
Owner

tuandm commented Oct 3, 2019

@titoff002 @caraffa Sorry for the late response. We are looking on this issue.

@didiroesmana
Copy link

tymondesigns/jwt-auth#1869 (comment)

Hey guys, If you are using Laravel version 5.5 or above, run the following command to require a dev-develop version of jwt package.
composer require tymon/jwt-auth:dev-develop --prefer-source

@caraffa
Copy link
Contributor

caraffa commented Oct 4, 2019

Sorry again! I didn't realize that in my .env file the db access credentials (DB_NAME, DB_USERNAME, DB_PASSWORD) where not set correctly.
Now, with the correct values, I can log into the dashboard using php artisan serve.
However I'm trying to serve the project in my native environment (i.e. not by means of php artisan serve).
I've tried to to create the project in my Sites folder (macOS default) and accessing it like this:
https://localhost/LaravueTest/public
I've changed the APP_URL in the .env and config/app.php files to 'localhost/LaravueTest/', I've changed ownership of the entire project folder to :_www, I've changed permissions to the entire project folder subtree to 775 (it was from 755) but to no avail.
When I try to login I get "Request failed with status code 404"
The console output is this:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (login, line 0); http://localhost/api/auth/login/
[Log] errError: Request failed with status code 404; request.js:34

My local dev env is macOS latest, with php 7.1 and Laravel 5.8.

Could you point me please to some good tutorial about how to serve a Laravel project in my local dev env, but without 'php artisan serve'?

Thank you very much

P.S.:
When I log into the dashboard with "php artisan serve", Element icons aren't displayed correctly, as in the picture.

Schermata 2019-10-03 alle 16 58 30

Thank you again

@WhozThiz
Copy link

WhozThiz commented Oct 16, 2019

Same situation for my local dev in macOS with php v7.3.1 & laravel v5.8.

Error from browser:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
/api/auth/login:1
errError: Request failed with status code 500
webpack-internal:///./resources/vendor/laravue/utils/request.js:40

@tuandm
Copy link
Owner

tuandm commented Oct 16, 2019

@caraffa Hello again.

This package has not been updated for long. I will work on this.

@WhozThiz If the error is 500, please help to check your server log to see any useful information there.

@WhozThiz
Copy link

Thanks Chief, I tested with php v7.1.26 and start working without any problem...

@caraffa
Copy link
Contributor

caraffa commented Oct 16, 2019

I confirm. A fresh install of the latest Laravue, running under pache2.4/PHP7.3, is working fine.

@Benoit1980
Copy link

Ook just had the same error(error 500) after installation.
Simply set your database property in the .env file and run these commands"

php artisan cache:clear
php artisan view:clear
php artisan config:clear
php artisan config:cache
php artisan route:cache

Everything will work after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants