pusher / pusher-http-php

PHP library for interacting with the Pusher Channels HTTP API
https://pusher.com/docs/server_api_guide
1.4k stars 306 forks source link

No callbacks on private channel. pusher:subscription_error #346

Closed brada1703 closed 1 year ago

brada1703 commented 1 year ago

Hey everyone,

I had Pusher working fine before updating a few packages. Now I am getting the following error:

"Error: JSON returned from channel-authorization endpoint was invalid, yet status code was 200. Data was:...

And

Pusher : : ["No callbacks on private.... for pusher:subscription_error"]

Within the Debug Console, I can see that the channel is disconnecting.

I am using:

My code:

import Echo from 'laravel-echo';

window.Pusher = require('pusher-js');

window.Echo = new Echo({
    broadcaster: 'pusher',
    key: process.env.MIX_PUSHER_APP_KEY,
    cluster: process.env.MIX_PUSHER_APP_CLUSTER,
    forceTLS: true
});

Is my error here simply due to using PHP8.1? Is it still not supported? If no, does anyone have a work around or do I have to downgrade my app?

benw-pusher commented 1 year ago

Hi @brada1703. I believe you raised a support ticket regarding this, but we haven't had a response from you. Are you able to respond there? It would be useful to review the full error message (including the data that was included in the error message).

brada1703 commented 1 year ago

Hi @benw-pusher , Sorry! I just replied to your email :) Thanks!

emuter commented 1 year ago

hey @brada1703 . i hope you are doing well. can you please check on this ... https://github.com/pusher/pusher-http-php/issues/348#issuecomment-1267373926

also maybe ... you did not state authEndpoint: '/broadcasting/auth' param in Echo configuration.

benjamin-tang-pusher commented 1 year ago

This was dealt with separately with the Pusher support team.

This was a CORS issue where config/cors.php did not correctly specify the auth endpoint.