We are currently having issues with the JWT authen...
# gooddata-cloud
j
We are currently having issues with the JWT authentication this was working fine a while ago was there any change to this method factory() as we are using it in
Copy code
setContext({
    backend: factory()
      .onHostname(data['good_data_url'])
      .withAuthentication(new TigerJwtAuthProvider(data['jwt'])),
    workspaceId: data['workspace_id'],
});
it seems the method is returning this
o()
, and then we get
TypeError: Unhandled Promise Rejection: o is not a function
, anyone that could help us with this?
k
The snippets you shared match the officially supported pattern for using JWT auth with Web Components:
Copy code
js setContext({     backend: factory()         .onHostname(data['good_data_url'])         .withAuthentication(new TigerJwtAuthProvider(data['jwt'])),     workspaceId: data['workspace_id'], });
This is consistent with both: - The general JWT auth example for
TigerJwtAuthProvider
on the React/SDK side [[JWT auth](https://www.gooddata.com/docs/gooddata-ui/latest/learn/integrate_and_authenticate/cn_and_cloud_authentication/#jwt-authentication)], and - Real-world Web Components usage where
tigerBackend.js
is imported and
TigerJwtAuthProvider
is passed directly into
withAuthentication
[[Slack: Web Components + JWT](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1753291368294639?thread_ts=1753291368.294639&cid=C04S1MSLEAW)]. However, in the recent Slack thread about issues after the
gd-ai-assistant
release, the problem was caused by how the modules were imported, not by
factory()
or
TigerJwtAuthProvider
themselves. The user imported
tigerBackend.js
and then the workspace script separately, and this led to Web Components being defined twice and throwing runtime errors when the bundle structure changed [[Slack: gd-ai-assistant / double define](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1750931233006109?thread_ts=1750931233.006109&cid=C04S1MSLEAW)]. Given the knowledge sources: - There is no documented change in the contract of
factory()
(the Web Components “tiger backend” factory) or
TigerJwtAuthProvider
itself; their intended usage is unchanged in the latest docs [[Web Components auth](https://www.gooddata.com/docs/gooddata-ui/latest/learn/web_components/authentication/); [JWT auth](https://www.gooddata.com/docs/gooddata-ui/latest/learn/integrate_and_authenticate/cn_and_cloud_authentication/#jwt-authentication)]. - The
TigerJwtAuthProvider
class is still defined as a simple token-based auth provider (with extra JWT‑specific behavior) and is intended to be passed to
.withAuthentication(...)
just as you are doing [[TigerJwtAuthProvider](https://sdk.gooddata.com/gooddata-ui-apidocs/v11.11.0/docs/sdk-backend-tiger.tigerjwtauthprovider.html#tigerjwtauthprovider-class)]. Because the sources do not expose the minified internals (the
o()
you see), I cannot say exactly why your particular build is now resolving
factory
to a non‑callable value. The most likely explanations, consistent with the Slack case above, are: - The way the embedding app dynamically imports the GoodData modules changed or now runs twice (or in a different order), or - The bundle layout of
tigerBackend.js
/
<workspaceId>.js
changed with the AI assistant feature, and the current import pattern is no longer safe (for example, mixing dynamic imports, re‑execution, or multiple script inclusions). From the documentation and Slack threads alone, there is no explicit migration note or code example that would fix
TypeError: … o is not a function
directly. The knowledge sources therefore do not contain enough information to pinpoint or confirm a change to
factory()
itself. Given that: - Your code matches the documented pattern, and - A very similar JWT/Web Components import pattern recently broke due to internal changes on GoodData’s side and was escalated to Tier 2 support [[Slack: gd-ai-assistant / double define](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1750931233006109?thread_ts=1750931233.006109&amp;cid=C04S1MSLEAW)], the best concrete actions, based on the available information, are: 1. Verify import pattern Ensure you only import the GoodData Web Components bundle(s) once, and that
tigerBackend.js
is not being loaded or evaluated multiple times in different ways (e.g., both via
<script>
tag and dynamic
import()
). The previous Slack case suggests that changes in the bundle can surface only when imports are duplicated. 2. Confirm environment & version Note which GoodData Cloud environment and Web Components version / release you’re on, since the breakage in the referenced thread was tied to a specific Cloud-side rollout. 3. Provide a small repro or trace Because this now looks very similar to a platform/bundle regression rather than misuse of
factory()
, collecting a minimal reproduction (or at least the exact dynamic
import()
code and page where it runs) and sharing it with GoodData Support is important. In the cited case, it was escalated to Tier 2 for internal investigation [[Slack: gd-ai-assistant / double define](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1750931233006109?thread_ts=1750931233.006109&amp;cid=C04S1MSLEAW)]. To summarize: according to the documentation, your usage of
factory()
and
TigerJwtAuthProvider
is correct, and there is no documented behavior change to this method. The error you see is likely caused by how the GoodData Web Component bundles are now structured or imported in your app, not by a contract change that’s documented in the public guides.
j
@Marek Zelc
y
Hello Jhonatan, We are currently checking this internally, we will get back to you as soon as possible. Apologies for any inconvenience caused.
Hi Jhonatan, You mentioned that this was working fine before, are you able to confirm if any changes were made on your end, which could have potentially caused this? Are you also able. to share a direct link to your dashboard. Thanks.
j
this was working yesterday, last change to the code on our end was 4 months ago
y
Thanks for the information, are you also able to share some error trace ID and the id of the embedded component so that we can check our logs. Thanks.