Affonso-Gui/scratch3-ros-vm

I try to import turtlesim.sb3,but throw faile

Closed this issue · 6 comments

error log:
gui {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}],"sb3Errors":[{"keyword":"type","dataPath":".targets[0].variables['9_U%QrPLs9yyowtg4_xp'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf/0/type","params":{"type":"string"},"message":"should be string"},{"keyword":"type","dataPath":".targets[0].variables['9_U%QrPLs9yyowtg4_xp'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf/1/type","params":{"type":"number"},"message":"should be number"},{"keyword":"oneOf","dataPath":".targets[0].variables['9_U%QrPLs9yyowtg4_xp'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf","params":{"passingSchemas":null},"message":"should match exactly one schema in oneOf"},{"keyword":"type","dataPath":".targets[0].variables['9_U%QrPLs9yyowtg4_xp'][1]","schemaPath":"#/oneOf/1/type","params":{"type":"boolean"},"message":"should be boolean"},{"keyword":"oneOf","dataPath":".targets[0].variables['9_U%QrPLs9yyowtg4_xp'][1]","schemaPath":"#/oneOf","params":{"passingSchemas":null},"message":"should match exactly one schema in oneOf"}]}
./node_modules/minilog/lib/web/formatters/minilog.js.logger.write @ minilog.js:17
onItem @ transform.js:31
emit @ index.js:26
./node_modules/minilog/lib/common/filter.js.Filter.write @ filter.js:52
onItem @ transform.js:31
emit @ index.js:26
./node_modules/minilog/lib/common/transform.js.Transform.write @ transform.js:15
o.warn @ minilog.js:11
(anonymous) @ sb-file-uploader.jsx:138
Promise.catch (async)
onload @ sb-file-uploader.jsx:136
wrapper @ index.js:550
load (async)
componentWillMount @ sb-file-uploader.jsx:65
callComponentWillMount @ react-dom.development.js:6370
mountClassInstance @ react-dom.development.js:6435
updateClassComponent @ react-dom.development.js:7840
beginWork @ react-dom.development.js:8225
performUnitOfWork @ react-dom.development.js:10224
workLoop @ react-dom.development.js:10288

Hello, and thx for re-posting the issue on this repo.

As I said, it looks to me that we might be having some troubles with the json objects implemented at https://github.com/Affonso-Gui/scratch3-ros-parser.

Testing now I was able to run the turtlesim example normally from my PC, so a few more questions so we can determine the exact problem:

  1. Are you running from source or directly from http://scratch3-ros.jsk.imi.i.u-tokyo.ac.jp/ ?
  2. What is your browser?
  3. What is your operating system?

1 running from source
2 chrome
3 ubunutu

Making both scratch-vm/node_modules/scratch-parser and scratch-gui/node_modules/scratch-parser have the same contents as the https://github.com/Affonso-Gui/scratch3-ros-parser repo should solve the problem.

This should be done automatically by the npm link commands, but for a quick fix you can just hard-copy them.

(Will have some further look into the npm link things tomorrow and maybe update the README with more detailed instructions)

oh, tank bro

hi, I'm sorry to ask you for help agin.

I tried to run from source before. When I enter the master URL, I can only enter 'localhost'. Otherwise, scratch will report an error.I can't enter a specific IP address

such as, I enter master url: '192.163.106' :

error log:
gui Unhandled Error: Error: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

@zy0228 Created a new issue at #5 to discuss about the problem