I am getting the following in the browser console:
application.b209ba831e26b6d4.42.js:2 Error: localStorage is not available
at LocalStorageClient.get (570.bundle.d2ff4fada3be490e.5.js:2:57699)
at 854.bundle.a72a6ad16ac2444f.5.js:2:768699
at hs (application.b209ba831e26b6d4.42.js:2:2733971)
at Rl (application.b209ba831e26b6d4.42.js:2:2754118)
at t.unstable_runWithPriority (application.b209ba831e26b6d4.42.js:2:2920809)
at qo (application.b209ba831e26b6d4.42.js:2:2695194)
at Pl (application.b209ba831e26b6d4.42.js:2:2753855)
at ml (application.b209ba831e26b6d4.42.js:2:2744600)
at application.b209ba831e26b6d4.42.js:2:2695485
at t.unstable_runWithPriority (application.b209ba831e26b6d4.42.js:2:2920809)
const container = document.getElementById(containerId);
const options = {
url,
container,
width: '100%',
locale: 'en-US',
className: 'fixed-height',
qSearchBarOptions: {
expandCallback: onExpand,
collapseCallback: onCollapse,
iconDisabled: true,
topicNameDisabled: false,
allowTopicSelection: false,
},
};
const qBar = QuickSightEmbedding.embedQSearchBar(options);
return quicksight_client.generate_embed_url_for_registered_user(
AwsAccountId=account_id,
UserArn=user_arn,
SessionLifetimeInMinutes=600,
ExperienceConfiguration={
"QSearchBar": {"InitialTopicId": topic_id}
},
AllowedDomains=[web_app_url],
)
We have integrated a Q search bar into our website. The Q search bar URL is generated successfully in our Lambda function, but when it is inserted into our website, it triggers the error message mentioned above.
Additional Details:
- We have tested both v1 and v2 of the library.
- It was working before but suddenly it isn’t anymore, but dashboard embedding works fine.
Expected Behavior:
- The Q search bar URL should work without any localStorage errors when embedded in our website.
Please investigate and provide guidance on resolving this issue.
Thank you for your assistance.