Gideon Agboba
06/03/2022, 3:45 AM{
"error": {
"component": "Apache::REST",
"errorClass": "GDC::Exception::User",
"message": "Exactly one key must be specified in hash structure",
"parameters": [],
"requestId": "XicuFLzWLbhUcb1M:tme2g0k7no3ejuiw"
}
}
trying to access my gooddata resources…i have successfully authenticated but i can’t load the dashboard what do i do? thanks in advanceJan Rehanek
06/03/2022, 6:33 AM{
"first": {
"example": 1
}
}
And NOT
{
"first": {
"example": 1
},
"second": {
"example": 2
}
}
Jan Rehanek
06/03/2022, 6:34 AM{
"identifierToUri": [
"one",
"two",
"three",
"etc"
]
}
Jan Rehanek
06/03/2022, 6:34 AMGideon Agboba
06/03/2022, 7:58 AMimport { Dashboard } from "@gooddata/sdk-ui-dashboard";
so gooddata is the one making the api callGideon Agboba
06/03/2022, 8:01 AMJan Rehanek
06/03/2022, 8:10 AMGideon Agboba
06/03/2022, 8:11 AMJan Rehanek
06/03/2022, 8:11 AMGideon Agboba
06/03/2022, 8:12 AMconst sdk = getFactory({ domain: window.location.hostname });
const dashboardID = idRef("");
const dashboardConfig = {
isEmbedded: true,
isReadOnly: true,
};
const dashboardPermissions = {
canInitData: true,
canCreateScheduledMail: false,
canListUsersInProject: false,
};
const [backend, setBackend] = useState(null);
useEffect(() => {
(async () => {
try {
if (!(await sdk.user.isLoggedIn())) {
await sdk.user.login("username", "password");
}
const bear = bearFactory().withAuthentication(
new ContextDeferredAuthProvider()
);
setBackend(bear);
} catch (err) {
console.error(err);
}
})();
}, []);
return (
<Dashboard
backend={backend}
workspace=""
dashboard={dashboardID}
config={dashboardConfig}
permissions={dashboardPermissions}
/>
);
Gideon Agboba
06/03/2022, 8:15 AMimport { getFactory } from "@gooddata/api-client-bear";
import bearFactory, {
ContextDeferredAuthProvider,
} from "@gooddata/sdk-backend-bear";
import { Dashboard } from "@gooddata/sdk-ui-dashboard";
import { idRef } from "@gooddata/sdk-model";
Gideon Agboba
06/03/2022, 8:44 AMJan Rehanek
06/03/2022, 8:48 AMJan Rehanek
06/03/2022, 8:48 AMJan Rehanek
06/06/2022, 7:02 AMFixedLoginAndPasswordAuthProvider
instead of
if (!(await sdk.user.isLoggedIn())) {
await sdk.user.login("username", "password");
}
const bear = bearFactory().withAuthentication(
new ContextDeferredAuthProvider()
);
to handle the login, but that should be unrelated. Anyway, if it is working correctly now, the problem was probably somewhere we cannot see and was resolved independently.