Blocks: all pages

Troubleshooting

Common problems in Blocks and how to fix them. If your problem is not here, write to the team with Report a bug. In the message, include the open example, the last button or key you pressed, the exact text on the screen and your browser.

Check the status indicators first

Indicator Meaning What to do
Orange notification, for example "Block project downloaded." The job is done. The notification disappears after 5 seconds. You do not need to do anything.
Red notification, for example "Copy failed." The job could not be done. The notification disappears after 5 seconds. Look for its text in the headings on this page.
The Password (min. 8) box has a dark orange border, with "The password needs at least 8 characters, or the code will not compile." below it The password has 1-7 characters. The password needs at least 8 characters
"// No blocks added yet" in Code Preview That lifecycle block is empty. "// No blocks added yet" appears
A block that looks faded The block is disabled and does not go into the code. Right-click the block and select Enable Block.
"There is no ... named ..." warning on an FTC block The block uses a device name that is not in the Robot configuration. The device is not in the configuration
"This name is already in use." or "A name must start with a letter ..." below the Robot configuration list The device name you typed was not accepted, and the old name came back in the box. A name must start with a letter, This name is already in use
"// Could not generate Java: ..." in the OnBot Java section FTC Blocks could not generate Java code from this program. Could not generate Java

Project and saving

A different project came back after a refresh

Cause: If you load an example and do not change any block, the browser does not save the example's blocks. When the page is refreshed, the previous save comes back, but the Project box keeps the example's name. If you cleared your browser data, the save is deleted too.

Fix: To keep a lasting copy, download the project as a .probot.json file.

Warning

Before you refresh the page or close the browser, save with Download blocks. The save in the browser can miss part of your work without a warning.

  1. In the toolbar, press Download blocks to save your work to a file.
  2. Refresh the page, or close the browser and open it again.
  3. Press Load blocks and select the file you downloaded.

Result: The project comes back the way it was when you downloaded it.

See Save the project, open it and start over.

The network name or channel changed after a refresh

Cause: The network name and channel in a file you open with Load blocks are not saved in the browser. When the page is refreshed, the earlier values come back. The project name and the password from the file are saved.

Fix: After the refresh, open the same file again with Load blocks. To make the values stay, change the network name and the channel by hand once in the Robot WiFi section. A value you type or select from the list is saved in the browser.

See How autosave works, Set up the robot WiFi.

Picking an example deleted my program

Cause: Pick an example and Load blocks put the new program in place of the open one, and they do not ask first.

Fix: Before you pick an example or load a file, save with Download blocks (Probot) or Download .blk (FTC). In Probot mode this cannot be undone: Ctrl+Z does not bring the old program back. The only way to get the old program back is to open the file you downloaded with Load blocks.

In FTC, you can click the workspace and press Ctrl+Z (twice if needed) to bring the old blocks back. Ctrl+Z brings back only the blocks: the Robot configuration, the OpMode name, Type and Group do not come back.

See Save the project, open it and start over, Save the program, open it and get the Java code.

"Could not load the block project." appears

Cause Fix
The file you selected is not a .probot.json file. Select a file you saved with Download blocks.
The file is damaged, or it has a block that the tool does not have. Try another copy of the file. If you have none, use Report a bug to tell us about the file.

See Save the project, open it and start over.

"This file is not an FTC Blocks (.blk) file." appears

Cause: In FTC Blocks, Load .blk opens only .blk files. It cannot open a .java file or a Probot file.

Fix: Select a .blk file you saved with Download .blk.

See Open a saved .blk file.

WiFi

The robot's WiFi password changed

Cause Fix
You downloaded the code from another browser or computer. Each browser generates and keeps its own password. In that browser too, type the same password by hand into the Password (min. 8) box.
The saved password in this browser was deleted: you did not open Blocks for 30 days, or you cleared your browser data. Blocks generated a new password. Type the password you wrote down into the box again.

See Set up the robot WiFi.

"The password needs at least 8 characters, or the code will not compile." appears

Cause: The Password (min. 8) box has 1-7 characters.

Fix: Type at least 8 characters into the Password (min. 8) box. The dark orange border of the box and the warning text go away.

The box accepts only the letters A to Z, digits and -, and it turns lowercase letters into capital letters (ı becomes I too). Other Turkish letters and spaces cannot be typed, so you may end up with fewer characters than you expect.

See Set up the robot WiFi.

Code

A block I added is not in the code

Cause Fix
The block is not attached inside a lifecycle block (for example teleopLoop). Drag the block into the slot of the lifecycle block until it snaps into place.
The block looks faded, which means it is disabled. Right-click the block and select Enable Block.

"// No blocks added yet" appears

Cause: The lifecycle block for that part of the code in Code Preview is empty.

Fix: This is not an error. The robot does nothing in that part. If you want something to happen there, attach blocks inside the lifecycle block.

"Copy failed." appears

Cause: The browser did not allow writing to the clipboard.

Fix: Download the file instead. In Probot mode, press Download .ino. In FTC mode, press Download .java.

See Copy or download the code, Save the program, open it and get the Java code.

Compile error in Arduino IDE

Cause Fix
The code was changed after you got it from Blocks. Get the code from Blocks again and paste it without changing it.
The probot-core library is not installed. Install the library: Upload the code to the Probot board.
The WiFi password is shorter than 8 characters. The password needs at least 8 characters

See Upload the code to the Probot board.

FTC

"There is no ... named ... in the current robot configuration" warning

Cause: The block uses a device name that is not in the Robot configuration.

Fix: Add a device with the same name, or select an existing device from the dropdown on the block.

See Set up the robot configuration.

"A name must start with a letter and can only use letters, numbers and _." appears

Cause: The device name starts with a digit, or it has a space, a Turkish letter or a hyphen. The old name comes back in the box.

Fix: Type a name that starts with a letter and has only letters, digits and _. For example solMotor.

See Set up the robot configuration.

"This name is already in use." appears

Cause: The configuration already has a device with the same name.

Fix: Type a different name.

"Could not load the example because the connection dropped. Pick it again." appears

Cause: The example file did not download completely from the internet.

Fix: Check your internet connection and pick the example again.

"// Could not generate Java: ..." appears

Cause: FTC Blocks could not generate OnBot Java code from this program. The rest of the text says what went wrong.

Fix: Click the workspace and undo the last change with Ctrl+Z. If the text does not go away, press Download .blk to download the program. Then use Report a bug to send us the exact text.

The mouse wheel zooms instead of scrolling

Cause: In FTC Blocks, the mouse wheel zooms.

Fix: To move around the workspace, drag an empty spot.

See Shortcuts.

Sim does not see the program

Cause: Blocks and Sim are not open in the same browser.

Fix: Open Sim in the browser where you opened Blocks. If you are in a different browser, get the file with Download .blk, then in Sim press Dosya aç (.blk, .java) (Open file). Sim's interface is in Turkish for now.

See Try the program in Sim.

Screen

"Coding tool is in development" card appears every time

Cause: The card opens on every visit.

Fix: Press Got it, continue or Esc to close it.

The blocks do not fit on a phone

Cause: Blocks is made for a computer.

Fix: You can look around on a phone, but use a computer to write programs.

On this page
Check the status indicators firstProject and savingA different project came back after a refreshThe network name or channel changed after a refreshPicking an example deleted my program"Could not load the block project." appears"This file is not an FTC Blocks (.blk) file." appearsWiFiThe robot's WiFi password changed"The password needs at least 8 characters, or the code will not compile." appearsCodeA block I added is not in the code"// No blocks added yet" appears"Copy failed." appearsCompile error in Arduino IDEFTC"There is no ... named ... in the current robot configuration" warning"A name must start with a letter and can only use letters, numbers and _." appears"This name is already in use." appears"Could not load the example because the connection dropped. Pick it again." appears"// Could not generate Java: ..." appearsThe mouse wheel zooms instead of scrollingSim does not see the programScreen"Coding tool is in development" card appears every timeThe blocks do not fit on a phone