Hi, I am trying to use <gooddata.cn> for dashboard...
# gooddata-cn
v
Hi, I am trying to use gooddata.cn for dashboard embedding (https://www.gooddata.com/developers/cloud-native/doc/1.4/getting-started/create-ui-sdk-app/). I am using the accelerator toolkit (https://github.com/gooddata/gooddata-create-gooddata-react-app) Got below error when trying to fetch list for workspace yarn refresh-md yarn run v1.22.11 $ node ./scripts/refresh-md.js --------------------------------------- | GoodData Catalog Export Tool v8.5.0 | --------------------------------------- ? Enter your username: ******************* ? Enter your password: [hidden] ✖️ Logging in... ✘ ERROR Unable to log in to platform. The error was: Error: Not Allowed error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
j
Hello Vatsal! I understand you have created a new create-gooddata-react-app and you are trying to export the metadata (metrics, attributes, insights, …) from a workspace, but getting the ERROR Unable to log in to platform along the way.
v
I am trying to integrate dashboard, to get the ids for dashboard i am trying the export metadata which resulted me to above error
Is there any requirement or need to whitelist the domain as it is K8s hosted gooddata cn
j
The
refresh-md
command you are running will try to connect to a domain and a workspace that is set in
src/constants.js
file.
v
yes i have done it in gooddata cloud before trying this with CN
j
So you have done this against the hosted GoodData platform and it worked, and now you're trying to do the same for GoodData.CN, correct?
v
yes correct
j
In order to successfully run the
refresh-md
command, you must have a domain and a workspace set correctly in your
src/constnts.js
file. Could you please tell me what is your domain and workspace set to?
v
Shared in private
j
Thank you. That looks good.
I see that you have already deployed the GoodData.CN and now you're trying to run refresh-md against this deployed instance.
Vatsal, I need to check something internally now, and I will get back to you soon. Thank you for your patience!
v
I have been stuck on it for few days. It will be helpful if you are able to solve it
d
Hello Vatsal, Dan from the GoodData.UI team here. Looking at the console output, it seems that the
"refresh-md"
script is defined wrongly (it seems that it is using the GoodData Platform version, not the GoodData.CN one). The script in the package.json should read
Copy code
"refresh-md": "node ./scripts/refresh-md.js --backend tiger"
Can you please check?
👍 1
1
v
Hi Dan, I ran the accelerator again with tiger backend. And did the mentioned steps and now below error pops. I have added the TIGER_API_TOKEN & REACT_APP_DEV_TIGER_API_TOKEN in the .env file still it is throwing error. Also tried
.env.development.local
that too didn't work. --------------------------------------- | GoodData Catalog Export Tool v8.6.0 | --------------------------------------- ✘ ERROR You do not have the TIGER_API_TOKEN environment variable set. INFO To obtain a token value, follow these steps: INFO 1. You should now see your default browser open at either your Tiger installation's home page or login page (if so, please log in). INFO 2. Once you are on your Tiger installation's home page, please follow the guide at https://www.gooddata.com/developers/cloud-native/doc/1.2/administration/auth/user-token/#generate-the-api-token to create a new token (using the Developer Tools way). INFO 3. Once you have the token value, please set the TIGER_API_TOKEN environment variable and try again. ✘ ERROR API token not set or no longer valid. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
d
Hi Vatsal, the catalog export tool unfortunately does not support the
.env
files. You can try
Copy code
export TIGER_API_TOKEN='your-api-token'
npm run refresh-md
which should work. I will create a ticket for adding support for the
.env
files for the catalog export tool, because it is something that would be useful. Sorry for the inconvenience.
👍 1
v
It worked Thank you
d
No problem, I’m glad it works now 🙂
v
Now I want to make it for prod I looked at the steps mentioned in readme for prod deployment
Getting network error index.ts:334 Tiger backend threw an error: Error: Network Error at e.exports (createError.js:16) at XMLHttpRequest.f.onerror (xhr.js:84)
d
That’s strange, do you have any more infrmation about the error? Like URI it is trying to call or the response code, please?
v
Hi @Dan Homola, Sorry for the delay in reply, I was able to solve the CORS error. But stuck again with the auth issue it is redirecting to gooddata instance
d
Hi @Vatsal Trivedi yes that is correct behavior. In the terminal there should be instructions on how to proceed (it will guide you through how to obtain a token which you can then use to authenticate).
v
I am implementing production settings for the accelerator, i have uncommented the
<RedirectIfNotLoggedIn/>
so it should ideally stay on the login page but it redirects to Gooddata.CN instance. Both are hosted on different domains
d
Oh sorry, I missed the prevous context, my bad. So if I understand correctly, you uncommented the
<RedirectIfNotLoggedIn/>
and it does not redirect you to the
/login
?
v
The redirect happens to login screen, but again it redirects to Gooddata.CN instance url
g
Hi Dan, any update on this. We are blocked on this
d
Hi @Guruprasad it is being discussed in another thread: https://gooddataconnect.slack.com/archives/C01P3H2HTDL/p1635862506031800?thread_ts=1635245017.021000&amp;cid=C01P3H2HTDL however I personally can be of very little assistance with this problem as it is more of a backend issue 😞 I’ll try to ping more people