Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Connection checks failed. Input "OPERAND1" connection on "operator_and" block (id="W*RcL:x9[CVEU25V*XUf") expected Boolean, found String #767

Closed
griffpatch opened this issue Oct 13, 2017 · 7 comments
Assignees
Milestone

Comments

@griffpatch
Copy link

Expected Behavior

Project should load fully without failing silently with a partially loaded project.

Actual Behavior

The inverse of the above ;)

Steps to Reproduce

Load this project: https://llk.github.io/scratch-gui/develop/#126517840

lib.min.js:formatted:32939 Uncaught Connection checks failed. Input "OPERAND1" connection on "operator_and" block (id="W*RcL:x9[CVEU25V*XUf") expected Boolean, found String

I suspect this could well be caused by the use of a hacked block somewhere in the project, although I'm not 100% sure? However, the result is that if you click on the 'Game' sprite, the main green flag clicked script is not present in the project. I assume it (and lots of other scripts) failed to parse after the exception above occurred.

Operating System and Browser

Chrome (latest) on windows 10 PC

@paulkaplan
Copy link
Contributor

Yeah looks like a hacked block. It has a variable attached to the input of the and block:

hacked-block

Clearly exploding is the wrong behavior, but what is the right behavior. @thisandagain I'm not sure I have the context about hacked blocks to know what this should do, thoughts?

@towerofnix
Copy link
Contributor

towerofnix commented Oct 31, 2017

The two "correct" options:

  1. Just don't crash - let the variable reporter stick around inside the boolean slot.

  2. Transform the project upon loading - this.. a = a and (some variable) ..is equivalent to this: a = a and (some variable = not <>)

I'm not actually 100% sure that option 2 is correct (for instance, does sticking a non-boolean reporter inside of a boolean slot make the interpreter "truthy"/"falsey"-ify the reporter's value, or just strictly compare it with true?), and it's also a pretty complicated solution.

I'd think option 1 is better. Still need to consider how reporters in booleans should be treated, though - definitely don't want to break compatibility with old projects!

@thisandagain
Copy link
Contributor

thisandagain commented Oct 31, 2017

Good question @paulkaplan! Let's chat about it in-person this week.

@thisandagain thisandagain modified the milestones: Nov 15, Dec 20 Nov 1, 2017
@paulkaplan paulkaplan modified the milestones: December, January Jan 3, 2018
@thisandagain thisandagain modified the milestones: January, February Jan 3, 2018
@apple502j
Copy link
Contributor

I hope everything hacked(define block, input, etc) is "as is". Nobody likes to break projects.
I also know hacking is not official, but it's very popular, and a lot of projects use it.

@thisandagain
Copy link
Contributor

This has been discussed. We currently don't see a way for us to support all types of "hacked blocks" in Scratch 3.0. Some of the ways in which undocumented / unsupported behavior works in Scratch 2.0 may continue to work in Scratch 3.0 but we cannot guarantee anything. We will be putting checks in place to try to prevent hacked blocks from simply crashing the Scratch 3.0 editor however.

@Kenny2github
Copy link
Contributor

Carrying over information from #1673:

From @thisandagain:

Project should run normally:
https://scratch.mit.edu/projects/195483628/
Project loads, but does not run:
https://llk.github.io/scratch-gui/develop/#195483628

From @Kenny2github:

Actually, the project does seem to run, but anything involving pen (in this case, everything 😛 ) seems to not work. I'd imagine that's due to this error:
image

From @apple502j:

Oh, It uses JSON hacking!
maybe it causes the problem

All projects with it will be broken
unless hacking is also supported in 3.0

@thisandagain
Copy link
Contributor

Tracking in scratchfoundation/scratch-vm#1030

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

No branches or pull requests

7 participants