My old m5f file could not open with new uiflow web why?



  • I upgrade my m5stack and than i try to code it with my old m5f file. But ide or web based uiflow not open my file....
    Why it is happened? how can i rescue my file?



  • Hi @Mustafaturgut

    yes, I can confirm, m5f files saved with previous UIFlow version (1.7.8 in my case) do not load in UIFlow 1.8.0 anymore.

    Nice going, M5Stack. I must assume you still do not have any regression tests in place whatsoever. That is a real pity.

    And if this issue isn't just between Mustafaturgut and me you'll have a lot of unhappy customers right now.

    Thanks
    Felix



  • @mustafaturgut and @felmue

    Thanks for the heads up to not give v1.8.0 a try yet. Looking at the Chrome Developer Tools console, this is the error...

    TypeError: Cannot read property 'map' of undefined
        at l.openM5F (main.0403ae3b639489d97cfe.js:1)
        at l.M5F_create (main.0403ae3b639489d97cfe.js:1)
        at FileReader.e.onload (main.0403ae3b639489d97cfe.js:1)
        at t.invoke (polyfills.f72bb0aeb8864eb8b3c6.js:1)
        at Object.onInvoke (main.0403ae3b639489d97cfe.js:1)
        at t.invoke (polyfills.f72bb0aeb8864eb8b3c6.js:1)
        at e.runGuarded (polyfills.f72bb0aeb8864eb8b3c6.js:1)
        at FileReader.<anonymous> (polyfills.f72bb0aeb8864eb8b3c6.js:1)
    

    @m5stack please fix and while you are at it, include multiple beta versions to choose from on the uiFlow web IDE to help avoid situations like this.... or do more thorough testing before releasing!



  • Not a fan of writing in forums, but the issue is important. I cannot load pre 1.8 m5f. i am sad.



  • @desarrollogis, @Mustafaturgut, and @felmue

    I have a workaround until @m5stack fixes it on the server side. The error was introduced because of the new Remote+ blocks in v1.8.0. So to fix your old file, open the .m5f file in a text editor and manually edit it. The bottom of the file should look like this, with the Blockly.RemotePlus section being the new code. You should also test your new file in a JSON validator to ensure you have the right syntax (commas in the right place, etc.). You might have code in the modules section if your program uses any modules.

      "Blockly.Remotes": [],
      "Blockly.RemotePlus": [
        {
          "createTime": 1625322052382,
          "name": "M5Remote",
          "dragAndDrop": false,
          "resizable": false,
          "color": "#fff",
          "bgColor": "#0080FF",
          "type": "title",
          "id": "__title"
        }
      ],
      "modules": []
    }
    

    I have only done a quick test of this workaround to ensure the file loads on uiFlow web IDE v1.8.0 and that I can also download the new file to my device. Seems okay for now, but there are some additional Blockly deprecation messages in the Chrome developer tools console that concern me.

    Edit: looks like someone beat me to it. The workaround was also mentioned here but I didn’t see it.
    https://community.m5stack.com/topic/3428/uiflow-1-8-0/2



  • Hello @world101

    you are a genius. Thank you for the workaround. Works like a charm.

    Thanks
    Felix