Add exception handling to view account recovery poup
Describe the bug
Currently if a user wishes to view their recovery phrase by going to setting and happens enters an incorrect sudo password and clicks unlock the process fails silently without any obvious indication weather the password entered was correct or not.
To Reproduce
Steps to reproduce the behavior:
- Log into the Phase Console
- Go to Settings
- Click on the Account tab
- In the Recovery section click -
View recovery info4.5 Open browser console - In the View account recovery popup enter an incorrect password
Expected behavior
- There should be an indicator, ideally in the form of a spinner that is displayed on the
Unlockbutton while the crypto functions are fired and keys are computed - If a password that the user has entered is incorrect, a toast indicating a failure should be shown.
Screenshots
Hey @nimish-ks , can you assign the issue to me?
Hey, I'm facing an error while trying to start docker containers.
I've added GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET. Do I have to add # Integrations as well? If yes, where can I get them from? "GITHUB_INTEGRATION_CLIENT_ID= NEXT_PUBLIC_GITHUB_INTEGRATION_CLIENT_ID= GITHUB_INTEGRATION_CLIENT_SECRET="
Can you help me out?
Hey @krishchvn , you don't need to add the integration variables. What is the error you are getting? I don't see any error logs on the screenshot you shared. Did you build the images first, with docker-compose -f dev-docker-compose.yml build ?
Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:80 -> 0.0.0.0:0: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Yes, I've build docker images first,
Hmm, perhaps you are trying to access the console over http instead of https? With the default setup, the console will run at https://localhost with a self-signed cert.
I don't think so all containers are starting properly. Below is the log
✔ Container phase-redis-dev Created 0.0s
✔ Container phase-postgres Created 0.0s
✔ Container phase-backend-dev Recreated 1.5s
✔ Container phase-rqworker-dev Recreated 0.7s
✔ Container phase-frontend-dev Recreated 0.6s
✔ Container phase-nginx-dev Recreated 0.3s
Attaching to phase-backend-dev, phase-frontend-dev, phase-nginx-dev, phase-postgres, phase-redis-dev, phase-rqworker-dev
phase-redis-dev | 1:C 18 Jul 2024 05:10:12.284 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
phase-redis-dev | 1:C 18 Jul 2024 05:10:12.284 * Redis version=7.2.5, bits=64, commit=00000000, modified=0, pid=1, just started
phase-redis-dev | 1:C 18 Jul 2024 05:10:12.284 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
phase-redis-dev | 1:M 18 Jul 2024 05:10:12.285 * monotonic clock: POSIX clock_gettime
phase-redis-dev | 1:M 18 Jul 2024 05:10:12.324 * Running mode=standalone, port=6379.
phase-postgres |
phase-postgres | PostgreSQL Database directory appears to contain a database; Skipping initialization
phase-postgres |
phase-redis-dev | 1:M 18 Jul 2024 05:10:12.635 * Server initialized
phase-redis-dev | 1:M 18 Jul 2024 05:10:12.635 * Ready to accept connections tcp
phase-postgres | 2024-07-18 05:10:19.397 UTC [1] LOG: starting PostgreSQL 15.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit
phase-postgres | 2024-07-18 05:10:19.397 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
phase-postgres | 2024-07-18 05:10:19.397 UTC [1] LOG: listening on IPv6 address "::", port 5432
phase-postgres | 2024-07-18 05:10:19.478 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
phase-postgres | 2024-07-18 05:10:19.790 UTC [24] LOG: database system was interrupted; last known up at 2024-07-18 04:11:38 UTC
phase-postgres | 2024-07-18 05:10:20.606 UTC [24] LOG: database system was not properly shut down; automatic recovery in progress
phase-postgres | 2024-07-18 05:10:20.613 UTC [24] LOG: invalid record length at 0/1B75A38: wanted 24, got 0
phase-postgres | 2024-07-18 05:10:20.613 UTC [24] LOG: redo is not required
phase-postgres | 2024-07-18 05:10:20.674 UTC [22] LOG: checkpoint starting: end-of-recovery immediate wait
phase-postgres | 2024-07-18 05:10:20.895 UTC [22] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.091 s, sync=0.021 s, total=0.276 s; sync files=2, longest=0.019 s, average=0.011 s; distance=0 kB, estimate=0 kB
phase-postgres | 2024-07-18 05:10:21.019 UTC [1] LOG: database system is ready to accept connections
Gracefully stopping... (press Ctrl+C again to force)
[+] Stopping 0/0
- Container phase-nginx-dev Stopping 0.0s
- Container phase-rqworker-dev Stopping 0.0s Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:80 -> 0.0.0.0:0: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
What do you see when you open https://localhost in the browser?
I don't think so all containers are starting properly. Below is the log ✔ Container phase-redis-dev Created 0.0s ✔ Container phase-postgres Created 0.0s ✔ Container phase-backend-dev Recreated 1.5s ✔ Container phase-rqworker-dev Recreated 0.7s ✔ Container phase-frontend-dev Recreated 0.6s ✔ Container phase-nginx-dev Recreated 0.3s Attaching to phase-backend-dev, phase-frontend-dev, phase-nginx-dev, phase-postgres, phase-redis-dev, phase-rqworker-dev phase-redis-dev | 1:C 18 Jul 2024 05:10:12.284 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo phase-redis-dev | 1:C 18 Jul 2024 05:10:12.284 * Redis version=7.2.5, bits=64, commit=00000000, modified=0, pid=1, just started phase-redis-dev | 1:C 18 Jul 2024 05:10:12.284 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf phase-redis-dev | 1:M 18 Jul 2024 05:10:12.285 * monotonic clock: POSIX clock_gettime phase-redis-dev | 1:M 18 Jul 2024 05:10:12.324 * Running mode=standalone, port=6379. phase-postgres | phase-postgres | PostgreSQL Database directory appears to contain a database; Skipping initialization phase-postgres | phase-redis-dev | 1:M 18 Jul 2024 05:10:12.635 * Server initialized phase-redis-dev | 1:M 18 Jul 2024 05:10:12.635 * Ready to accept connections tcp phase-postgres | 2024-07-18 05:10:19.397 UTC [1] LOG: starting PostgreSQL 15.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit phase-postgres | 2024-07-18 05:10:19.397 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 phase-postgres | 2024-07-18 05:10:19.397 UTC [1] LOG: listening on IPv6 address "::", port 5432 phase-postgres | 2024-07-18 05:10:19.478 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" phase-postgres | 2024-07-18 05:10:19.790 UTC [24] LOG: database system was interrupted; last known up at 2024-07-18 04:11:38 UTC phase-postgres | 2024-07-18 05:10:20.606 UTC [24] LOG: database system was not properly shut down; automatic recovery in progress phase-postgres | 2024-07-18 05:10:20.613 UTC [24] LOG: invalid record length at 0/1B75A38: wanted 24, got 0 phase-postgres | 2024-07-18 05:10:20.613 UTC [24] LOG: redo is not required phase-postgres | 2024-07-18 05:10:20.674 UTC [22] LOG: checkpoint starting: end-of-recovery immediate wait phase-postgres | 2024-07-18 05:10:20.895 UTC [22] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.091 s, sync=0.021 s, total=0.276 s; sync files=2, longest=0.019 s, average=0.011 s; distance=0 kB, estimate=0 kB phase-postgres | 2024-07-18 05:10:21.019 UTC [1] LOG: database system is ready to accept connections Gracefully stopping... (press Ctrl+C again to force) [+] Stopping 0/0
* Container phase-nginx-dev Stopping 0.0s * Container phase-rqworker-dev Stopping 0.0s Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:80 -> 0.0.0.0:0: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
@krishchvn hey, this seems like your system (windows) is having trouble binding port 80 on your host system to 80 of the nginx container.
possible solutions:
- permission issue - make sure the docker user has sudo access
- check which port is currently using port 80 -
netstat -ano | findstr :80, find the PID and kill the process by runningtaskkill /PID <PID> /F - bind 80 to a different port - eg. 8080 in your
dev-docker-composefile
Hi. Tried changing the port to 81:80 and it worked. Thanks guys. However, I am getting a 504 Gateway Timed out error after logging into github on localhost.