Facebook login returns "500 | Server Error"
-
I am having issue with facebook login, after entering the login details the page redirect me too 500 server error soon after reloading the page i am redirected to the profile page,
In short i am able to login with facebook but everytime 500 server error appears then i have to reload the page so i can be redirected to profile page.
My site url is :- https://rawpharmabiz.com/
please help me to resolve
-
Hi @sahilajmeri1,
Please share the error logs, so that I can check?
Or may be these issues are common, you can check this thread also,
https://stackoverflow.com/questions/42422603/laravel-5-2-socialite-facebook-api-login-redirect-error
https://stackoverflow.com/questions/58278997/client-error-500-in-socialite-google-login-laravel-5-8
https://stackoverflow.com/questions/37566985/laravel-5-socialite-facebook-login-error-handling-on-callback-after-user-cancels -
[2021-09-13 16:20:08] local.ERROR: Too few arguments to function Webkul\Checkout\Listeners\CustomerEventsHandler::onCustomerLogin(), 0 passed in /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php on line 401 and exactly 1 expected {"exception":"[object] (ArgumentCountError(code: 0): Too few arguments to function Webkul\Checkout\Listeners\CustomerEventsHandler::onCustomerLogin(), 0 passed in /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php on line 401 and exactly 1 expected at /home/ubuntu/rpbwebapp/rawpharmabiz/packages/Webkul/Checkout/src/Listeners/CustomerEventsHandler.php:11)
[stacktrace]
#0 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(401): Webkul\Checkout\Listeners\CustomerEventsHandler->onCustomerLogin()
#1 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(226): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#2 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Events\Dispatcher->dispatch()
#3 /home/ubuntu/rpbwebapp/rawpharmabiz/packages/Webkul/SocialLogin/src/Http/Controllers/LoginController.php(79): Illuminate\Support\Facades\Facade::__callStatic()
#4 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Webkul\SocialLogin\Http\Controllers\LoginController->handleProviderCallback()
#5 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
#6 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Route.php(239): Illuminate\Routing\ControllerDispatcher->dispatch()
#7 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Route.php(196): Illuminate\Routing\Route->runController()
#8 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(685): Illuminate\Routing\Route->run()
#9 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#10 /home/ubuntu/rpbwebapp/rawpharmabiz/packages/Webkul/Shop/src/Http/Middleware/Currency.php(46): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#11 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Webkul\Shop\Http\Middleware\Currency->handle()
#12 /home/ubuntu/rpbwebapp/rawpharmabiz/packages/Webkul/Shop/src/Http/Middleware/Theme.php(31): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#13 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Webkul\Shop\Http\Middleware\Theme->handle()
#14 /home/ubuntu/rpbwebapp/rawpharmabiz/packages/Webkul/Shop/src/Http/Middleware/Locale.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#15 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Webkul\Shop\Http\Middleware\Locale->handle()
#16 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#17 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#18 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#19 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#20 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#21 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\AuthenticateSession->handle()
#22 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#23 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#24 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(687): Illuminate\Pipeline\Pipeline->then()
#26 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRouteWithinStack()
#27 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(628): Illuminate\Routing\Router->runRoute()
#28 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(617): Illuminate\Routing\Router->dispatchToRoute()
#29 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Routing\Router->dispatch()
#30 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#31 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(60): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#32 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#33 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#34 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#35 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#36 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#37 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#38 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#39 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#40 /home/ubuntu/rpbwebapp/rawpharmabiz/packages/Webkul/Core/src/Http/Middleware/CheckForMaintenanceMode.php(117): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#41 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Webkul\Core\Http\Middleware\CheckForMaintenanceMode->handle()
#42 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#43 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\Pipeline\Pipeline->then()
#44 /home/ubuntu/rpbwebapp/rawpharmabiz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(109): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#45 /home/ubuntu/rpbwebapp/rawpharmabiz/public/index.php(74): Illuminate\Foundation\Http\Kernel->handle()
#46 {main}
"} -
Hi @sahilajmeri1,
From the error, it's clearly visible that arguments are not passing in the listener.
-
As per your social login article Social login,
i have provided the facebook client id and client secret in .env file but why this problem is coming, my google and linked in is working fine why only facebook have problem. -
Hi there,
In class Webkul\Checkout\Listeners\CustomerEventsHandler, this method i.e.
onCustomerLogin($event)
.This
$event
is not used inside the method. Maybe you should try to remove the$event
argument from this method.Try with this and let me know.