Hi.
MQTT Chat sample is working fine with android to android, both running Chat sample.
But when I tried to publish message from my mac terminal, Chat sample crashes.
here is the command is sent from my terminal:
192.168.1.19:9000 are from B4A Chat sample running server
any message I send to topic "all/connect" from terminal crashes the Chat sample
here is the the error log
Please help to resolve. Thank you.
MQTT Chat sample is working fine with android to android, both running Chat sample.
But when I tried to publish message from my mac terminal, Chat sample crashes.
here is the command is sent from my terminal:
B4X:
mosquitto_pub -d -h 192.168.1.19 -p 9000 -t all/connect -m "mac"
any message I send to topic "all/connect" from terminal crashes the Chat sample
here is the the error log
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Connected: true
all/connect: j5
** Activity (main) Pause, UserClosed = false **
** Activity (chat) Create, isFirst = true **
** Activity (chat) Resume **
Error occurred on line: 61 (Starter)
java.io.IOException
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:177)
at libcore.io.Streams.readSingleByte(Streams.java:41)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:130)
at java.io.DataInputStream.readByte(DataInputStream.java:75)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readByte(B4XSerializator.java:133)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:301)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:112)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ConvertBytesToObject(B4XSerializator.java:82)
at b4a.example.starter._client_messagearrived(starter.java:283)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7231)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.util.zip.DataFormatException: incorrect header check
at java.util.zip.Inflater.inflateImpl(Native Method)
at java.util.zip.Inflater.inflate(Inflater.java:237)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
... 22 more
Please help to resolve. Thank you.
Last edited: