InvalidArgumentException: Cannot redirect to an empty URL. in Symfony Pages are not shwoing up. They display the follwoing error:

InvalidArgumentException: Cannot redirect to an empty URL. in Symfony\Component\HttpFoundation\RedirectResponse->setTargetUrl() (line 86 of /home/../public_html/domain.com/vendor/symfony/http-foundation/RedirectResponse.php).

On page:
The website encountered an unexpected error. Please try again later.InvalidArgumentException: Cannot redirect to an empty URL. in Symfony\Component\HttpFoundation\RedirectResponse->setTargetUrl() (line 86 of vendor/symfony/http-foundation/RedirectResponse.php).

I also noticed that the LOGO and HOME in the main menu do not redirect to the front page but instead they redirect to the current page, which is not correct.

Any help or insight will be greatly appreciated.
This solution is working  when

Successfully Logout with empty blank page website encounter error.

You need to override the core logout function available in user module
by creating your custom module

that is UserController::logout function

Create a Route subscriber

/module/src/Route/RouteSubcriber.php

&lt;?php

namespace Drupal\modulename\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
/**
* Listens to the dynamic route events.
*/
 class RouteSubscriber extends RouteSubscriberBase {
 /**
  * {@inheritdoc}
  */
  public function alterRoutes(RouteCollection $collection) {

    if ($route = $collection-&gt;get('user.logout')) {
      $route-&gt;setDefaults(array(
       '_controller' =&gt; 
       '\Drupal\modulename\Controller\RouteController::logout',
      ));
    }
  }
 }


Create Services file

module/modulename.services.yml

services:
 modulename.route_subscriber:
  class: Drupal\modulename\Routing\RouteSubscriber
  tags:
  - { name: event_subscriber }


Create Controller File
module/src/Controller/RouteController.php

&lt;?php
/**
 * @file
 * Contains \Drupal\modulename\Controller\RouteController.
 */
namespace Drupal\modulename\Controller;

use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Url;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;

class RouteController extends ControllerBase
{

  public function logout() {
    //redirecting to home page if you want you can 
    // redirect to some other page. by concating path with it.
    $value = \Drupal::request();
    user_logout(); 
    return new RedirectResponse($value-&gt;getBaseUrl()); 
    //return new RedirectResponse($value-&gt;getBaseUrl().'/somepath');
  }

}   


that is it.enable the module and try logout will work with out blank page error