Custom Widget - Stays in Loading State

I’m currently trying the Custom Widget in Workshop.
In order to do so, I followed the following tutorial / thread: https://community.palantir.com/t/how-to-create-a-custom-widget-for-workshop/2182
@ewitkon

Somehow my Custom Widget stays in a Loading State and won’t continue. See screenshot:

The code is the following:

  const workshopContext = useWorkshopContext(EXAMPLE_CONFIG);
  console.log(workshopContext.status)

  // Note: we can have a proper management of the state on loading etc.
  return visitLoadingState(workshopContext, {
    loading: () => <>LOADING...</>,
    // If the Workshop context was loaded successfully, we pass it to our custom widget
    succeeded: (value) => {
      console.log("Workshop context loaded successfully:", value);
      return <MyCustomWidget loadedWorkshopContext={value} />
    },
    reloading: (previousValue) => {
      console.log("Workshop context is reloading:", previousValue);
      return <MyCustomWidget loadedWorkshopContext={previousValue} />
    },

My config is the following:

import { IConfigDefinition } from "@osdk/workshop-iframe-custom-widget";


export const EXAMPLE_CONFIG = [
    {
        fieldId: "stringField", 
        field: {
            type: "single",
            fieldValue: {
                type: "inputOutput", 
                variableType: {
                    type: "string",
                    defaultValue: "test", 
                },
            }, 
            label: "string field", 
        }, 
    },  
]  as const satisfies IConfigDefinition;

In the Developer Console I get the following error:

Invalid change to widget config: ‘bidirectional’ → ‘id’ must be non-empty

But I’m not sure what’s meant by that?
Are there other ways I could further investigate the issue?

Hey @emmanuel1,

Your code and config look good, can you let me know the version of https://www.npmjs.com/package/@osdk/workshop-iframe-custom-widget you are on in package.json? The latest version is 1.0.6 so would recommend moving to that if you are not already on it.

Is this a persistent problem even if you create a new iframe widget and use your URL? Would you be able to post a screenshot of your widget’s metadata? Please feel free to exclude or redact any sensitive information if present in the raw widget configuration.

Seems to work now, was maybe a temporary thing.

Thank you for your help here.