What is up with Running Scripts?


I was wondering why some scripts were not running correctly and then noticed I didn’t have icons for some things. I looked in Running scripts and noticed some things missing.

I’ve been using my own “defaultscripts.js” for a bit now and have modded it to replace stuff and add others. Not sure what is going on but my old link to marketplace.js doesn’t seem to work but when I run the defaultscripts.js from the list, It works.

I can not tell if the URL is different for marketplace.js because selecting scripts no longer shows path. In fact I can not even seem to select scripts in running scripts to stop them or reload or anything.

This might explain why CADavid’s inspect only works some of the time for me now and some other stuff seems busted.

I guess my question is: is this expected new behavior? Or am I missing something?


This was an oversight when porting from the widget based dialog to the overlay version. We have a bug on the backlog to fix it. It’s likely a fairly small fix so it might get folded into one of my (almost daily) small QML fixes PRs.

Right now there’s no visual indication of selection, but if you hit the reload or stop icons next to a script, they should function. For reloading they should vanish briefly and reappear in the list. If you’re not seeing that, you might try to use a test script that prints something out on startup to see if it’s just happening too quickly?


Tried reloading a script or two … some load so fast that when reloading them you don’t necessarily notice them going away and then reappearing in the list again, while others like edit.js are very noticeable. … Program log is useful for seeing what’s going on.


I am still having problems with loading scripts.

I am using a modified defaultScripts.js that I have at:

It is the same as the default defaultScripts.js except I’ve replaced the inspect.js with @ctrlaltdavid’s inspect.js and added the record.js. It looks like this:

// defaultScripts.js
// examples
// Copyright 2014 High Fidelity, Inc.
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html


To test I start interface, open Edit menu -> Running Scripts…

Then I click on Stop all, which clears the list and stops them all.
Then I load the new scripts by clicking on Load Scripts From URL
and paste in the above link.

The scripts load, icons appear and all looks OK except that marketplace.js did not run. It is not on the list and no icon is showing. At first I thought I had done something stupid… like misspelled the name (maybe it was “marketPlace”, but no), or that the icon was just moved out of view, but after resizing the window, it still did not appear and besides, not on the running scripts list so I think it never loaded.

I then scrolled down in the Load Scripts list and found marketplace.js and checked the URL.
Seems to be the same as all the others. And when I clicked on load, it loaded fine, icon appears and works the way it should.

I then looked through the log to try to see what happened but did not find any trace of it being loaded. But I did notice that an entity script I was using to load my text to speech voice greeter in the domain was loading, but it too does not show up in running scripts anymore and does not function anymore either. It did work a week or so ago and had been working for months.


@Twa_Hinkle When I try to load defaultScripts.js from URL using the link in your post I get a whole lot of “can’t load script” for all the scripts with the relative pathnames (i.e., everything except my inspect.js). Instead of loading from S3 do you copy it to a local directory and run it from there?


Interesting. I thought that might be a problem but it used to work and because I never got “can’t load script” errors and once I added the record.js script, which worked ok, I thought that wasn’t worth testing.

But you are right, I should change them all to either explicit URLs with full path or copies that I host. Maybe that will fix it.

One thing though, if I have to make copies of everything, that sure would be a drag because then I would have to keep them all up to date and all of this used to work a few weeks ago, although it is hard to know for sure because if I was just loading them from cache then I would not have known.

At one point early on I thought I had tried full path for the marketplace.js script and didn’t work, but I could be wrong … either that or maybe relative paths are based on last full URL

I will try changing them tomorrow and post back what I’ve learned. Thanks for the good idea David.


Yeah, I use a modified defaultScripts.js that explicitly loads all the default scripts from HiFi’s S3 where they’re normally loaded from except that I load my own version of inspect.js plus my chat.js. … http://ctrlaltstudio.com/downloads/hifi/scripts/defaultScripts.js … and I periodically check the “official” defaultScripts.js for any changes that I should replicate…


This morning I changed all the URLs to full paths then stopped all running scripts and closed interface. Then started it back up and loaded my defaultScripts.js from URL.

Unfortunately I got the same result. They all loaded except for the marketplace.js.

I was about to give up on it when I decided to try one more thing. This time I stopped all scripts and then cleared all caches with the reload content menu button. I then stopped interface and restarted it.

When I loaded my defaultScripts.js from URL this time, it worked!

I am not sure why the marketplace.js script would be different from the others except I did notice that there seems to be some kind of authorization process going on when that script is run. Oh well… as long as it works. Now back to other things … whew.