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

Unhandled Exception: Bad state: Cannot add new events after calling close (similar to #516) #558

Open
Vera-Spoettl opened this issue Aug 8, 2024 · 2 comments

Comments

@Vera-Spoettl
Copy link

Vera-Spoettl commented Aug 8, 2024

Hi there,
I have the same error message as mentioned in https://github.com/shamblett/mqtt_client/issues/516 but with the following stack trace:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: Cannot add new events after calling close
#0      _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:243:24)
#1      EventBus.fire (package:event_bus/event_bus.dart:61:22)
#2      MqttConnectionHandlerBase.autoReconnect (package:mqtt_client/src/connectionhandling/mqtt_client_mqtt_connection_handler_base.dart:157:23)

It seems, that there is a problem after an auto reconnect. Do I have to do anything after reconnecting that I'm missing?

Thanks for your help!

@shamblett
Copy link
Owner

I need a full client log of your autoreconect sequence and just afterwards, are you calling disconnect() after a successful autoreconnect sequence?

@Vera-Spoettl
Copy link
Author

I have some problems with the hardware at the moment that makes it hard to reproduce this. Please give me some more time to attach a full log ...

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

2 participants