I'm trying to use the LookerEmbedSDK to embed dashboards.
LookerEmbedSDK.init(LOOKER_USE_EMBED_DOMAIN,
{
url: `MYURL/auth`,
headers: [
{name:'authorization', value:`Bearer ${getStorageToken()}`},
{name: "Content-Type", value:"text/xml"},
],
withCredentials: true
})
const lookerEmbedSDKResponse = await LookerEmbedSDK
.createDashboardWithId(currentDashboard.dashboardId)
.appendTo(el)
.withParams({_theme: "{\"show_filters_bar\":false}"})
.withFilters(currentFilters)
.build()
.connect()
.catch((error) => {
console.error("An unexpected error occurred", error);
});
But I consistently get
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'send')
Which is occurring in embed.ts:253
In my network tab I see this is a CORS error (I also see that I have properly set the Authorization token)
The thing is - other requests to that same endpoint (via Curl or axios) work and do not give me an error, they give me what I expect. What's going on with the Embed auth call logic?