-
Notifications
You must be signed in to change notification settings - Fork 2
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
AriaLiveAnnouncer: Assertion failed: value failed isValidValue: [object Object] on reset all #113
Comments
We investigated this and there appears to be a problem in the state validator in OrIO. It doesn't expect the Index: js/types/OrIO.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/types/OrIO.js b/js/types/OrIO.js
--- a/js/types/OrIO.js (revision 264f9ebf1c92925159221614c509edbb1aea182e)
+++ b/js/types/OrIO.js (date 1648512393115)
@@ -67,7 +67,11 @@
return parameterTypes[ stateObject.index ].fromStateObject( stateObject.state );
},
stateSchema: StateSchema.asValue( `${typeNames.join( '|' )}`, {
- isValidValue: isValidValue
+ isValidValue: stateObject => {
+ return isValidValue( stateObject.state ) &&
+ stateObject.hasOwnProperty( 'index' ) &&
+ typeof stateObject.index === 'number';
+ }
} )
} ) );
}
@zepumph can you please advise? |
…ance.toStateObject to use IOType to serialize, phetsims/center-and-variability#113 phetsims/tambo#160
…ance.toStateObject to use IOType to serialize, phetsims/center-and-variability#113 phetsims/tambo#160
Yes thanks. There were two issues. The first was that I was causing a problem in Utterance. The second is that our error handling was incorrect for OrIO so the problem was hard to realize (hence your horrid message above). Basically Utterance.toStateObject wasn't using OrIO to get the index/state object, so the state object was invalid. I also realized that the validator for OrIO was totally wrong, because it didn't use the same state object recursive checking that needed to occur at each level. So pretty much phetsims/utterance-queue@d85db29 fixed the bug, and phetsims/tandem@fe151c2 made it so that we could use OrIO on more complicated state objects like ChargedParticleIO which gets partial state from different levels in its IOType hierarchy. Did this fix things for you as well? |
Yes, it looks much better, thanks! |
@chrisklus and I confirmed this is fixed in in #122, closing. |
While working on #99, @chrisklus and I discovered this error when pressing reset all:
The text was updated successfully, but these errors were encountered: