Back

How to deploy appwrite Dynamic Links (with TypeScript)

  • 0
  • General
  • Functions
THE-E
9 Oct, 2023, 23:27

Thank Steven for your help so far πŸ™‚

TL;DR
The user is having trouble deploying appwrite Dynamic Links with TypeScript. They have encountered issues with adding custom domains and receiving error messages during domain verification. The user asks for guidance on reissuing certificates and removing and re-adding domains. They also mention using Nginx Proxy Manager. No solution is provided in the thread.
Drake
9 Oct, 2023, 23:41

nah this is expected because the previous migration removed these attributes

THE-E
11 Oct, 2023, 20:33

Can the issue be caused by my Nginx Proxy Manager? I am using it to route to different containers on my server.

Drake
12 Oct, 2023, 01:12

Custom domains being empty? No

THE-E
12 Oct, 2023, 21:41

Yes. As mentioned I do get the message

THE-E
12 Oct, 2023, 21:42

... But there is no entry in later.

THE-E
12 Oct, 2023, 21:43

Should an entry be listed in Traefik? Could I check somewhere particular, to see where it fails?

Drake
12 Oct, 2023, 21:44

No

Drake
12 Oct, 2023, 21:45

How many projects do you have?

THE-E
12 Oct, 2023, 21:46

Only one, even though the Migration displayed 2/2 projects. Which is also weird.

Drake
12 Oct, 2023, 21:47

Check the docker logs from the appwrite and appwrite-worker-certificates containers for errors or anything related to rules

Drake
12 Oct, 2023, 21:47

That's fine. The console is the other project

THE-E
12 Oct, 2023, 22:10

So the error was, that it was already assigned to a other function. [Error] Message: Domain already assigned to 'function' service with ID 'triggerFunction'.

So now I deleted custom domain from triggerFunction and tried to add it to the dynamic links function. The problem is my appwrite backend subdomain is baas.example.com and I am trying to add link.example.com. That (link.example.com) is also what I am adding when asked for Domain. The verification fails and shows

Type: CNAME Name:link Value:baas.example.com

Shouldn't Value be example.com?

Drake
12 Oct, 2023, 22:11

Nope, that's correct for cname records

THE-E
12 Oct, 2023, 23:10

So the error in the appwrite container is:

TypeScript
[Error] Timestamp: 2023-10-12T23:05:49+00:00
[Error] Method: PATCH
[Error] URL: /v1/proxy/rules/:ruleId/verification
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Domain verification failed. Please check if your DNS records are correct and try again.
[Error] File: /usr/src/code/app/controllers/api/proxy.php
[Error] Line: 297

Should the link.example.com be directing me to the backend, such as baas.example.com does?

Drake
13 Oct, 2023, 02:08

Link.example.com and baas.example.com should point to your appwrite instance

THE-E
18 Oct, 2023, 17:23

So I managed to get the link.example.com domain to access my appwrite backend by adding it in Custom Domains of the project settings. And the certification is generated. I still didn't manage to add it to the function, custom domain.

THE-E
18 Oct, 2023, 17:24

I can't use link.example.com for backend access (registered under custom domains in project settings) and also add it as function domain, isn't?

Drake
18 Oct, 2023, 17:48

correct

THE-E
18 Oct, 2023, 18:27

Can I simply remove the entry from custom domains and try i again in function domains?

THE-E
18 Oct, 2023, 18:28

I was wondering, because of the certificate issued, whether it can be reissued or whether I have to make any backup.

Drake
18 Oct, 2023, 21:32

Yes, I believe so

THE-E
18 Oct, 2023, 22:16

Thanks a lot Steven, it worked. I don't know why it didn't work in the passed. But one issue is definately, that there is no message, when you try to add a custom domain several times e.g. project level and function level. There is no error, instead there is a success message without any successful operation.

Drake
18 Oct, 2023, 22:45

it would be good to create an issue for this

erb_abtis
20 Oct, 2023, 12:41

I will do that πŸ™‚. I will check whether it is easily reproducible, and once I have the steps, I will create an Issue on GitHub.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more