makeplane / plane

🔥 🔥 🔥 Open Source JIRA, Linear, Monday, and Asana Alternative. Plane helps you track your issues, epics, and product roadmaps in the simplest way possible.
http://plane.so
GNU Affero General Public License v3.0
30.34k stars 1.7k forks source link

[bug]: Provided default application user name and password don't work #719

Closed andy47 closed 1 year ago

andy47 commented 1 year ago

Is there an existing issue for this?

Current behavior

When I have the application running via docker on my laptop I can't log into the application using the default user name and password provided on https://docs.plane.so/self-hosting

The login fails and I see this pop-up error message;

image

Steps to reproduce

  1. Start the application using docker-compose up
  2. Go to the application sign in page (on my machine that is http://localhost:8005/signin )
  3. Attempt to login with the default user name and password supplied on https://docs.plane.so/self-hosting
  4. Login fails.

Environment

Deploy preview

Version

Self-hosted

airdogvan commented 1 year ago

same here

sphynxux commented 1 year ago

Thanks for reporting this @andy47, @airdogvan. We are working on fix for this with high priority. We'll revert back soon.

galaris commented 1 year ago

same

pablohashescobar commented 1 year ago

We have fixed the above issue in our develop branch we are still aggressively testing it and fixing any bugs.

vihar commented 1 year ago

Related to #477.

soxrok2212 commented 1 year ago

Still seeing this bug on develop branch

tkerr97 commented 1 year ago

Same issue here, clicking on forgot password shows "Setting up you workspace" forever

pablohashescobar commented 1 year ago

Greetings everyone, I am the maintainer of Plane. I would like to inform you that the error you have encountered has been resolved in our latest development branch. In order to successfully apply this fix, kindly delete all volumes, network, and the container itself. After which, please proceed with rebuilding the images. Thank you.

tkerr97 commented 1 year ago

Unless you leave the nginx port at 80, you still get the error (it appears to be CORs related). It would be nice to be able to change the port, since I have another docker container on my machine that I would rather have that port.

andy47 commented 1 year ago

Same problem here as @tkerr97 reports.

I already have services running on port 80 and 3000 on the host machine. So I changed nginx to run on port 8005 and plane-web to run on port 3003.

Same error message.

pablohashescobar commented 1 year ago

Hey, can you also please try by updating the Dockerfiles for both backend and frontend Dockerfile.api and Dockerfile.web also the compose as well.

tkerr97 commented 1 year ago

On a clean machine I did the following:

  1. Cloned the repo
  2. Ran setup.sh with my IP
  3. Edited the docker-compose.yml to have the port I want
  4. Ran docker-compose up
  5. Attempted to login with the default username and password and still got the error
heromiyo commented 1 year ago

same

galaris commented 1 year ago

Develop branch solved for me, but I needed to run this to force a rebuild: docker compose up --build

Thanks to n1kh1l!

ghost commented 1 year ago

Still getting this error when changing the nginx port in docker-compose.yml to - 4000:80 as I can't use port 80 on my machine.

heromiyo commented 1 year ago

am still getting this error after doing all the suggested options, this is what i see in the logs nginx | 172.18.0.1 - - [19/Apr/2023:09:34:22 +0000] "POST /api/sign-in/ HTTP/1.1" 502 559 "http://localhost/signin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" nginx | 2023/04/19 09:34:22 [error] 23#23: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 172.18.0.1, server: , request: "POST /api/sign-in/ HTTP/1.1", upstream: "http://172.18.0.2:8000/api/sign-in/", host: "localhost", referrer: "http://localhost/signin"

pablohashescobar commented 1 year ago

Hi @heromiyo are you running this on cloud server or local system and also can you please specify which branch are you in.

heromiyo commented 1 year ago

for error above it was locally on windows but i have deployed the same app on the cloud VM and the branch is develop for both and for the cloud VM one i just cloned the repo just now and did the README step by step https://80-port-c649136594064ade.labs.kodekloud.com/signin

heromiyo commented 1 year ago

please use https://80-port-c649136594064ade.labs.kodekloud.com/signin to test login using default credentials @pablohashescobar

pablohashescobar commented 1 year ago

Hey @heromiyo can you check if the backend container is running

heromiyo commented 1 year ago

it is, here is a terminal you can use to check aswel @pablohashescobar
https://terminal-c649136594064ade.labs.kodekloud.com/

pablohashescobar commented 1 year ago

Hey @heromiyo all the containers are running. The problem is the frontend container is trying to access localhost for API. image

Can you please run the setup script again ./setup.sh https://80-port-c649136594064ade.labs.kodekloud.com again. Then please rebuild all the containers using docker compose up --build. Please let us know if the problem still persist

heromiyo commented 1 year ago

@pablohashescobar still there but the api url is updated https://80-port-c649136594064ade.labs.kodekloud.com/signin

heromiyo commented 1 year ago

and also fails on localhost image

pablohashescobar commented 1 year ago

Hi @heromiyo it would be awesome if you could send your envs at apiserver/.env and apps/app/.env and also the nginx configuration.

pablohashescobar commented 1 year ago

Hello everyone,

We have updated our docker setup and now have pushed pre-built images to DockerHub as well which can be used by using docker-compose -f docker-compose-hub.yml up. Detailed docs can be found here https://docs.plane.so/self-hosting

HearthCore commented 1 year ago

Wonder if a comment will reopen this.

I've cloned the lasted -dev branch, clean setup, still incorrect password for default admin user.

pablohashescobar commented 1 year ago

Hey @HearthCore it would be awesome if you could share browser network logs and docker logs as well.

Alcatraz077 commented 1 year ago

I've ran into this as well. Brand new Ubuntu 22.04 box. I'll gladly provide docker logs, but which containers? All of them?

As for network logs, when I attempt to login with the default creds, it sends the following headers:

OPTIONS /api/sign-in/ undefined
Host: localhost
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Access-Control-Request-Method: POST
Access-Control-Request-Headers: content-type
Referer: http://plane:3000/
Origin: http://plane:3000
DNT: 1
Connection: keep-alive
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site

With the response of:

Response body is not available to scripts (Reason: CORS Failed)
shadowjig commented 1 year ago

When will this fix be deployed to the docker images on hub.docker.com

pablohashescobar commented 1 year ago

Hi @shadowjig, this is already fixed. You may have to run ./setup.sh localhost since the new changes are not deployed to docker hub yet we are still testing some changes.

gomarcd commented 1 year ago

Hello, just trying this out today and encountered the same error. I followed the steps at https://docs.plane.so/self-hosting. I, too, cannot give up port 80.

./setup.sh localhost didn't do anything for me, as I think the compose stack would still be looking to the docker registry for the image unless told to source a local build instead.

When should this be expected to be pushed?

MostHated commented 1 year ago

I just tried this as well, having the same issue. Unable to login with default creds

chengdujin commented 1 year ago

Team, come on! If new comers can't even sign in to the system, confidence will wear off soon!

This is quite a critical bug. Get it done.

pablohashescobar commented 1 year ago

The issue has been successfully resolved. If you're still encountering problems with port 80, you can manually adjust the host port in the nginx container and rerun the setup. In the upcoming version, we will also introduce the ability to update the nginx port through environment variables, which will provide more flexibility. Don't forget to provide the correct URL to ./setup.sh as well.

These steps should help address any lingering issues you may be facing. We appreciate your understanding and cooperation. If you have any further questions or need assistance, feel free to reach out to me directly or join our Discord server. Our team will be more than happy to assist you.

MostHated commented 1 year ago

Interesting. I attempted to use a port other than 80 right out of the gate. For all my local services I never use 80, and use an internally hosted domain (which I passed to the setup.sh) pointing to a Caddy v2 server which in turn reverse proxies to the port I have assigned in whatever service. That said, I attempted to use 8089 as the port from the first go, and have this issue still.

gomarcd commented 1 year ago

I'm still having the issue as well.

To start clean, I did:

docker compose down -v
docker prune system --all
cd .. && sudo rm -r plane
git clone -b master https://github.com/makeplane/plane.git && cd plane
./setup.sh http://plane.domain.tld
nano .env
set -a; source .env; set +a;
docker-compose -f docker-compose-hub.yml up

I edited .env to change nginx port number accordingly and did docker-compose -f docker-compose-hub.yml up

This still produced the same error message. What am I missing?

MostHated commented 1 year ago

Yeah, I see that it is 'resolved'. Unfortunately, I, and several others, are still having the same issue. I wiped out all container images, stored volumes on the system, etc, etc, a clean slate, tried again just to be sure. I tried both with a default port of 80 (just to see), a custom port. I also tried changing what was listed in DEFAULT_USERNAME and DEFAULT_PASSWORD fields before firing it up, to see if that would make a difference. I tried both with just the standard docker-compose.yml, and the docker-compose-hub.yml. I tried everything I could think of to try but always had the same end result of:

pablohashescobar commented 1 year ago

Hi @MostHated, sorry for the inconvenience caused it would be awesome if you could share the browser network logs and also container logs for both frontend and backend.

srvadmindianoil commented 1 year ago

Hi, Am facing the same issue. Unable to log in using the default credentials. plane-login-error

pablohashescobar commented 1 year ago

Hi @srvadmindianoil, it would be awesome if you could share browser network logs and logs for both frontend and backend containers.

Joshua2504 commented 1 year ago

Any idea when this will be fixed in stable branch?

pablohashescobar commented 1 year ago

Hi @Joshua2504, the fix is already in the stable branch if you are still facing issues you can share your browser network logs and also logs for both backend and frontend containers or hop onto our discord server where we should be able to help you out.

shadowjig commented 1 year ago

@pablohashescobar

I'm still having an issue with the login and provided my network log in this issue. Could you take a look and let me know?

From the log I see an ERR_TOO_MANY_REDIRECTS error on the /api/users/me/ endpoint. Which seems to me it's an issue in the proxy container (which I am using and exposing via IP directly to my home network).

pablohashescobar commented 1 year ago

Hi @shadowjig, you are correct it's possible that this issue is caused by Nginx. To confirm, could you please try visiting the /api/users/me/ endpoint in your browser and let me know the response you receive? Additionally, I would like to inquire if you are solely using the Plane setup or if there are any other proxies in front of the Plane setup as well.

shadowjig commented 1 year ago

@pablohashescobar I tried to hit that endpoint and it gave me an ERR_TOO_MANY_REDIRECTS and then reloaded and gave me another error (I think it was 401 unauthorized). So I reloaded the based URL with that endpoint and I was at the onboarding page. Not ideal, it should have worked without going to that endpoint.

Also I'm hitting the proxy directly for this testing. Eventually I want to put nginx-proxy-manager in front of it, but that's down the road.

pablohashescobar commented 1 year ago

Got it @shadowjig, thanks for the update.

mariushosting commented 1 year ago

I think 90% of users facing the same issue. Clean install same issue. Can't login with the default credentials.

ForsakenRei commented 1 year ago

Glad I'm not the only one, neither the default credential nor what I put into .env works.

pablohashescobar commented 1 year ago

Hi folks, this bug has been resolved it would be awesome if you could share your browser network logs and logs for both frontend and backend container or feel free to hop on to our discord server and we would be happy to help you over there.