Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless LOADING #29

Closed
makorne opened this issue Nov 7, 2021 · 8 comments
Closed

Endless LOADING #29

makorne opened this issue Nov 7, 2021 · 8 comments

Comments

@makorne
Copy link

makorne commented Nov 7, 2021

To Reproduce
Run locally all projects.
cd delicate-web
$ yarn run start:development

Expected behavior
Any UI (or at least any error :)

Screenshots
LOADING

Desktop (please complete the following information):
chrome, firefox

@BinChengZhao
Copy link
Owner

To Reproduce Run locally all projects. cd delicate-web $ yarn run start:development

Expected behavior Any UI (or at least any error :)

Screenshots LOADING

Desktop (please complete the following information): chrome, firefox

Hi @makorne ,

Hello friend delicate is divided into several parts (scheduler, front-end, executor), delicate-web is one of them , It is part of the front-end, have you deployed delicate-scheduler and configured it properly?

@makorne
Copy link
Author

makorne commented Nov 7, 2021

Thank you for your prompt answer 👍
Yes, all other parts work (with little changes due to mariaDb issue in the migration with CUSTOMIZE_TIME_ZONE).

Looks like the issue is in :
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8090/api/user/check. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)
Delicate_Screenshot_2021-11-07_14-39-44

@BinChengZhao
Copy link
Owner

Thank you for your prompt answer 👍 Yes, all other parts work (with little changes due to mariaDb issue in the migration with CUSTOMIZE_TIME_ZONE).

Looks like the issue is in : Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8090/api/user/check. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing) Delicate_Screenshot_2021-11-07_14-39-44

Thank you for your use and support friend, I will always reply to you promptly:

  1. you need to confirm whether the delicate-scheduler is running.
  2. After confirming, you need to configure the domain name of your front and back-end services as much as possible under the same domain name, and then set the .env configuration to restart the service.

You can refer to readme

12. Please refer to delicate-web/README.md for the deployment of front-end resources.

13. delicate-scheduler & delicate-web need to be under the same domain (such as api.delicate.com & web.delicate.com), so as to avoid cross-domain issues, both delicate-scheduler & delicate-web can be deployed in clustered versions, accessible via reverse proxy.


If you have any further questions, please do not hesitate to reply.

@makorne
Copy link
Author

makorne commented Nov 7, 2021

I set all three to 127.0.0.1,
delicate-scheduler: starting_server at: 127.0.0.1:8090

# Customized scheduler domain.
# Required
SCHEDULER_DOMAIN=127.0.0.1

# Customized scheduler-front-end domain.
# Required
# Setting this item makes it easier to handle cross-domain issues.
SCHEDULER_FRONT_END_DOMAIN=http://127.0.0.1

# Customized cookie-domain domain.
# e.g `delicate.com`
# Required
SCHEDULER_COOKIE_DOMAIN=127.0.0.1

# Customized scheduler name.
# Required
SCHEDULER_NAME=SOME

# Listening address of the scheduler service.
# Required
SCHEDULER_LISTENING_ADDRESS=127.0.0.1:8090

# Listening address of the executor service.
# Required
EXECUTOR_LISTENING_ADDRESS=127.0.0.1:9080

And tried adding to cors 127.0.0.1 or *
let cors = Cors::new()
.allow_origin(&scheduler_front_end_domain)
.allow_origin("127.0.0.1")

You can bump poem version from 1.0.5 to latest 1.0.20, all builds.
But it does not help resolve this CORS issue.
Although it looks fixed here: Fix CORS Preflight response
#poem-web/poem@b078d32

@makorne
Copy link
Author

makorne commented Nov 7, 2021

In poem 1.0.21 ACCESS_CONTROL_ALLOW_ORIGIN fixed but..
Delicate_Screenshot_2021-11-07_17-39-44

@BinChengZhao
Copy link
Owner

In poem 1.0.21 ACCESS_CONTROL_ALLOW_ORIGIN fixed but.. Delicate_Screenshot_2021-11-07_17-39-44

My friend I've been on.

You can get a list of local dependencies via cargo tree, by default cargo should install all the latest poem dependencies , if not please run cargo update

Because 127.0.0.1 is not a reasonable domain, but a loop ip.

I sincerely suggest you use a proxy to give the service a domain name and configure the local vhost, you should see the results.

If you are in a hurry, you can try to login to the public address (account/password are admin) and experience the effect first (delicate V1.2.0):
http://web.delicate-rs.com/

@makorne
Copy link
Author

makorne commented Nov 7, 2021

I saw this in the delicate-utils cargo: poem = { version = "1.0.05" and changed it to 1.0.21, so you can bump it here too.

My cargo tree shows: │ ├── poem v1.0.21

I changed 127.. to domain name pointed to local host and changed all env to it, with the same result.

I logged in to your public address ...
Looks great!!! 🥇

I will try V1.3.1 from scratch !

@BinChengZhao
Copy link
Owner

I saw this in the delicate-utils cargo: poem = { version = "1.0.05" and changed it to 1.0.21, so you can bump it here too.

My cargo tree shows: │ ├── poem v1.0.21

I changed 127.. to domain name pointed to local host and changed all env to it, with the same result.

I logged in to your public address ... Looks great!!! 🥇

I will try V1.3.1 from scratch !

Okay, if you have any questions please feel free to ask, I will reply promptly, thank you for your enthusiastic use!

Actually delicate doesn't need to update dependencies automatically, because the user will get the latest poem dependency when fetching or updating, https://stackoverflow.com/questions/45224563/how-to-specify-the-exact-version-of- a-dependency.

Still, thank you very much for being active!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants