Bug message chat room

Hi. Agian me!
Bug when subscribe at messaging :slight_smile:
My code:
Channel channel =
await Backendless.messaging.subscribe(model.value.objectId);
channel.addMessageListener(onMessageReceived);

Get this error and crash app:
I/RTClient( 7378): try to subscribe RTSubscription{id=‘B502DDEB-5FC6-5DCD-FF8E-DFFD44C55F00’, callback=com.backendless.rt.ConnectListener$1@c6bc315, subscriptionName=PUB_SUB_CONNECT, options={channel=F351E150-5867-4EAB-92DB-7B63D564604B}}
I/cketIOConnectionManager( 7378): Socket not connected. Try to get lock
I/cketIOConnectionManager( 7378): Got lock
E/AndroidRuntime( 7378): FATAL EXCEPTION: pool-BackendlessSDK-thread-1
E/AndroidRuntime( 7378): Process: com.bubbly.realtor, PID: 7378
E/AndroidRuntime( 7378): java.lang.NoClassDefFoundError: Failed resolution of: Lio/socket/client/IO$Options;
E/AndroidRuntime( 7378): at com.backendless.rt.SocketIOConnectionManager.get(SocketIOConnectionManager.java:59)
E/AndroidRuntime( 7378): at com.backendless.rt.RTClientSocketIO.subscribe(RTClientSocketIO.java:133)
E/AndroidRuntime( 7378): at com.backendless.rt.AsynRTClient$1.run(AsynRTClient.java:19)
E/AndroidRuntime( 7378): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime( 7378): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime( 7378): at java.lang.Thread.run(Thread.java:923)
E/AndroidRuntime( 7378): Caused by: java.lang.ClassNotFoundException: Didn’t find class “io.socket.client.IO$Options” on path: DexPathList[[zip file “/data/app/~~GbDFPRgFE2CcK5Q9iSS8Pw==/com.bubbly.realtor-W80GM5NgmD9HbxOCLxN-Ig==/base.apk”],nativeLibraryDirectories=[/data/app/~~GbDFPRgFE2CcK5Q9iSS8Pw==/com.bubbly.realtor-W80GM5NgmD9HbxOCLxN-Ig==/lib/arm64, /data/app/~~GbDFPRgFE2CcK5Q9iSS8Pw==/com.bubbly.realtor-W80GM5NgmD9HbxOCLxN-Ig==/base.apk!/lib/arm64-v8a, /system/lib64]]
E/AndroidRuntime( 7378): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
E/AndroidRuntime( 7378): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime( 7378): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime( 7378): … 6 more
I/Process ( 7378): Sending signal. PID: 7378 SIG: 9
Lost connection to device.

Really tired of backendless :frowning:

Do you have the following in android/app/build.gradle: ?

 implementation ('io.socket:socket.io-client:1.0.0') {  
      // excluding org.json which is provided by Android  
      exclude group: 'org.json', module: 'json'  
    } 
1 Like

ok tks @mark-piller. It work but why i can’t found on Backendless document?

Hello @Minh_Tuan_Vu,

It is described here. This setup description is missing in the Flutter doc - we’ll add it as soon as possible.

Regards,
Olha

1 Like

ok tks @olhadanylova