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

v7.2.1 is not compatible with pusher SDK #364

Closed alireza-salehi closed 1 year ago

alireza-salehi commented 1 year ago

upgrading from 7.0.2 to 7.2.1 has broken the clients, client could not receive any data except ping/pong

all three are broken after upgrade: --pusher iOS SDK 8.0.0 --pusher android SDK 2.2.8 --Laravel Echo 1.14.1

benw-pusher commented 1 year ago

Can you share more info about your issue here. Do you have any errors from either the client or the server?

alireza-salehi commented 1 year ago

everything works when using 7.0.2 if i upgrade to 7.2.1 without any other changes, clients not receiving any data and there is no error! with websockets panel everything is fine with horizon panel everything is fine no error log on Laravel or on "websockets serve" or "horizon serve" or browser console or any other places i have ping/pong and nothing else, when downgrade to 7.0.2 it will fix automatically clients even joining private channels, but no data received

i'm using these packages: laravel/framework v9.39.0 beyondcode/laravel-websockets 1.13.1 pusher/pusher-php-server 7.0.2 Redis Horizon

with these settings:

.env

BROADCAST_DRIVER=pusher CACHE_DRIVER=redis FILESYSTEM_DISK=local QUEUE_CONNECTION=redis SESSION_DRIVER=file SESSION_LIFETIME=120 PUSHER_APP_ID=myId PUSHER_APP_KEY=myKey PUSHER_APP_SECRET=mySecret PUSHER_APP_CLUSTER=mt1

broadcasting.config

   'pusher' => [
        'driver' => 'pusher',
        'key' => env('PUSHER_APP_KEY'),
        'secret' => env('PUSHER_APP_SECRET'),
        'app_id' => env('PUSHER_APP_ID'),
        'options' => [
            'cluster' => env('PUSHER_APP_CLUSTER'),
            'useTLS' => false,
            'host' => 'http://localhost',
            'port' => 6001,
            'scheme' => 'http'
        ],
        'client_options' => [
            // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
        ],
    ],

websockets.php

'apps' => [ [ 'id' => env('PUSHER_APP_ID'), 'name' => env('APP_NAME'), 'key' => env('PUSHER_APP_KEY'), 'secret' => env('PUSHER_APP_SECRET'), 'path' => env('PUSHER_APP_PATH'), 'capacity' => null, 'enable_client_messages' => false, 'enable_statistics' => true, ], ],

just locked version for now to investigate more, "pusher/pusher-php-server": "~7.0.2",

benw-pusher commented 1 year ago

Does the package work when using the official Pusher service instead of the replacement Laravel Websockets? The package is designed for use with Pusher and we cannot guarantee support for Laravel Websockets.

alireza-salehi commented 1 year ago

Does the package work when using the official Pusher service instead of the replacement Laravel Websockets? The package is designed for use with Pusher and we cannot guarantee support for Laravel Websockets.

not tested with pusher

benw-pusher commented 1 year ago

Closing this as it doesn't appear related to the official Pusher service.