Hi team, I've been struggling with
Hi team, I've been struggling with something that should be very simple... How can I get the Answer name?
Details:
I have a SearchEmbed that when we save it we have the name and description given by the user... I would like to get this information but I am not able to find any event or prop such as
LiveboardInfo
for liveboards...28 Replies
I thought about making requests to TS using the API to get this information... but I am getting some blockers with that + I am pretty sure there is an easier and direct way of getting the answer name...
Available with 1.29.2 of the SDK
Thanks @ashish you are the best!
I was about to report some console.logs in the code but I saw that you already removed them as well!
https://github.com/thoughtspot/visual-embed-sdk/commit/de069c7752ba50d8ad916c0616c36fe712d66200
Last question on this topic.
I am able to save answers properly using events, however, the above-suggested code does not work unless I am also logged on ThoughtSpot with my main user.
Regular users that are not logged on TS will get a non-authorized error.
I thought the
embed.current.getAnswerService()
would already handle the auth as it did for the embed.current.on(EmbedEvent.Save, (response) => ...))
.
Am I missing something? Or could it be a bug?
This is what I get as a regular user:POST https://<myhost>/prism/?op=GetAnswer 401 (Unauthorized)
I see, you might be using one of the cookieless authentications. This is a miss on the SDK side. Let me fix and publish a new version for you.
That is right, I am using cookieless auth.
Thanks!!!
Published 1.30.0, please check it out.
[A bigger text but it is to be helpful and give you as much information as possible]
Hi @ashish, it seems that we are almost there. In fact, now with the new version I am authenticated and can fetch data perfectly when I keep the "Make this answer discoverable" checkbox checked ✅ .
However, if I try to save a New Answer and uncheck the "Make this answer discoverable", it gives me an error (the session returns as
undefined
after a few seconds) ❌.
Something curious is that when I called the service
(embedRef.current.getAnswerService()) two times, I was able to get the session for the answer (<see_image_2>), then the AnswerService successfully store the Answer, but even though I got this error:
It saves the Answer, but gives me this error on my application.
Is that possible that there is either a security feature around the "Make this answer discoverable" or some kind of delay when this option is selected?
Thank you so much for your assistance, let me know if I can help sharing anything else.A 2nd error that I am getting is:
- If I create an Answer with User A, User B is not being able to open this Answer regardless of the "Make this answer discoverable" is checked or not. ❌
- In case of User A = Admin, User A can open Answer from User B (regular user) ✅
- User B (regular) can open his own Answers ✅
I am attaching the error.
if possible @Geovane can you share the HAR files ?
Hi @Justin Mathew ! Thank you for the message. I will send you the files in a Direct Message
@Geovane can you send here itself , so others also have access to it.
It might have private/company's information on the files, that is why I try to be careful 🙂
i see, np i ll share with internal team
i've shared the details with my team , will let u know
cc: @shikharTS
Thank you!!!
Hi @Justin Mathew , were you able to get any ETA on those 2 reported bugs?
Is there something that I could do on my side to help?
- Just a reminder that I am using
TrustedAuthTokenCookieless
.
- I also repeated the tests on SDK 1.31.1
and the problem persists.
Thanks for the assistance 🙌 .@Geovane let me get back to my team and confirm
@Geovane https://discord.com/channels/1143209406037758065/1267887771457159218/1268268992695636061
i see this is the same
Thank you @Justin Mathew ! 🙌
Hi @Justin Mathew @ashish do you have any news about this bug?
I updated to the newest version and it is still happening.
On the new version it looks like there is even another issue with the GetAnswer: <attached_image>
Is it better if I create a support ticket?
Are you using events to call this getAnswer API or the TS app itself is throwing this error?
This is how I am calling the AnswerService:
But this is for the new error. However, the original error in the thread is still happening...
- However on the latest version seems to be worse... before it was failing only when the answer was NOT discoverable...now it does not work anymore regardless if it is discoverable or not
Here are the values of
service
when I debug it: <attached_image>I will create another thread for that @shikharTS , but in general, we have been having a couple of issues on this related topic. Is there a way to increase the priority of it?
On the attached image for example, the TS Platform internally says that an Answer that was just created, was last viewed 2 months ago...
Another issue related to the Answer / Discoverability was this one I reported here too: https://discord.com/channels/1143209406037758065/1267887771457159218/1268268992695636061
Answer/Discoverability has been fixed by the relevant but might take some time to reach you. I think the best way is to create TS tickets for app issues..
Please update to 1.32.4 to fix the API error.
API error fixed! Thank you!
I will create a ticket for the Discoverability issues.
hey @Geovane ,
are you still facing this issue ?
https://discord.com/channels/1143209406037758065/1260633073712631808/1261429641722331291
i've tried it couple of times with the new SDK , can seem to repro this,
is possible can you give it a try here : https://m8l3cm.csb.app
click the GetAnswerSession it should show you the answer session
i am able to get the answer session just after saving as well
@Geovane were you able to check this?