snapp icon indicating copy to clipboard operation
snapp copied to clipboard

Issues with additional users: invite not sent and recovery without action

Open acseven opened this issue 1 year ago • 15 comments

Hi,

I've setup snapp and it's mostly working as expected, but I haven't been able to get additional users on the platform. E-mails are working though, when testing and recovery emails are received.

Here are my SMTP settings:

    SMTP_HOST: smtp.example.com
    SMTP_USER: [email protected]
    SMTP_PASS: password
    SMTP_FROM: [email protected]
    SMTP_PORT: 587
    SMTP_SSL: false
  1. Inviting users doesn't send an email and throws this error in the log:
Listening on 0.0.0.0:3000
ReferenceError: require is not defined
    at create (file:///app/build/server/chunks/15-DE8Ivn1e.js:98:24)
    at async handle_action_json_request (file:///app/build/server/index.js:2595:18)
    at async resolve2 (file:///app/build/server/index.js:5010:24)
    at async Object.handle (file:///app/build/server/chunks/hooks.server-C4-dAC0j.js:64:10)
    at async respond (file:///app/build/server/index.js:4902:22)
    at async Array.ssr (file:///app/build/handler.js:1262:3)
  1. Recover password sends an email to the user that has no actionable button. It's just simple text!

  2. Minor UI issues:

image

image

Thanks!

acseven avatar Oct 10 '24 16:10 acseven

i'll take a look into it. for icons try to hard refresh, it get them as a font, so if one works everyone should works 🤔

i'll upload 0.8.6.5 that would fix missing required.

edit: also recover password should works, does your email client block suspicious link?

urania-dev avatar Oct 10 '24 17:10 urania-dev

i'll take a look into it. for icons try to hard refresh, it get them as a font, so if one works everyone should works 🤔

It happens only with the active selection, here's another one:

image

I've cleared the cache and there are no console issues here...

edit: also recover password should works, does your email client block suspicious link?

Ha, I've retried it and now appeared correctly! But the first time I got this one:

image

acseven avatar Oct 10 '24 18:10 acseven

Also, I've just confirmed with new users, the recovery email arriving like the screenshot I've sent is an actual issue. I don't have any error though and email accounts are all in the same server (I.e. received correctly and incorrectly).

acseven avatar Oct 10 '24 18:10 acseven

i think i have addressed all the issue, try 0.8.6.5, it will take some time to build and upload :)

urania-dev avatar Oct 10 '24 18:10 urania-dev

try now :)

urania-dev avatar Oct 10 '24 18:10 urania-dev

Thanks! Regarding the emails, I haven't yet been able to receive one when a user is invited. As for password recover emails, I've tried a personal IMAP account (OK), a gmail account (two times and none arrived, not even in the spam folder), and an Outlook.com account (OK).

Regarding the icons are now working great!

Ps: here's an improvement suggestion using current empty space, displaying a truncated version of the original url next to the shortened one; I think it would help going through previous links.

Captura de ecrã 2024-10-10, às 21 10 09

acseven avatar Oct 10 '24 20:10 acseven

you can actually activate the column for original url :)

i'll look into invite emails, as for gmail require very strict rules, so i can't help you with that, i managed to make it work with mine, so i suppose the app itself work, but i miss knowledge to correctly debug that, i'm sorry.

urania-dev avatar Oct 10 '24 20:10 urania-dev

Geesh... Captura de ecrã 2024-10-10, às 21 45 11

Many thanks on that, I did not notice the button there at the bottom.

Gmail was just for testing, it's not a big deal for me. The invites on the other hand, would be great to have working.

acseven avatar Oct 10 '24 20:10 acseven

have you tried configuring the smtp via config file / ui panel / env?

urania-dev avatar Oct 10 '24 21:10 urania-dev

Settings in the docker compose and UI are the same, and I've modified passwords, etc while testing. But right now emails are being sent out; in particular test emails and correct/incorrect password recovery emails.

acseven avatar Oct 10 '24 21:10 acseven

it is just invitation that still doesn't work

urania-dev avatar Oct 10 '24 21:10 urania-dev

I will need to verify that tomorrow, but apparently yes.

acseven avatar Oct 10 '24 21:10 acseven

Just confirmed that invites are being sent out, but without buttons:

image

Same with password recovery emails:

image

This particular user has yet to receive any email but these broken ones.

Is there a way just to set a password for the user?

acseven avatar Oct 11 '24 08:10 acseven

In case it helps, here's the source for one of those emails:

<!doctype html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
		<div style="
				background-color: #f2f5f7;
				color: #242424;
				font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari,
					'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
				font-size: 16px;
				font-weight: 400;
				letter-spacing: 0.15008px;
				line-height: 1.5;
				margin: 0;
				padding: 32px 0;
				min-height: 100%;
				width: 100%;
			">
			<table align="center" width="100%" style="margin: 0 auto; max-width: 600px; background-color: #ffffff" role="presentation" cellspacing="0" cellpadding="0" border="0">
				<tbody>
					<tr style="width: 100%">
						<td>
							<div style="padding: 24px 24px 8px 24px; text-align: left">
								<img alt="Snapp.li" src="https://url.mydomain.com/logo.svg" height="24" style="
										height: 24px;
										outline: none;
										border: none;
										text-decoration: none;
										vertical-align: middle;
										display: inline-block;
										max-width: 100%;
									">
							</div>
							<h3 style="
									font-weight: bold;
									text-align: left;
									margin: 0;
									font-size: 20px;
									padding: 32px 24px 0px 24px;
								">
								Reset your password?
							</h3>
							<div style="font-weight: normal; padding: 16px 24px 16px 24px">Hi myusername</div>
							<div style="
									color: #474849;
									font-size: 14px;
									font-weight: normal;
									text-align: left;
									padding: 8px 24px 16px 24px;
								">
								If you didn't request a reset, don't worry. You can safely ignore this
								email.
							</div>
							<div style="text-align: left; padding: 12px 24px 32px 24px">
								<a href="https://url.mydomain.com/auth/recover-password?token=5ltn7c3w7afxsfezerpztlqm3avheb7jb7h5maoc" style="
										color: #ffffff;
										font-size: 14px;
										font-family: 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
										font-weight: bold;
										background-color: #0068ff;
										display: inline-block;
										padding: 12px 20px;
										text-decoration: none;
									" target="_blank"><span><!--[if mso
											]><i
												style="letter-spacing: 20px; mso-font-width: -100%; mso-text-raise: 30"
												hidden
												>&nbsp;</i
											><!
										[endif]--></span><span>Change my password</span><span><!--[if mso
											]><i style="letter-spacing: 20px; mso-font-width: -100%" hidden>&nbsp;</i><!
										[endif]--></span></a>
							</div>
							<div style="padding: 16px 24px 16px 24px">
								<hr style="width: 100%; border: none; border-top: 1px solid #eeeeee; margin: 0">
							</div>
							<div style="
									color: #474849;
									font-size: 12px;
									font-weight: normal;
									text-align: left;
									padding: 4px 24px 24px 24px;
								">
								<p>
									Need help? Just visit us to our
									<a href="https://url.mydomain.com" target="_blank">platform</a>.
								</p>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</body>
</html>

Also, I found that (using outlook) if I use the "view in the browser" option, the user can actually get to click the link, which is a workaround for now:

image

acseven avatar Oct 11 '24 11:10 acseven

would you mind try to set up a different smtp like resend to test the smtp?

the point being that on my outlook and gmail accounts i can see the text and the button,

i think it may depend also to the fact that the backend is in a http:// environment if I get your configuration correctly, that alone could be a security concern as a link pointing to a non secure website (?).

gmail outlook

edited: a lot of typos

urania-dev avatar Oct 12 '24 09:10 urania-dev

Sure, I will try it as soon as possible!

acseven avatar Oct 13 '24 15:10 acseven

Feel free to open a new one in case 🚀

urania-dev avatar Oct 16 '24 15:10 urania-dev