phetsims / projectile-motion

"Projectile Motion" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
15 stars 13 forks source link

CT this.ariaValueText.replaceAll is not a function #237

Closed KatieWoe closed 3 years ago

KatieWoe commented 3 years ago
projectile-motion : build
Build failed with status code 1:
Running "report-media" task

Running "clean" task

Running "build" task
Building runnable repository (projectile-motion, brands: phet, phet-io)
Building brand: phet
>> Webpack build complete: 4824ms
>> Production minification complete: 30399ms (2115893 bytes)
>> Debug minification complete: 23414ms (3857432 bytes)
Building brand: phet-io
>> Webpack build complete: 3641ms
>> Production minification complete: 26892ms (2130219 bytes)
>> Debug minification complete: 26695ms (2388326 bytes)
>> No client guides found at ../phet-io-client-guides/projectile-motion/, no guides being built.
Fatal error: Perennial task failed: Error: TypeError: this.ariaValueText.replaceAll is not a function
at vb.updateAriaValueText (http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:1429695)
at http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:1429429
at n (http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:27780)
at s.emit (http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:98813)
at P._notifyListeners (http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:30499)
at P.set (http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:29867)
at http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:1442199
at b.link (http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:31328)
at new Ab (http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:1442179)
at new vb (http://localhost:40132/projectile-motion/build/phet-io/projectile-motion_all_phet-io.html?ea&brand=phet-io&phetioStandalone&phetioPrintAPI:846:1444695)

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Snapshot from 11/3/2020, 8:34:45 PM

----------------------------------

projectile-motion : phet-io-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/projectile-motion/projectile-motion_en.html?continuousTest=%7B%22test%22%3A%5B%22projectile-motion%22%2C%22phet-io-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1604460885640%22%2C%22timestamp%22%3A1604464198494%7D&ea&brand=phet-io&phetioStandalone&fuzz&memoryLimit=1000
Query: ea&brand=phet-io&phetioStandalone&fuzz&memoryLimit=1000
Uncaught Error: Assertion failed: timeToGround: NaN, previousPoint.velocity: Vector2(0, 0), previousPoint.acceleration: Vector2(0, 0), fromIf: true
Error: Assertion failed: timeToGround: NaN, previousPoint.velocity: Vector2(0, 0), previousPoint.acceleration: Vector2(0, 0), fromIf: true
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/assert/js/assert.js:22:13)
at Trajectory.step (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/projectile-motion/js/common/model/Trajectory.js:244:19)
at IntroModel.stepModelElements (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/projectile-motion/js/common/model/ProjectileMotionModel.js:328:44)
at EventTimer.step (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/phet-core/js/EventTimer.js:123:12)
at IntroModel.step (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/projectile-motion/js/common/model/ProjectileMotionModel.js:316:23)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/joist/js/Sim.js:299:22
at Action.execute (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/axon/js/Action.js:225:18)
at Sim.stepSimulation (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/joist/js/Sim.js:1002:31)
at Sim.stepOneFrame (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/joist/js/Sim.js:992:12)
at Sim.runAnimationLoop (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1604460885640/joist/js/Sim.js:970:12)
id: Bayes Chrome
Snapshot from 11/3/2020, 8:34:45 PM
jbphet commented 3 years ago

The replaceAll call was added by @jessegreenberg in https://github.com/phetsims/sun/commit/ea2451af4f1ae912d5711f37889cc6d56d289ef1. I'm not sure why it's only showing up in projectile-motion, but since this commit appears to have introduced the problem, I thought we'd start there. @jessegreenberg - please assign back to me if you come to believe that this is a sim-specific problem.

zepumph commented 3 years ago

https://github.com/phetsims/sun/issues/664 is the cause of this. Sorry it took so long for me to get to it. It is likely because puppeteer doesn't support String.prototype.replaceAll. I think this should fix it. @jessegreenberg will you review?

jessegreenberg commented 3 years ago

Using the regex looks good to replace here, thanks!