h4570 / armnas

NAS dashboard for Raspbian/Armbian devices. 5 minutes to install.
Apache License 2.0
23 stars 6 forks source link

Error incorrect login on clean install #23

Open N4DAR opened 2 years ago

N4DAR commented 2 years ago

Welp, almost 5 hours have passed and i still don't know what's wrong. This is now the sixth time i reainstall all from scratch, thinking i may have missed something.

Right after finishing the install, reboot, then try to reach the login page: Asks for a password, should i guess be the 'armnas user password' i typed during the install. Incorrect. Inspected the page and get looping errors "CORS header 'access-control-allow-origin' missing".

I'm not familiar with caddy AT ALL but it seems it should be something in the caddyfile ?

OrangePi Zero2, here (H616, armbian 22.02.1) Capture

Sorry for such a 'low level issue' but well, i'm stuck :/

.

h4570 commented 2 years ago

Hi.

I will try to help you with this problem. Here are my propositions to do:

Option 1 - Reinstall

  1. Delete /var/www/armnas directory.
  2. Install again.
  3. Try to login.

If this will not work

Option 2 - Manual register

  1. Login as root or armnas -> su root
  2. Execute
    cd /var/www/armnas/backend/WebApi
    ./stop.sh
    rm -rf armnas.db
    ./start.sh
  3. Wait couple seconds. armnas.db file should be created again.
  4. Execute (put password and armnas api ip)
    curl --header "Content-Type: application/json" --request POST --data "{\"id\":0,\"login\":\"admin\",\"password\":\"YOUR_PASSWORD_HERE\"}" http://ARMNAS_API_IP_PORT_HERE/user/register

Good example with response

> curl --header "Content-Type: application/json" --request POST --data "{\"id\":0,\"login\":\"admin\",\"password\":\"superpassword\"}" http://192.168.254.128:9970/user/register  

{"id":1,"login":"admin","password":null}
  1. Try to login.

If this will not work

Option 3 - Logs

  1. Please put somewhere your /var/www/armnas/backend/WebApi/webapi.log file. I will try to check it.