TGCLOUD tools fails loading due to CORS conflict

Trying to open the tgcloud tools (e.g. GraphStudio, AdminPortal) loads forever.
Looking in chrome console it seems as if there’s some conflict regarding CORS.
See image:

This happens on two different machines, one of which is new where TG was never loaded before, and all cookies were cleared and machine restart with the other.

Chrome browser, tgcloud cluster version 3.8.0

Please Help.
Thanks!
Mor

cluster ID: cb54852f-72c0-4d0f-888a-4944e84e1f8e
Chrome dev console errors:

Access to XMLHttpRequest at 'https://simplify-mvp.i.tgcloud.io/api/gsql-server/gsql/simpleauth' from origin 'https://tools.tgcloud.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
simplify-mvp.i.tgcloud.io/api/gsql-server/gsql/simpleauth:1          Failed to load resource: net::ERR_FAILED
tools.tgcloud.io/studio/#/:1 Access to XMLHttpRequest at 'https://simplify-mvp.i.tgcloud.io/api/config?key=GUI.ClientIdleTimeSec&key=GUI.GraphStatCheckIntervalSec&key=GUI.EnableDarkTheme' from origin 'https://tools.tgcloud.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
simplify-mvp.i.tgcloud.io/api/config?key=GUI.ClientIdleTimeSec&key=GUI.GraphStatCheckIntervalSec&key=GUI.EnableDarkTheme:1          Failed to load resource: net::ERR_FAILED

Access to XMLHttpRequest at 'https://simplify-mvp.i.tgcloud.io/api/auth/logout' from origin 'https://tools.tgcloud.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
query.js:356 o
onError @ query.js:356
simplify-mvp.i.tgcloud.io/api/auth/logout:1          Failed to load resource: net::ERR_FAILED
tools.tgcloud.io/#/login?returnURL=%2Fstudio%2F%23%2Fhome%3Flanguage%3Den-US%26theme%3Dlight%26user_opt_in%3Dtrue%26clustersid%3Dsimplify-mvp.i:1 Access to XMLHttpRequest at 'https://simplify-mvp.i.tgcloud.io/api/gsql-server/gsql/simpleauth' from origin 'https://tools.tgcloud.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
query.js:356 o
onError @ query.js:356
simplify-mvp.i.tgcloud.io/api/gsql-server/gsql/simpleauth:1          Failed to load resource: net::ERR_FAILED

Hi Mor,

I’m looking into this issue, and need to restart this cluster. Is that allowed from your side?

Thanks,
Yijun

Yes, Yijun, restart as you need.
Thank you!
Mor

Hi Mor,

I restarted the cluster, and checked the CORS policy. It works fine now. Please check it!

Thanks,
Yijun

1 Like

Thanks, Yijun.
Now it works.
This also happened a couple of weeks ago, I guess I restarted and it worked.
Can you please explain why would that happen at all? I need to be comfortable with a highly reliable DB service.
Thank you!
Mor

Hi Mor,

Thanks for your valuable feedback!
We will try to reproduce this issue by ourselves, and figure it out.
After that, I will give you a feedback.

Thanks,
Yijun

3 Likes

Hi Mor,

Is there any customizable config with your cluster? Just want to confirm with you.

Thanks,
Yijun

Hi Yijun.
I’m not sure I understand what you mean by “customizable config”. I have 3 DB instances with users, roles, secrets - nothing special.
As this is a CORS issue, consider how my nginx looks like:

Not the schema related stuff, I mean the configurable system settings (nginx config is a good example you gave), primarily through gadmin CLI.

Btw, I want to know how large the dataset is being used?

Thanks,
Yijun

No configurations at all.
3 Databases, with few records only - practically empty.
Thank you!

1 Like

Hi, I have a similar problem as I want to access the TGCloud APIs from a different server.

I was trying to apply this solution, but without success: https://www.tigergraph.com/blog/working-with-tigergraph-rest-api-and-cors-cross-origin-resource-sharing/

Is it possible to have the steps to get this connection to TGCloud working?

Thanks!

@diogobraga Starting from 3.9.x, TigerGraph introduced 2 configs in GUI, for CORS configurations. GUI.EnableCORS GUI.WhitelistCORS , For GUI.EnableCORS it has three options: DISABLE , ENABLE_WHITE_LIST and ENABLE_ALL . For GUI.WhitelistCORS , it stores the list of site the user want the CORS to be enabled. Only when GUI.EnableCORS is set to ENABLE_WHITE_LIST , the list of sites set in GUI.WhitelistCORS will be applied.

1 Like