Another framing of the question above

Another framing of the question above. Can I render two Liveboards on one page with different liveboard ids?
15 Replies
Sammi
SammiOP2y ago
I get a "Duplicate token" error when doing so. How come?
bill_da_golfer
Yes, you should be able to render both in one page. They will be loaded into separate iframes. The duplicate token error seems like something related to the auth you are using.
Are you seeing multiple calls to get the token? Are you getting a fresh token for each new user? If you have the call stack that might help.
Sammi
SammiOP2y ago
There doesn't seem to be multiple calls to get the token. The scenario we have includes one user wanting to see the different boards One board loads fine and then I see the alert with the duplicate token error
bill_da_golfer
And you are using token based authentication?
Sammi
SammiOP2y ago
Yes we are using the cookieless trusted authentication We run init once and for one board it works. But when another board loads the error occur
bill_da_golfer
I am able to embed two liveboards. I'm not using React or trusthed auth. I suspect it's related to the auth in this case.
No description
billsaysthis
billsaysthis2y ago
We had a similar issue... can you post the code for your init call, especially the callback for the authentication?
Sammi
SammiOP2y ago
const authStatus = init({
thoughtSpotHost: 'https://companyNamy.thoughtspot.cloud/?customBrandingEnabled=true',
authType: AuthType.TrustedAuthTokenCookieless,
getAuthToken: () => getToughtSpotToken(),
disableLoginRedirect: true,
customizations: dashboardCustomizations,
});
const authStatus = init({
thoughtSpotHost: 'https://companyNamy.thoughtspot.cloud/?customBrandingEnabled=true',
authType: AuthType.TrustedAuthTokenCookieless,
getAuthToken: () => getToughtSpotToken(),
disableLoginRedirect: true,
customizations: dashboardCustomizations,
});
ashish
ashish2y ago
"There does not seem to be multiple calls to get the token" That seem to be part of the problem, each liveboard should issue a call to get its own token. That should be done automatically, but I suspect the getThoughtSpotToken method above is returning back the same token on multiple calls.
billsaysthis
billsaysthis2y ago
@Sammi we have similar code, can you post your code for the getThoughtSpotToken function?
Sammi
SammiOP2y ago
It's just an rest api call that returns a promise with the token After more investigation we've realised that we can have two boards on the same page but if they through for example a react re-render changes, it doesn't work Ideally we would want one board were the liveboard-id could change via react state but that needs a re-render and then it crashes
ashish
ashish2y ago
React rerender shouldn't be causing a crash. Can you please create a support ticket so that we can take a look ?
Sammi
SammiOP2y ago
We found a solution where we have to different liveboards
ashish
ashish2y ago
Good to hear @Sammi . Do you mind sharing breifly what was the solution ?
Sammi
SammiOP2y ago
Somehow it just started worked to have the two liveboards visible and using them on two different routes So we went with the solution to have each route rendering one liveboard each with a different liveboardId

Did you find this page helpful?