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

NoSuchMethodError: method not found #111

Open
dariowskii opened this issue Sep 11, 2024 · 2 comments
Open

NoSuchMethodError: method not found #111

dariowskii opened this issue Sep 11, 2024 · 2 comments

Comments

@dariowskii
Copy link

In our web build we encountered this error many many times.

Screenshot 2024-09-11 alle 13 04 37

the client variable is dynamic and I think in web the destroy method is not implemented.

@shamblett
Copy link
Owner

Yes you are correct, the destroy method is used only on the Socket class. The mqtt_client package does not call destroy during disconnect in the web build. I'll update this package accordingly.

@shamblett
Copy link
Owner

OK, the real fix for this from the mqtt_client package is a rather involved refactoring of the connection handling classes to use generics rather than rely on dynamic typing. This is too large of a change for me to implement and test at the moment.

However, I understand that this is somewhat of a pain so for now I've patched the package to trap the OnNoSuchMethod exception if it is raised and call client.close().

Package re released at version 4.5.3, please try this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants