LookerEmbedSDK

I'm trying to embed a dashboard using lookerEmbedSDK in my react App.
I want to retrieve the dashboard so I can add parameters and filters based on certain user actions.
The thing is on dashboard loaded is not being triggered I don't know.
tHe dashboard is being loaded successfully and the /User endpoint is being reached and the user is getting authenticated.
This is my code 

    LookerEmbedSDK.init("https://orgname.cloud.looker.com", "http://localhost:8080/User");
 LookerEmbedSDK.createDashboardWithId(4)
      .appendTo(el)
      .on('dashboard:loaded', ()=>{console.log("dashboard loaded")})
      .build()
      .connect()
      .then((dashboard) => {
        console.log("Dashboard connected");
        dashboard.on("dashboard:loaded", () => console.log("Dashboard loaded"));
        dashboard.on("dashboard:run:start", () => console.log("Event: dashboard run started"));
        dashboard.on("dashboard:run:complete", () => console.log("Event: dashboard run completed"));
        dashboard.on("dashboard:error", (error) => console.error("Dashboard error event:", error));
      })
      .catch((error) => {
        console.error("An unexpected error occurred", error);
      })
      .finally(() => {
        console.log("Initialization process finished");
      });

 any idea why?

0 1 114
1 REPLY 1

If this is an existing Dashboard, I would consider having the corresponding Dashboard in the Shared Folder, there is a common issue when the Dashboard or Look has not been shared previously. Second if this is an existing dashboard I believe you are missing:

.then(setupDashboard)