cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DianaBirkelbach
Super User
Super User

Harness Bug: wrong data input value breaks the Harness

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.

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
1 ACCEPTED SOLUTION

Accepted Solutions

@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.

View solution in original post

6 REPLIES 6
v-siky-msft
Community Support
Community Support

@DianaBirkelbachDo you mind sharing the Manifest and index.ts files? so we can reproduce your issue.

Sik

@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

 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@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.

View solution in original post

a33ik
MVP

@HemantG @AnqiChen 

Issue that blows up Harness is related to formatting of negative values - it should be straight forward fix on your side. Check project attached as an example to reproduce.

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.

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

It worked like a charm 😀 So  the cache was in the localStorage. Thanks a lot! 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,349)