Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

BUG: Blockly + Safari(?) losing team programs #142

Closed
penrods opened this issue Nov 17, 2019 · 2 comments
Closed

BUG: Blockly + Safari(?) losing team programs #142

penrods opened this issue Nov 17, 2019 · 2 comments

Comments

@penrods
Copy link

penrods commented Nov 17, 2019

Yesterday at a meet I learned of a serious Blockly bug that is impacting young teams. Although I haven't experience it myself, the impact of this is serious enough that I think it needs addressed ASAP.

Apparent Sequence of Events:

  • Team writes code
  • Someone opens up Blockly on a Mac/iOS device, makes a change, saves it
  • Code runs fine on the robot
  • Coder reopens Blockly. All programs are gone.

According to a description/workaround on Reddit, the issue involves spaces being replaced by " " at some point in that cycle. I know Safari isn't recommended, but solving this sounds pretty simple and the consequences of doing something that appears to work are severe. With some effort is is possible to recover the programs, but novice teams are more likely to just start over and/or just get discouraged.

@cwm9cwm9
Copy link

cwm9cwm9 commented Nov 18, 2019

I am the person who wrote the Reddit post.

Spaces in identifier names within the downloaded file were replaced with their   equivalents. No other spaces were affected. The problem occured while saving from an iPad. The .xml importer could not interpret the file after this. No error was thrown.

I am attaching an example of the corrupt file. To be clear, only the affected file cannot be opened.

nbsp contaminated.zip

The file will not upload direclty until repaired. (Perhaps it is possible to direclty import the file manually for debugging purposes?)

A simple search and replace of   with a space on the downloaded .blk was sufficient to recover the file.

@lizlooney
Copy link

@cwm9cwm9 Your details were really valuable. I've tracked down the cause of the problem. Thank you!

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

No branches or pull requests

3 participants