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

[web] Event emitter causing error in release builds and alternative browsers -- workaround found #16

Open
MichealReed opened this issue Jul 17, 2020 · 0 comments

Comments

@MichealReed
Copy link

When connecting and on subsequent client connections, the web app throws an uncaught type error. Chrome points to zone.dart line 1175, firefox does the same but points to client.dart line 487.

Reopened in sdk as this issue is caused by the event emitter library, events2. I was able to fix by changing the dependency and converting the library to use https://pub.dev/packages/eventify. This workaround is not viable for most users, but does resolve the problem.

Your environment.

  • Version: 6512fefd01d606662228b838a8196ffff6c9ae1a
  • Browser: issue persists

What did you do?

flutter create .
flutter build web --release
host it

Chrome

Uncaught TypeError: func.call$1 is not a function
    at Client.callback$7 (event_emitter.dart:29)
    at EventEmitter_emit_closure.call$1 (event_emitter.dart:64)
    at Interceptor.forEach$1 (js_array.dart:257)
    at Object.forEach$1$ax (main.dart.js:7204)
    at Client.emit$5 (event_emitter.dart:63)
    at Client._handleNotification$1 (client.dart:506)
    at Object.eval (eval at Closure_forwardCallTo (js_helper.dart:2182), <anonymous>:3:41)
    at Peer.callback$7 (event_emitter.dart:29)
    at EventEmitter_emit_closure.call$1 (event_emitter.dart:64)
    at Interceptor.forEach$1 (js_array.dart:257)

Firefox:

Uncaught Error: undefined
    wrapException js_helper.dart:1129
    firstWhere$2$orElse js_array.dart:327
    firstWhere$1 main.dart.js:40658
    2 meeting_page.dart:64
    protected main.dart.js:7440
    call$2 async_patch.dart:340
    _asyncStartSync async_patch.dart:245
    call$2 meeting_page.dart:64
    callback$7 event_emitter.dart:32
    call$1 event_emitter.dart:64
    forEach$1 js_array.dart:257
    forEach$1$ax main.dart.js:7204
    emit$5 event_emitter.dart:63
    emit$3 main.dart.js:53619
    _handleNotification$1 client.dart:514
    anonymous main.dart.js line 4671 > Function:3
    callback$7 event_emitter.dart:29
    call$1 event_emitter.dart:64
    forEach$1 js_array.dart:257
    forEach$1$ax main.dart.js:7204
    emit$5 event_emitter.dart:63
    emit$2 main.dart.js:53613
    call$1 peer.dart:120
    callback$7 event_emitter.dart:29
    call$1 event_emitter.dart:64
    forEach$1 js_array.dart:257
    forEach$1$ax main.dart.js:7204
    emit$5 event_emitter.dart:63
    emit$2 main.dart.js:53613
    call$1 main.dart.js:102223
    1 websocket_web_impl.dart:36
    protected main.dart.js:7440
    call$2 async_patch.dart:340
    _asyncStartSync async_patch.dart:245
    $call$body$WebSocketImpl_connect_closure websocket_web_impl.dart:30
    call$1 websocket_web_impl.dart:30
    call$1 html_dart2js.dart:37188
    invokeClosure js_helper.dart:1825
    function main.dart.js:4533

What did you expect?

I expected it to join the room and conferencing to work.

What happened?

Client joins but hangs at waiting for others to join. You can see your own camera and hear your own audio, but you cannot hear any other participants as they never show joined to the room. The SFU logs indicate multiple peers are connected, and publishing.

image

@MichealReed MichealReed changed the title [web] Event emitter causing error in release builds and alternative browsers -- fix found [web] Event emitter causing error in release builds and alternative browsers -- workaround found Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant