I am currently trying to integrate <goodata.cn> in...
# gooddata-platform
I am currently trying to integrate goodata.cn into my application, and am using the following code
Copy code
tigerFactory().onHostname(<my_host_name>).withAuthentication(new ContextDeferredAuthProvider(redirectToTigerAuthentication));
when I open up my app I am redirected to the the gooddata login page where I type in my username and password. I then get redirected back to my application where I get a No Session error inside my DashboardView component and then get caught in a endless redirect to my application. Is there something that I am not doing correctly on my front end or is it possible that the GDCN server is not set up correctly?
Hello Justin! To resolve this issue I need to ask you a few more questions: • Is your application running on localhost, or is it deployed on some domain? • If deployed, is the app deployed on the same domain as the GoodData.CN instance? • Is your app running from the root of the hosting, or is it in a folder? Furthermore, can you please check/investigate the following: • Look into package.json of your app, and see
yarn build
yarn build-with-explicit-hostname
. • See
to understand what the env
does. • If you think that the 2nd and other redirects are redundant, go into
and remove
<RedirectIfNotLoggedIn />
and try it without it.
Let me know if this made things clearer and if you figured out how to resolve your issue. If not, we'll continue the investigation until we find where the problem is. This should work!
Ah sorry should have mentioned that this app is not build with the creat-react-project script, this is our own rails project we are working with. I am currently testing on localhost, and the GDCN backend is running on another domain, I believe we have CORS set up correctly. Also this same rails project was working fine when we were testing on the hosted Goodata platform and I was able to load in our dashboards via the DashboardView component. When we switched to evaluating our own hosted GDCN is when we started getting this issue
specifically we are getting this error
Copy code
Error: No session or session expired
    at NotAuthenticated.AnalyticalBackendError [as constructor] (index.js:43)
    at new NotAuthenticated (index.js:213)
    at createNotAuthenticatedError (errorHandling.js:33)
    at Object.convertApiError (errorHandling.js:15)
    at ContextDeferredAuthProvider.<anonymous> (auth.js:155)
    at step (tslib.es6.js:216)
    at Object.throw (tslib.es6.js:146)
    at rejected (tslib.es6.js:109) 'we ded'
Hello Justin, thanks for the update! I would still recommend spinning up a fresh new create-gooddata-react-app for GD.CN and investigate those parts I desrcibed:
, etc. I would personally start with create-gooddata-react-app for GD.CN, I would connect it to the correct domain and the correct workspace, render a simplest possible insight (just <Headline /> with one measure), and then I'd deploy this to see if it works. Once I'd have a working create-gooddata-react-app project, I would then compare and replicate the exact same settings to your Rails app.
I believe this is the shortest path to success, as our create-gooddata-react-app comes already preconfigured for both localhost development and production hosting.
Hey Jiri, I was able to fix my issue with the dashboard. Turns out I was not properly passing the TIger Auth token to the Tiger Backend.
Excellent @Justin Unverricht, good job! And thank you for letting me know!