-
Notifications
You must be signed in to change notification settings - Fork 70
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
ISSUER UI for docker setup doesn't work. #520
Comments
Hi there! You're missing a value for the env var This missing value has been already added in the |
Thank you for your quick response, it solved my problem, but I got a new one when I launched the webpage, it shows as follows, do you know the possible reason? I cannot import schema as it reminds me "network error"... Thanks a lot! |
Can you please open the browser dev tools, go to Network, and show some details about the error on the request/response to the endpoint |
This looks ok! Can you provide a video or screenshot of what you see in the Headers tab? inspect-cors-error.mp4 |
Are you guys using ngrok by any chance? |
@amonsosanz Yes I am using ngrok. Screencast.from.13-11-23.07.15.13.PM.IST.webm |
Can you please give LocalTunnel a try? We've had issues in the past with ngrok removing the header EDIT: Or open the port so the callback URL is publicly accessible. |
Do I need to mention the url I got from localTunnel in |
Exactly, set up the public URL you get from LocalTunnel in |
I am getting the same error even after setting up a new LocalTunnel URL in env and restarting the server |
Yep, this looks correct, but keep in mind that this command shows the containers that have been booted and some could go down later. To see what you currently have running use |
@amonsosanz I am trying to use Issuer-UI-API as mentioned in the documentation but not able to navigate to |
Yep, this is because your API service is down, along with redis. $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
755ce726cf0d issuer-ui "/bin/sh /app/script…" 34 minutes ago Up 34 minutes 0.0.0.0:8088->80/tcp issuer-ui-1
7db68e83a116 issuer-api "sh -c 'sleep 4s && …" 52 minutes ago Up 52 minutes 0.0.0.0:3001->3001/tcp issuer-api-1
505a71889f5c postgres:14-alpine "docker-entrypoint.s…" 52 minutes ago Up 52 minutes (healthy) 0.0.0.0:5432->5432/tcp issuer-postgres-1
13f35a7df1b5 redis:6-alpine "docker-entrypoint.s…" 52 minutes ago Up 52 minutes (healthy) 0.0.0.0:6379->6379/tcp issuer-redis-1
27a16c5e15ee vault:1.13.2 "docker-entrypoint.s…" 52 minutes ago Up 52 minutes 0.0.0.0:8200->8200/tcp issuer-vault-1 EDIT: The above list is incomplete. Please check the complete list here. I'd execute Then $ make up
docker compose -p issuer -f /polygonid/issuer-node/infrastructure/local/docker-compose-infra.yml up -d redis postgres vault
[+] Building 0.0s (0/0)
[+] Running 4/4
✔ Network issuer-network Created 0.0s
✔ Container issuer-redis-1 Started 0.4s
✔ Container issuer-vault-1 Started 0.4s
✔ Container issuer-postgres-1 Started And doing $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a1fa0725ef7a postgres:14-alpine "docker-entrypoint.s…" 5 seconds ago Up 4 seconds (health: starting) 0.0.0.0:5432->5432/tcp issuer-postgres-1
f01ea5f8991f redis:6-alpine "docker-entrypoint.s…" 5 seconds ago Up 4 seconds (health: starting) 0.0.0.0:6379->6379/tcp issuer-redis-1
d9566fb4dfcc vault:1.13.2 "docker-entrypoint.s…" 5 seconds ago Up 4 seconds 0.0.0.0:8200->8200/tcp issuer-vault-1 Then for Apple M1/M2 run Then if the API is booted (and does not die), you can optionally boot the UI with |
Thank you for the detail answer @amonsosanz . Sometimes redis goes down and sometimes API. I think waiting for some time after |
@amonsosanz When I run
|
Nope. Is it running later when you run a By the way, I've just realized that you (and me 😅) are missing another service: This is the actual API used by the UI. It's been a while since I ran this project locally, let me investigate this and come back to you ASAP. |
Can paste the output of |
@amonsosanz Sure, I am getting this error after running above command
|
mmm... apparently the port is in use. Do you have any other service on this port? Without this port redis can't start. I'd stop all the containers Being on Windows, I'd also advise restarting, just in case. |
I fixed a problem I had in my local environment and now I have all the containers running. Sorry about my imprecise comment yesterday. I've not worked on this project lately. This is the complete list of containers you should have running: $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8fcb6b0c93ee issuer-api-ui "sh -c 'sleep 4s && …" 9 minutes ago Up 9 minutes 0.0.0.0:3002->3002/tcp issuer-api-ui-1
29931c841d67 issuer-ui "/bin/sh /app/script…" 9 minutes ago Up 9 minutes 0.0.0.0:8088->80/tcp issuer-ui-1
e6b0094a8985 issuer-pending_publisher "sh -c 'sleep 4s && …" 9 minutes ago Up 9 minutes issuer-pending_publisher-1
2f16c5411050 issuer-notifications "sh -c 'sleep 4s && …" 9 minutes ago Up 9 minutes issuer-notifications-1
9918e0538d6f issuer-api "sh -c 'sleep 4s && …" 17 hours ago Up 17 hours 0.0.0.0:3001->3001/tcp issuer-api-1
a1fa0725ef7a postgres:14-alpine "docker-entrypoint.s…" 18 hours ago Up 17 hours (healthy) 0.0.0.0:5432->5432/tcp issuer-postgres-1
f01ea5f8991f redis:6-alpine "docker-entrypoint.s…" 18 hours ago Up 15 hours (healthy) 0.0.0.0:6379->6379/tcp issuer-redis-1
d9566fb4dfcc vault:1.13.2 "docker-entrypoint.s…" 18 hours ago Up 17 hours 0.0.0.0:8200->8200/tcp issuer-vault-1 Now that we know that this project has 8 services, let's see what's wrong on your end. First, though, you should be able to make Redis run. Let's first focus on this and later we will make the rest work. I hope all this is somehow helpful for you too @skywormfol. We hijacked your threat... |
Hi @Xiaod0ng. Thx for reporting this issue. I'm able to reproduce it. Apparently, the entry point of the docker image, the deploy script, gets removed by the script itself, making the UI run only the first time. While we investigate the issue, you can re-run the UI service after it has been stopped by removing the image. This should not imply a rebuild of the complete image thanks to docker layering:
or for Mac
|
@amonsosanz Thank you for your prompt reply! The command can resolve the issue but it does rebuild the ui. I will test more to see if it really works. Will keep you updated. |
I believe it's normal that the UI image is not rebuilt unless there are other changes. I've opened a PR fixing the issue you reported here.
The "Network error" happens when for some reason the service running the API consumed by the UI ( In the case of @Raj6939, apparently, he has an issue booting the Redis cache and therefore several containers fail booting. |
Hi @amonsosanz , to add something to this issue, all my images are running (8 in total) and it's normal when openning from my laptop where hosting Docker. But when openning with my mobile phone, it's showing network error. I also tried with localtunnel to setup the public URL, but same behavior |
Can you please show here the settings/commands you use to run both ngrok and localtunnel? |
@amonsosanz Here you go: ngrok: localtunnel: |
Ok, there it's the issue, you need to make publicly accessible the API (port 3002) and optionally the UI, as you already do. You can keep using ngrok for the UI (port 8088) and then use local tunnel for the API with If you wonder, the reason to use local tunnel and not ngrok for the API is that some users have experienced CORS issues with ngrok removing the header |
@amonsosanz Hi, it still has the same error when openning with mobile browser. I have followed your instructions, settings are as following. |
Have you restarted the API container?
|
@amonsosanz Yes, the container was restarted after setting the variables. |
Sorry, you're right, the UI env vars are calculated in the image. You need to run:
|
@amonsosanz Hi, I don't think it's right. I got network error even on my local computer. The error message in console is: Failed to load resource: the server responded with a full-mirrors-crash.loca.lt/v1/schemas:1 status of 511. Could you please let me know whether the following is correct? I will try to host the sites in Azure instead of ngrok or localtunnel. |
The setup you were attempting is pretty common for testing. Let's give it one more try before Azure. You only need to open in the browser the URL that localtunnel gives you. An input text should appear to enter your IP |
@amonsosanz Hi, If I open the URL from localtunnel, it's API UI, not the UI. If I open ngrok URL, it's using previous localtunnel URL instead of the new output from localtunnel command. The env file is updated to latest URL and UI restarted with I appreciate if we can have a remote session or use other method to troubleshoot this issue. |
I've recorded a quick video showing you how I set up this in my local environment. https://drive.google.com/file/d/1oA5qtoQhREGaSHO3P_YOpj7PY-I7Bfac/view The video is public, but I think you have to be logged in on a Google account to access it. |
@amonsosanz Thank you for your time! I finally got what you mean. But I'm having another issue right now, I will give it a try after fixing that one. Thanks again! BTW, are you able to use your mobile/tablet/other computer to open the UI URL? |
I did not test it but yep it should work the same. The issue you had initially is that the UI was pointing to localhost, which is only available in the computer. Now that the change has been applied and you're using local tunnel, after white-listing your IP, you should be able to use the UI from other devices. Take into account though that our UIs are not yet very mobile friendly, we will be improving this with the time. |
@amonsosanz Hi, I'm able to get it work now. The trick is about whitelist my IP in localtunnel. Thank you! |
Awesome! Thank you for your patience! |
This issue is stale because it has been open 20 days with no activity. Remove stale label, add the enhancement label or comment to avoid closing it in 10 days. |
This issue was closed because it has been stalled for 10 days with no activity. |
https://devs.polygonid.com/docs/issuer/setup-issuer-ui/#optional-using-the-ui
while setting up the ISSUER UI page according to above guidelines, an error is shown for "localhost:8088", any browser or "http://user-api:password-api@localhost:8088/." in NOTE doesn't solve it. What's the possible reason? Thanks.
"Something went wrong
An error occurred while reading the environment variables:
Invalid url at VITE_IPFS_GATEWAY_URL
Please provide valid environment variables."
The text was updated successfully, but these errors were encountered: