fir0j opened a new issue, #24765:
URL: https://github.com/apache/superset/issues/24765

   A clear and concise description of what the bug is.
   - I'm using superset `@superset-ui/embedded-sdk` npm package in react to 
embed superset dashboard.
   - What I found is that, once the dashboard is rendered into the page by 
invoking `embedDashboard({})` like so
     ```jsx
      useEffect(() => {
       embedDashboard({
         id: "superset-dashboard-id", // given by the Superset embedding UI
         supersetDomain: "https://superset-bas-dev.bridge.propelmarine.com";,
         mountPoint: document.getElementById("superset-container") as 
HTMLElement, // any html element that can contain an iframe
         fetchGuestToken: async () => {
           console.log("fetchGuestToken");
           return guestToken;
         },
         dashboardUiConfig: {
           // dashboard UI config: hideTitle, hideTab, hideChartControls, 
filters.visible, filters.expanded (optional)
           hideTitle: true,
           filters: {
             expanded: false,
           },
         },
       });
     }, []);
      ```
   then fetchGuestToken is being called infinitely, which i expect it to be 
called only once.
   
   
   #### How to reproduce the bug
   
   1. Go to 'https://codesandbox.io/p/sandbox/dazzling-rain-p4qcjc'
   2. Click on 'new tab icon of code-sandbox's browser to open in new tab'
   3. Open the console of that new tab
   4. You will see "fetchGuestToken" being logged infinitely.
   
   ### Expected results
   The Dashboard should be rendered without running fetchGuestToken callback 
infinitely.
   
   what you expected to happen.
   The `fetchGuestToken` callback should be called only once, instead of 
infinitely.
   
   ### Actual results
   The `fetchGuestToken` callback  is being called infinitely, which i see as  
a problem.
   
   #### Screenshots
   If applicable, add screenshots to help explain your problem.
   
[Bug-image](https://drive.google.com/file/d/1tUS4gCGka4teoqfmfM5Ben1xxhUD8YUl/view)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to