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

Possible issue with Scratch API/HTTPS #299

Open
oskay opened this issue Mar 21, 2018 · 0 comments
Open

Possible issue with Scratch API/HTTPS #299

oskay opened this issue Mar 21, 2018 · 0 comments

Comments

@oskay
Copy link
Contributor

oskay commented Mar 21, 2018

TLDR: Control from Snap (and possible other similar interfaces) is currently broken.

Filing this under Robopaint for the moment, but may be more appropriate under https://github.com/techninja/cncserver/issues/ .

With RP open, if I run commands like localhost:4242/pen.up in a browser, that works well. However, trying out the same command in Snap, as with the https://github.com/evil-mad/WaterColorBlocks examples, does not work with current versions of Snap.

On older versions of Snap (pre-4.1), there was a http:// block, to retrieve the specified URL (less protocol), that worked quite well.

With Snap 4.1, the block was changed to url, and retrieves the specified URL, but defaults to https if no protocol is given. You can get around this by explicitly calling the protocol, as in: http://localhost:4242/poll-- and we've just rolled that set of changes to WaterColorBlocks.

Unfortunately, that's only part of the solution. Adding the explicit http:// allows Snap to work if (and only if) it's downloaded to your computer. (Download a source code zip from https://github.com/jmoenig/Snap--Build-Your-Own-Blocks/releases and open snap.html .)

Normally, running snap from within your browser, one runs it online, and under https. My impression is that this will not allow an http connection to localhost. (See here, for example: jmoenig/Snap#2048 (comment) )

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

No branches or pull requests

1 participant