Hey there I need an urgent solution. I dont see an...
# gooddata-cloud
j
Hey there I need an urgent solution. I dont see any outage reported. But I am getting black pages where GoodData web component should be displaying data I am getting the following error
Uncaught SyntaxError: The requested module '<https://xxx.cloud.gooddata.com/components/tigerBackend.js>' does not provide an export named 'default'
👀 1
k
The error indicates that
tigerBackend.js
no longer exposes a
default
export in the way your code expects, so your dynamic import fails and the page where the web component should render stays blank. From the working examples in the knowledge sources, the recommended pattern is:
Copy code
js import("<https://your-org.cloud.gooddata.com/components/tigerBackend.js>").then(   ({ factory, TigerTokenAuthProvider }) => {     import(       `<https://your-org.cloud.gooddata.com/components/${workspaceId}.js>`     ).then(({ setContext }) => {       setContext({         backend: factory()           .onHostname("<https://your-org.cloud.gooddata.com>")           .withAuthentication(new TigerTokenAuthProvider(token)),         workspaceId,       });     });   }, );
Notice that: - You do not destructure
default
from the module. - You import the named export
factory
(not
default
) and the auth provider directly. [[Web components integration](https://www.gooddata.com/docs/gooddata-ui/latest/learn/web_components/#integration)] In your current code you likely have something like:
Copy code
js const { default: factory, TigerJwtAuthProvider } = response;
Change it to match the pattern actually exported by
tigerBackend.js
, e.g.:
Copy code
js const { factory, TigerJwtAuthProvider } = response;
After updating the import/destructure: 1. Hard-refresh / clear cache. 2. Reopen DevTools and confirm the
tigerBackend.js
request succeeds and the black page disappears. If this adjustment does not resolve it, capture the full error from DevTools (Console + Network) and share with GoodData Support, as they can check if any recent change to
tigerBackend.js
for your region is involved.
j
Hi Joaquim, I have just accessed your production domain with our built-in admin account and I don't see any issue while randomly checking Dashboards on multiple workspaces. Can you please point me somewhere specifically where you see the problem? Is it somehow user based problem or any user is running into the issue?
j
On our user portal we display the data using Web Components. This page here should reflect the GoodData Dashboard but it shows nothing at the moment
this only began this morning
so there must be changes to the API causing this issue
thats a screenshot of our portal
Copy code
authenticateAndInjectGdScript(workspaceId: string) {
		this.userSvc.getStoredOrNewToken$()
			.pipe(
				distinctUntilChanged(),
				untilDestroyed(this),
			)
			.subscribe(token => {
				// Create and inject new script
				const script = this.renderer.createElement('script');
				const head = this.renderer.selectRootElement('head', true);
				const gdElement = document.createElement('gd-dashboard');

				script.type = 'module';
				script.id = 'customDashScript';

				// Create the script content with imports and context setup
				script.textContent = `
					import { setContext } from "<https://xxx.cloud.gooddata.com/components/${workspaceId}.js>";
					import { factory, TigerTokenAuthProvider } from "<https://xxx.cloud.gooddata.com/components/tigerBackend.js>";

					try {
						setContext({
						backend: factory()
							.onHostname("<https://xxx.cloud.gooddata.com>")
							.withAuthentication(new TigerTokenAuthProvider("${token}")),
						workspaceId: "${workspaceId}",
					});
					} catch(e) {
						// console.log('Context set');
					}
				`;

				// Append script to head
				this.renderer.appendChild(head, script);

				gdElement.classList.add('dashboard');
				gdElement.id = 'gdElement'
				gdElement.setAttribute('dashboard', this.dashboardId);
				gdElement.addEventListener(INITIALIZED, this.onDashboardLoaded.bind(this));
				gdElement.addEventListener(FILTER_CHANGED, this.onDashboardFilterChange.bind(this));

				if (document.getElementById('dashboardContainer')) {
					document.getElementById('dashboardContainer').innerHTML = '';
					document.getElementById('dashboardContainer').appendChild(gdElement);

					setTimeout(() => {
						this.gdDashboardLoading$.next(false);
						this.dashboardConfigured.set(true);
					}, 1000);
				} else {
					this.gdDashboardLoading$.next(false);
					this.dashboardConfigured.set(false);
				}
			});
	}
j
OK let's continue in the ticket then
1
m
please- this is urgent @Julius Kos
1
j
Our Technical Team is already looking into it. They will get back to you as soon as possible.
m
@Julius Kos can you add me to that ticket please?
j
done
1
s
How can we avoid this in the future, this resulted in a complete outage for us for all clients with significant money at stake. How can we be informed of these changes prior to them being deployed?
👆 1
m
cc: @Thiago Alves
👀 1
j
Hi Sameer, I understand your concern about the recent outage and the impact it had on your operations. We are currently investigating the issue and our engineers are taking preventative actions. We aim to prevent such incidents in the future and improve our communication about any changes that could potentially affect your operations.
s
Thank you
@Joseph Heun it would be even better if there was backward compatibility so we didn't have to make changes on our side unless absolutely necessary.
👍🏼 1