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

Class WebsocketConnection's _create_connection function got err alttester.exceptions.ConnectionError: the JSON object must be str, bytes or bytearray, not NoneType #1679

Open
phucvo-skymavis opened this issue Jul 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@phucvo-skymavis
Copy link

phucvo-skymavis commented Jul 31, 2024

Python 3
Unity 2022.3.39
AltTester® Unity SDK a 2.1.2
Android
macOS

Summary

Class WebsocketConnection's _create_connection fuction got err alttester.exceptions.ConnectionError: the JSON object must be str, bytes or bytearray, not NoneType

Steps to reproduce

When AltDriver connect to AltServer, WebsocketConnection called connect(). But when it call _create_connection with message like this
++Rcv decoded: fin=1 opcode=1 data=b'{"messageId":null,"driverId":null,"commandName":"driverRegistered","isNotification":true}'
The msg that _on_message received is '{"messageId":null,"driverId":null,"commandName":"driverRegistered","isNotification":true}'
After that, it parsed msg to json by response = json.loads(message). And in self._notification_handler.handle_notification(response), it continue parsed msg to json again by
data = json.loads(message.get("data")). There's no data key on this json, so it cause ConnectionError when I call cls.alt_driver = AltDriver() with my Unity Android app

@phucvo-skymavis phucvo-skymavis added the bug Something isn't working label Jul 31, 2024
@phucvo-skymavis phucvo-skymavis changed the title Class WebsocketConnection's _create_connection fuction got err alttester.exceptions.ConnectionError: the JSON object must be str, bytes or bytearray, not NoneType Class WebsocketConnection's _create_connection function got err alttester.exceptions.ConnectionError: the JSON object must be str, bytes or bytearray, not NoneType Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant