Skip to content
This repository was archived by the owner on Dec 7, 2020. It is now read-only.
This repository was archived by the owner on Dec 7, 2020. It is now read-only.

FileNotFoundException on subscribing to private channel #22

Description

@rvamsikrishna

Hello, thank you very much for this package.
I am successfully able to subscribe to the public channels and receive events that are sent from the pusher debug console.
The exception is thrown when I am trying to subscribe to private channels.
I have in the backend written in laravel. I'm not a back end developer so I could not debug if the problem is on the back end.

I pass the required auth endpoint and also the request headers to PusherAuth.
When I try to connect to the pusher cancel and subscribe to a private channel I get this file not found exception which points to the auth endpoint URL as below

D/PusherPlugin( 8418): onCancel args: null
D/PusherPlugin( 8418): init
D/PusherPlugin( 8418): connect
D/PusherPlugin( 8418): subscribe (private)
D/PusherPlugin( 8418): bind (BroadcastNotificationCreated)
I/flutter ( 8418): CONNECTING
I/flutter ( 8418): CONNECTED
D/PusherPlugin( 8418): onError : java.io.FileNotFoundException: https://<my-url>/broadcasting/auth
W/System.err( 8418): com.pusher.client.AuthorizationFailureException: java.io.FileNotFoundException: https://<my-url>/broadcasting/auth
W/System.err( 8418): 	at com.pusher.client.util.HttpAuthorizer.authorize(HttpAuthorizer.java:146)
W/System.err( 8418): 	at com.pusher.client.channel.impl.PrivateChannelImpl.getAuthResponse(PrivateChannelImpl.java:127)
W/System.err( 8418): 	at com.pusher.client.channel.impl.PrivateChannelImpl.toSubscribeMessage(PrivateChannelImpl.java:90)
W/System.err( 8418): 	at com.pusher.client.channel.impl.ChannelManager$1.run(ChannelManager.java:140)
W/System.err( 8418): 	at com.pusher.client.util.Factory$1.run(Factory.java:109)
W/System.err( 8418): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/System.err( 8418): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/System.err( 8418): 	at java.lang.Thread.run(Thread.java:764)
W/System.err( 8418): Caused by: java.io.FileNotFoundException: https://<my-url>/broadcasting/auth
W/System.err( 8418): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:251)
W/System.err( 8418): 	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
W/System.err( 8418): 	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(Unknown Source:0)
W/System.err( 8418): 	at com.pusher.client.util.HttpAuthorizer.authorize(HttpAuthorizer.java:128)
W/System.err( 8418): 	... 7 more
I/flutter ( 8418): java.io.FileNotFoundException: https://<my-url>/broadcasting/auth
W/OkHttpClient( 8418): A connection to <my-url> was leaked. Did you forget to close a response body?

I cannot add the real URL above in the logs so added .
The laravel code does not have any auth endpoint set, so according to the laravel docs the default is /broadcasting/auth.
Any help is appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions