Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client is not connected . SubscribeToTopic failed. #3640

Open
ranjeet-porter opened this issue Sep 20, 2024 · 4 comments
Open

Client is not connected . SubscribeToTopic failed. #3640

ranjeet-porter opened this issue Sep 20, 2024 · 4 comments
Labels
bug Something isn't working closing soon Issue will auto-close if there is no additional activity within 7 days.

Comments

@ranjeet-porter
Copy link

After connecting connection is suddenly lost and while subscribing topic sdk is throwing error.

onSuccess: mqtt connection is successful. 2024-09-19 09:45:54.162 Init 7ffd018 [AndroidXMedia3/1.4.1] [m51, SM-M515F, samsung, 31] 2024-09-19 09:45:54.163 MQTT: Status-> Connected, Throwable-> null 2024-09-19 09:45:54.164 MQTT: subscribeToTopic called 2024-09-19 09:45:54.166 MQTT-> connectionStatus: in.porter.kmputils.communication.mqtt.entities.responses.MqttConnectionStatus$MqttConnectionConnected@3e31a71 2024-09-19 09:45:54.177 MQTT: subscribeToTopic called 2024-09-19 09:45:54.178 onSuccess: mqtt connection is successful. 2024-09-19 09:45:54.179 connection is Lost 2024-09-19 09:45:54.180 schedule Reconnect attempt 0 of 40 in 4 seconds. 2024-09-19 09:45:54.185 MQTT: Status-> Connected, Throwable-> null 2024-09-19 09:45:54.186 MQTT-> connectionStatus: in.porter.kmputils.communication.mqtt.entities.responses.MqttConnectionStatus$MqttConnectionConnected@3e31a71 2024-09-19 09:45:54.200 MQTT: subscribeToTopic called 2024-09-19 09:45:54.274 MQTT: subscription SUCCESSFUL topic:staging/communication/push-notification/driver/aws_6666666612000_staging 2024-09-19 09:45:54.274 MQTT: Status-> Reconnecting, Throwable-> Connection lost (32109) - java.io.EOFException 2024-09-19 09:45:54.304 MQTT: subscription FAILED topic:staging/communication/push-notification/driver/aws_6666666612000_staging (Ask Gemini) Client is not connected (32104) at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31) at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:205) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.subscribeBase(MqttAsyncClient.java:1088) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.subscribe(MqttAsyncClient.java:1061) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.subscribe(MqttAsyncClient.java:1017) at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager.subscribeToTopic(AWSIotMqttManager.java:1506) at in.porter.kmputils.communication.mqtt.usecases.AwsSubscribeToTopicImpl.invoke(AwsSubscribeToTopicImpl.kt:29) at in.porter.kmputils.communication.mqtt.managers.PorterMqttManagerImpl$subscribe$2.invoke(PorterMqttManagerImpl.kt:62) at in.porter.kmputils.communication.mqtt.managers.PorterMqttManagerImpl$subscribe$2.invoke(PorterMqttManagerImpl.kt:62) at in.porter.kmputils.communication.mqtt.managers.PorterMqttManagerImpl.mqttTransact(PorterMqttManagerImpl.kt:68) at in.porter.kmputils.communication.mqtt.managers.PorterMqttManagerImpl.subscribe(PorterMqttManagerImpl.kt:62) at com.theporter.android.driverapp.http.notificationservices.mqtt.MqttNotificationService.subscribeToNotifications(MqttNotificationService.kt:58) at com.theporter.android.driverapp.http.notificationservices.mqtt.MqttNotificationService.access$subscribeToNotifications(MqttNotificationService.kt:25) at com.theporter.android.driverapp.http.notificationservices.mqtt.MqttNotificationService$register$1.invokeSuspend(MqttNotificationService.kt:47) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Sep 20, 2024
@phantumcode
Copy link
Member

@ranjeet-porter Can you provide more details on the issue? What are the steps to reproduce? What versions are you using? Can you provide sample app or code that can help us reproduce the issue to investigate and troubleshoot further?

@phantumcode phantumcode added the bug Something isn't working label Sep 20, 2024
@github-actions github-actions bot removed pending-maintainer-response Issue is pending response from an Amplify team member pending-triage Issue is pending triage labels Sep 20, 2024
@ranjeet-porter
Copy link
Author

Hi @phantumcode I am trying to connect with broker and subscribing topic aggressively and from multiple points like internet change, workmanager, app launch, activity within app so facing this issue while using app.

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Sep 23, 2024
@ranjeet-porter
Copy link
Author

ranjeet-porter commented Sep 23, 2024

MQTT: subscription FAILED topic:staging/communication/push-notification/driver/aws_6100******_staging (Ask Gemini) Connection lost (32109) - java.io.EOFException at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:197) at java.lang.Thread.run(Thread.java:1012) Caused by: java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:275) at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137) at java.lang.Thread.run(Thread.java:1012) 

when subscribe to topic called multiple times and in between it lost connectivity sdk is throwing this error

@ruisebas
Copy link
Member

Please provide the following:

  • What version you are using
  • A sample app or code snippets that reproduce the issue

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Sep 26, 2024
@github-staff github-staff deleted a comment from SAMBILI Oct 28, 2024
@github-staff github-staff deleted a comment from SAMBILI Oct 28, 2024
@vincetran vincetran added the closing soon Issue will auto-close if there is no additional activity within 7 days. label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closing soon Issue will auto-close if there is no additional activity within 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants