When developing a PCF OptionSet Control in the Harness, I've clicked on the "up/down" arrows to change the Input Value (spin up/down) and I happened to come to the value -1. After that the Harness breaks, and a complete white page is shown.
The problem is that I had no idea how to fix that: closing the harness didn't fix it. It seems that the value is cached somewhere, but I didn't know how to change it (in the beginning I thought there is something wrong with my code).
I've attached a screenshot with the console log.
I fixed it by accident, by renaming my property in the manifest.
Until the bug is fixed, maybe you can also tell me a better way to fix the harness when something like this happens.
It worked like a charm 😀 So the cache was in the localStorage. Thanks a lot!
You can also do it from within your browser's command line when you are in the harness.
Just type localStorage.removeItem(<Your Control Name>_properties);
and then refresh the page.
@DianaBirkelbach I was able to replicate issue that is similar to yours and I was able to fix it. That "cached" values that you mentioned are stored inside local storage of browser and here are steps to perform to fix it (I provide it for Chrome but I believe steps for other browsers will be similar):
1. Click f12 to open Developer Tools.
2. Open "Application" tab and look for "Local Storage" there, open it.
3. Look for "Harness" url inside (it should look like "http://127.0.0.1:8181") and click on it.
4. In the list on the right look for "<Your Control Name>_properties". Once found - right click -> Delete.
That fixed issue for me.
@v-siky-msft Sure. I've actually took an example from the sdk examples: ComponentStateAPI and changed the control type in "OptionSet", and deleted the whole code inside. So basically nothing inside.
As soon as you come to "-1" inside the value input in the harness, you cannot use the harness anymore (empty page).
Diana
@DianaBirkelbachDo you mind sharing the Manifest and index.ts files? so we can reproduce your issue.
Sik
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1