xyfir / ptorx

📩🛡 Email privacy. Anonymously send and receive with alias forwarding. (Abandoned)
GNU General Public License v3.0
349 stars 22 forks source link

[HELP] Unable to login (Self Hosted) #8

Closed mzch closed 4 years ago

mzch commented 4 years ago

I tried to run Ptorx on my VPS, but can't login. The top screen is as below:

ScreenShot01

Next, when I clicked Launch App button, the white page is loaded:

ScreenShot02

Could you tell me how to fix this issue?

EDITED: I cleared my browser histories ,cookies and local storages, but the result is same.

MrXyfir commented 4 years ago

It would be helpful if you went into all of the .env files in web/ for Ptorx and its submodules and changed the environment from "production" to "development"` so that you can get better error messages. Make sure to rebuild in each web/ directory after!

Have you checked to make sure the API servers are working?

mzch commented 4 years ago

Well, I changed NODE_ENV=develipment and errors are as below:

ScreenShot01 ScreenShot
mzch commented 4 years ago

When chaging to development, Ptorx showed Login/Register button, but accownt didn't listen on 2074 so user register failed. And after that it hasn't been shown any more.

In web/commpoment/info/Info.tsx I found :

interface InfoProps extends WithStyles<typeof styles> {
  user?: Ptorx.User;
}

Where is Ptorx.User defined and load data from?

mzch commented 4 years ago

I vist /accownt/ directly and tried to create my account, Protx said, Something wrong.

TLS?

MrXyfir commented 4 years ago

If I remember correctly, self-signed certificates won't work. I would recommend using https://letsencrypt.org/

The issue is probably that the self-signed certificate is crashing the Accownt server so you cannot sign up or use its API.

mzch commented 4 years ago

I run Apache2 as reverse-proxy and got SSL certificate by using Let's Encrypt. There is no self signed certificate in my VPS.

mzch commented 4 years ago

OK, I changed SMTP_TRANSPORT from localhost to my usual mail server with tls and auth. It's fixed. And I can register my account by visiting /accownt/ directly, but the same error remains.

mzch commented 4 years ago

And then in /accownt/ page I tried to login directly but Not Found was shown.

mzch commented 4 years ago

I tried curl http://127.0.0.1:2070/api/users

ptorx@de:~$ curl http://127.0.0.1:2070/api/users
<!DOCTYPE html>

<html>
  <head>
    <title>Email Forwarding and Aliases by Ptorx</title>

    <meta
      name="viewport"
      content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
    />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    <meta
      name="description"
      content="Send and receive mail anonymously with email forwarding and aliases through Ptorx."
    />
    <meta property="og:title" content="Email Forwarding and Aliases by Ptorx" />
    <meta property="og:site_name" content="Ptorx" />
    <meta property="og:url" content="https://ptorx.com" />
    <meta
      property="og:description"
      content="Send and receive mail anonymously with email forwarding and aliases through Ptorx."
    />
    <meta property="og:image" content="https://i.imgur.com/2lemVOD.png" />
    <meta property="og:type" content="website" />

    <link rel="icon" type="image/png" href="/icon.png" />

    <!-- <script src="https://uixmail.com/yalcs//static/yalcs-loader.js" async></script> -->
  </head>
  <body>
    <div id="content"></div>
  <script type="text/javascript" src="/static/main.cf13551286a88786e3dd.js"></script></body>
</html>

What's wrong?

CRON=true

MYSQL={"host":"localhost","port":3306,"user":"ptorx","charset":"UTF8MB4_UNICODE_CI","password":"password","database":"ptorx","dateStrings":true,"connectionLimit":100,"supportBigNumbers":true,"waitForConnections":true}

DOMAIN="uixmail.com"

JWT_KEY="secret"

SRS_KEY="secret"

API_URL="https://uixmail.com/api/"

WEB_URL="https://uixmail.com/"

API_PORT=2070

MTA_PORT=2071

MSA_PORT=2076

NODE_ENV="production"

DOMAIN_ID=1

TEST_MTA_PORT=2072

WEB_DIRECTORY="/srv/ptorx/ptorx/web"

CCASHCOW_WEB_URL="https://uixmail.com/ccashcow/api/"

PERSISTENT_ALIAS="mzch@uixmail.com"

SMTP_SERVER_OPTIONS={"banner":"mail.uixmail.com","name":"mail.uixmail.com","size":25000000}

MAIL_CACHE_DIRECTORY="/srv/ptorx/mail-cache"

mzch commented 4 years ago

Hi, fixed this. I use Apache2, changed proxy location /api to /api/6 and went well. But another problem.

I clicked Back To... button then redirect to /app/jwt=0, but Not Found error.

mzch commented 4 years ago

I added Rewrite rule then I can access /app and /info without problem. But Uncaught SyntaxError: Unexpected token '<' error occurred in main...js.

mzch commented 4 years ago

And I use MariaDB but no user data haven't been registered. It it OK?

mzch commented 4 years ago

Using nginx I registered and tried to login, but said:

GET https://uixmail.com/accownt/api/account 400
(anonymous) @ main.01bd54664303b3940ef5.js:20
e.exports @ main.01bd54664303b3940ef5.js:20
e.exports @ main.01bd54664303b3940ef5.js:64
Promise.then (async)
u.request @ main.01bd54664303b3940ef5.js:64
r.forEach.u.<computed> @ main.01bd54664303b3940ef5.js:64
(anonymous) @ main.01bd54664303b3940ef5.js:20
componentDidMount @ main.01bd54664303b3940ef5.js:20
ql @ main.01bd54664303b3940ef5.js:36
t.unstable_runWithPriority @ main.01bd54664303b3940ef5.js:44
po @ main.01bd54664303b3940ef5.js:36
$l @ main.01bd54664303b3940ef5.js:36
_l @ main.01bd54664303b3940ef5.js:36
du @ main.01bd54664303b3940ef5.js:36
pu @ main.01bd54664303b3940ef5.js:36
(anonymous) @ main.01bd54664303b3940ef5.js:36
Fl @ main.01bd54664303b3940ef5.js:36
wu @ main.01bd54664303b3940ef5.js:36
render @ main.01bd54664303b3940ef5.js:36
(anonymous) @ main.01bd54664303b3940ef5.js:20
n @ main.01bd54664303b3940ef5.js:1
(anonymous) @ main.01bd54664303b3940ef5.js:1
(anonymous) @ main.01bd54664303b3940ef5.js:1

I have not been able to login yet.

mzch commented 4 years ago

It seems that I'm facing another issue. I'm closing this and will open another.