Closed DouglasHennrich closed 4 years ago
Please check the new 2.0.0 release which should fix this issue.
Hello @janvennemann I just tested the version 2.0.0 and I can't use socket.off()
like iOS, to remove all listeners:
[ERROR] TiExceptionHandler: (main) [100457,102056] /alloy/controllers/private/user/home.js:184
[ERROR] TiExceptionHandler: socket.off();
[ERROR] TiExceptionHandler: ^
[ERROR] TiExceptionHandler: Uncaught off: Invalid number of arguments. Expected 2 but got 0
[ERROR] TiExceptionHandler: at removeSocket(/alloy/controllers/private/user/home.js:184:14)
[ERROR] TiExceptionHandler: at Alloy.Models.user.Logout(/alloy/controllers/private/user/home.js:300:9)
[ERROR] TiExceptionHandler: at Logout(/alloy/models/User.js:99:5)
[ERROR] TiExceptionHandler: at onClick(/alloy/controllers/private/user/home.js:299:25)
[ERROR] TiExceptionHandler: at btn.addEventListener.event(/alloy/widgets/dhennrich.navBar/controllers/widget.js:164:21)
[ERROR] TiExceptionHandler: at value(ti:/events.js:49:21)
[ERROR] TiExceptionHandler: at value(ti:/events.js:101:19)
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)
[ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:971)
[ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1196)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:401)
[ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:101)
[ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:164)
[ERROR] TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6541)
[ERROR] TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)
[ERROR] TiExceptionHandler: com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
[ERROR] V8Exception: Exception occurred at /alloy/controllers/private/user/home.js:184: Uncaught off: Invalid number of arguments. Expected 2 but got 0
[ERROR] V8Exception: off: Invalid number of arguments. Expected 2 but got 0
We just released new version of the socket.io module that finally fixes this issue on Android. Sorry for the huge delay, i was assigned to other projects in the meantime and totally lost track of this. I hope the fixed module can be of use in future projects.
I'm getting this error on terminal:
Module version:
1.0.2
TiSDK:7.4.2.GA