alc-aaron - Hi! I have a question about what I ...

Hi! I have a question about what I am unsure is a bug or not. When I am using the AppEmbed I am seeing some things not load on the UI of the embed and additionally some console errors which I have not seen previously. The following is the code for the AppEmbed which has been working fine until an unknown moment we cannot pinpoint on our end as far as code changes are concerned.
export const Route = createFileRoute('/dashboard/$page')({
component: RouteComponent,
validateSearch: (search: Record<string, unknown>) => ({
reload: search.reload ? (search.reload as number) : undefined,
}),
params: {
parse: (params: Record<string, string>) => {
const { page } = params;
if (!Object.values(Page).includes(page as Page)) {
throw new Error('Invalid page');
}

return {
page: page as Page,
};
},
},
});

function RouteComponent() {
const { page } = Route.useParams();
const { reload } = Route.useSearch();
const embedRef = useEmbedRef() as React.MutableRefObject<AppEmbedType>;

return (
<ThoughtSpotErrorBoundary>
<AppEmbed
enableAskSage={true}
modularHomeExperience={true}
dataPanelV2={true}
liveboardV2={true}
key={reload ?? page}
ref={embedRef}
pageId={page}
fullHeight={true}
frameParams={embedFrameParams}
onLoad={() => {
const tsFrame = embedRef.current?.getUnderlyingFrameElement();
if (tsFrame && tsFrame.contentWindow) {
injectWalkMe();
}
}}
></AppEmbed>
</ThoughtSpotErrorBoundary>
);
}
export const Route = createFileRoute('/dashboard/$page')({
component: RouteComponent,
validateSearch: (search: Record<string, unknown>) => ({
reload: search.reload ? (search.reload as number) : undefined,
}),
params: {
parse: (params: Record<string, string>) => {
const { page } = params;
if (!Object.values(Page).includes(page as Page)) {
throw new Error('Invalid page');
}

return {
page: page as Page,
};
},
},
});

function RouteComponent() {
const { page } = Route.useParams();
const { reload } = Route.useSearch();
const embedRef = useEmbedRef() as React.MutableRefObject<AppEmbedType>;

return (
<ThoughtSpotErrorBoundary>
<AppEmbed
enableAskSage={true}
modularHomeExperience={true}
dataPanelV2={true}
liveboardV2={true}
key={reload ?? page}
ref={embedRef}
pageId={page}
fullHeight={true}
frameParams={embedFrameParams}
onLoad={() => {
const tsFrame = embedRef.current?.getUnderlyingFrameElement();
if (tsFrame && tsFrame.contentWindow) {
injectWalkMe();
}
}}
></AppEmbed>
</ThoughtSpotErrorBoundary>
);
}
We are using "@thoughtspot/visual-embed-sdk": "^1.35.10"
No description
4 Replies
shikharTS
shikharTS3w ago
Can you DM me HAR file for the same Also do you see the same issue when logging through the TS App? It is possible that something was deleted in the liveboard(maybe the liveboard itself or a view on liveboard) which contained the KPI in your watchlist. Hence you are getting this error. Can you create a support case for this? The relevant team should be able to help you. I don't think this is due to your code, but due to some TS object being deleted..
alc-aaron
alc-aaronOP3w ago
I do see the same when opening via the TS App. That makes sense what you described, let me verify that before opening a request.
shikharTS
shikharTS3w ago
Yes, I see internally a ticket with this same issue, seems it is identified. You can create a ticket with support to see what the next steps might be..
alc-aaron
alc-aaronOP3w ago
Thanks we have!

Did you find this page helpful?