dimanche 10 mars 2019

Exception: Illuminate \ Broadcasting \ BroadcastException No message in PusherBroadcaster.php:119

Laravel 5.8

I am new to this whole pusher functionality and I've been following this tutorial and trying it out, Create Web Notifications Using Laravel and Pusher Channels. I've followed it step-by-step and when I get to the step to manually test the event by visiting the test url, I receive the following exception:

Illuminate \ Broadcasting \ BroadcastException No message

C:\wamp\www\ares\vendor\laravel\framework\src\Illuminate\Broadcasting\Broadcasters\PusherBroadcaster.php

    $response = $this->pusher->trigger(
        $this->formatChannels($channels), $event, $payload, $socket, true
    );

    if ((is_array($response) && $response['status'] >= 200 && $response['status'] <= 299)
        || $response === true) {
        return;
    }

    throw new BroadcastException( // <-- Exception at this line
        is_bool($response) ? 'Failed to connect to Pusher.' : $response['body']
    );
}

/**
 * Get the Pusher SDK instance.
 *
 * @return \Pusher\Pusher
 */
public function getPusher()
{
    return $this->pusher;
}
}

I've looked at a few other stack overflow articles which talk about changing encrypted: true to encrypted: false but that does not seem to affect anything.



via Chebli Mohamed

1 commentaire:

  1. you know what i just found the solutions maybe you dide one of this tow mistakes first is triggering the event in html page wich is false because php is executed before js wich mean that php will fire event
    when js is not loaded yet
    or you have to download the https://curl.haxx.se/docs/caextract.html
    file and do in your php.ini in curl.cainfo="path to your curl file "

    RépondreSupprimer