[Technical Issue] WebSocket Specification Changes?
- Issue description:
1.Code Connection for Minecraft displays upgrade message
2.Original WebSocket server connection error
2022/06/21 13:18:57 event response: malformed properties JSON: unexpected end of JSON input (payload: {"body":{"message":"Minecraft:bit","receiver":"HoshinoHisashi","sender":"Teacher","type":"title"},"header":{"eventName":"PlayerMessage","messagePurpose":"event","version":16842752}}
)
Using the Minecraft Websockets library
https://github.com/Sandertv/mcwss
- OS:Windows/macOS/Chromebook/mobile devices
- Device make/model:
- Network Type (School or home):home
- How to reproduce:Use Code Connection or connect to the WebSocket server with the /connect command
https://educommunity.minecraft.net/hc/en-us/articles/6861543593108
It seems that the WebSocket implementation was changed in this beta release, but is there a website that has the specifications of how it was changed?
Code Connection for Minecraft is no longer available, and the WebSocket server I am developing to work with micro:bit is no longer available.
I would like to work with the WebSocket library developer to resolve this issue in accordance with the new specifications, so I would appreciate it if you could publish a document that shows the specifications.
The following screenshot is a sample of a micro:bit Grove expansion board sensor combined with Minecraft Education Edition.
-
Hello HOSHINO HISASHI,
It's very exciting to see the types of custom applications you are making using micro:bit, MakeCode and websockets in Minecraft!
You are correct that we did recently update the websockets APIs (/connect) in both Minecraft Bedrock and Minecraft: Education Edition in version 1.18.30. You can see the details of the changes in the Bedrock patch notes when the changes were released:
https://feedback.minecraft.net/hc/en-us/articles/5520890863245-Minecraft-1-18-30-Bedrock-
We are in the final stages of updating code connection with the most recent websocket changes, so very shortly you should see an update to the Code Connection app that will allow you to continue using Bedrock + Code Connection with the recent websockets changes.Unfortunately, we don't currently have plans to support websockets as a formal, external facing API, and so there aren't plans on publishing any formal documentation for websockets.
1 -
I don't understand a single word, but I love being around the cool people. =D
1 -
So I'm not sure exactly how things work for the code connection but I have discovered that if you want Bedrock to be able to connect to a WSS on the same computer, you need to Get windows to allow loopback for the folder where bedrock is.
I've been running a WSS program with education edition since late 2021 and it still works. Bedrock edition still has the /wss command but I was unable to get my program to work with Bedrock... Until I discovered this.
If you’re on Windows, you need to enable Minecraft to be able to do loopbacks, and this is done using the mysterious command in an elevated cmd prompt:CheckNetIsolation LoopbackExempt -a -n=microsoft.minecraftuwp_8wekyb3d8bbwe
So I have done that and now Minecraft Bedrock will connect with my wss program.
I do not know if this was the situation before with Bedrock or if this will fix the code connection being able to work with bedrock or not. (I apparently never tried my program with Bedrock since I wrote it for Education But this past week I was working on learning about the Script API for bedrock and wondered if I could use that in conjunction with my WSS program)1 -
Hey HOSHINO HISASHI, I'm looking into this for you but it looks like some of the backend changes may have changed websockets. We're looking into this to see if there's any info we can get you, but I can't make any promises.
For what it's worth, thanks for using the template!!0 -
Justin-san, I believe this change has a very broad impact as Code Connection is no longer available in the Bedrock version as well.
Code Connection also plays an important role in the REST API call functionality, which allows Smart Speaker and Minecraft to work together.
I creating educational materials with this feature, which greatly expands the possibilities of Minecraft, so we would be very disappointed if it stops working in the next release.
We would appreciate it if you could open up the specifications and provide us with an environment where we can use it to create educational materials.
Currently, I developing an extension function in MakeCode for micro:bit and have just started to support internationalization.
Thank you for your comment!
0 -
Hi, all
Minecraft:bit demo on BedRock.
Demo of micro:bit v2 attached to a GROVE shield and displaying the number of block breaking events on a 4digit Display.
Confirmed to work with M:EE.
Special thanks to @faishasj ーsan!
0 -
Hi, I have the same issue. Is the problem solved? Are there any documents for the new JSON format of the websocket messages?
0 -
I would be also interested in the topic of websocket API. I started recently to search about it and I get only spreaded fractions of information. @Aleece would you be kind to share at least part of your program? I would gladly contribute to coding for such an application.
0 -
Aleece Landis HOSHINO HISASHI
I would also like to know how I can learn more about using the websockets in Minecraft Education Edition. I really like the idea that I can show my students that "things they do in our Minecraft (EE) world" can have an effect in the real world, for instance with a Philips Hue light or as per example with a Micro:bit.
Are there any links you can share with me to help me get started? Or would you care to write a brief mail on how you created this Micro:bit setup?Thanks a lot!
Niek (mcedu@uniek.solutions)
0 -
Bump, Im so interested and confused why it exists and seems to function but no official documentation exists?
Pick a lane as they say? Either nuke it or let us know how to properly leverage it please.
0 -
Hey there,
I believe the post from Micah in this thread 2 years ago is still the stance on this. Sorry for any inconvenience!
0 -
Thanks for posting the update Danny! We did un-publish the Code Connection app, so that part is no longer accurate since my last statement. It is still accurate that we still don't have any plans to publish documentation or promise any kind of public support for the internal websockets APIs. Minecraft Education does support the Bedrock scripting APIs once they are fully released and not in experimental, so as more and more of those are released, those are the the public, published, supported APIs that all of you (content creators and community) can use:
https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/?view=minecraft-bedrock-stableThanks,
Micah
0
Please sign in to leave a comment.
Comments
12 comments