Skip to content

[WIP] External clients not receiving service-generated messages#272

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-270
Closed

[WIP] External clients not receiving service-generated messages#272
Copilot wants to merge 1 commit intomainfrom
copilot/fix-270

Conversation

Copy link
Copy Markdown

Copilot AI commented Sep 9, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

In PyBlox, I have the following code (in a sprite):

device = '...'   # change these
password = '...' # change these

@onstart()
def my_onstart(self):
    nb.phone_iot.set_credentials(self.device, self.password)
    nb.phone_iot.listen_to_sensors(self.device, { 'accelerometer': 100 })

@nb.on_message('accelerometer')
def my_onmessage(self, x, y, z):
    self.say(x)

Nothing gets displayed, but the cloud server shows posts to /network/messages/ and NetsBlox/PyBlox-generated messages are correctly received in PyBlox (just not service-generated messages). It looks like what's happening is that the sendMessage feature on external client instances (which are used as the socket objects provided to services) are always explicitly constructing a browser target object, so lookup of the target fails and the message is dropped at cloud.

Fixes #270.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Copy Markdown
Author

Copilot AI commented Sep 9, 2025

@brollb 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@brollb brollb closed this Sep 9, 2025
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

Successfully merging this pull request may close these issues.

External clients not receiving service-generated messages

2 participants