Reuploaded FTC Blocks editor

76 views
Skip to first unread message

Ace

unread,
Aug 19, 2024, 5:27:58 PM8/19/24
to Blockly
In FTC one of the ways you can code is with blocks, we are switching to java and id like to be able to easily access the blocks because you can see the java translation. You are able to locally download the tool and run the index.html file. When I reuploaded this to github pages it doesn't work. How can I fix it?

https://github.com/TechHeroes5321/FtcBlocksEditor https://techheroes5321.github.io/FtcBlocksEditor/

Mark Friedman

unread,
Aug 19, 2024, 7:05:15 PM8/19/24
to blo...@googlegroups.com
This doesn't really have anything to do with Blockly per se, but I took a look at your web app and your code.  The first thing I did was to look at your browser's console log.  From there I saw some errors like:

Uncaught ReferenceError: URI_HARDWARE is not defined
    at fetchJavaScriptForHardwareViaHttp (hardware_util.js:58:19)
    ...

and 

Uncaught ReferenceError: PARAM_NAME is not defined
    at newProjectViaHttp (project_util.js:239:16)
    ...

Then I took a look at the code in the files mentioned on those stack traces and saw:

// The following are generated dynamically in ProgrammingModeServer.fetchJavaScriptForServer():
// URI_HARDWARE
// PARAM_NAME

So, it seemed relatively clear that those variables need to be defined by calling some function called fetchJavaScriptForServer, but you don't have any such function defined in your code.  Doing some further software archeology, I believe that this comes from some code that you can see here (although I suspect the original genesis for this code was from our friend Liz Looney).  The bottom line is that if you want to run this code unchanged you'll probably also need to run a Java server like the one in the OpenFTC/OpenRC-Turbo repo.

Hope this helps.

-Mark


On Mon, Aug 19, 2024 at 2:27 PM Ace <asherec...@gmail.com> wrote:
In FTC one of the ways you can code is with blocks, we are switching to java and id like to be able to easily access the blocks because you can see the java translation. You are able to locally download the tool and run the index.html file. When I reuploaded this to github pages it doesn't work. How can I fix it?

https://github.com/TechHeroes5321/FtcBlocksEditor https://techheroes5321.github.io/FtcBlocksEditor/

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/bb8e6707-7fb5-4488-8444-d5cce5fe167bn%40googlegroups.com.

Liz Looney

unread,
Aug 20, 2024, 11:35:10 AM8/20/24
to Blockly
Ace,

The best place to ask questions about FTC Blocks is https://ftc-community.firstinspires.org/

Mark, Thanks for looking into this.

-Liz
Reply all
Reply to author
Forward
0 new messages