Write file failed. Cannot read properties of undefined (reading 'generateConnectActionFile')

Hi, I am currently following the Wappler 5.0 Quickstart playlist on YouTube and I am already at the part to create authorisation code to send to receipient upon registration. So I have setup the smtp and all the necessary actions as showed in the video. When i press ‘save all’ there’s an error as in the screenshot.

From the browser debugging, this is the error message i received after i submitted the form:
{status: “500”, code: “EDNS”, message: “getaddrinfo ENOTFOUND smtp.hostinger.com”,…}

I tried all I can, even restarted Wappler. What should i do?

When in development (local) mode, I use the mail server of my Internet Service Provider (ISP). In my case this is TPG and their mail server address is mail.tpg.com.au. This is for testing purposes only.

Once the site goes to production, I change it to whatever the remote server requires.

I hope that this helps.

There are two distinct problems in this topic:

  1. UI error write file: Cannot read properties of undefined (reading ‘generateConnectActionFile’)
  2. Can’t DNS resolve smtp.hostinger.com

Problem 2 is likely to be temporary, try again. Otherwise, your ISP might be blocking DNS resolution for such domain and therefore you should try using another DNS provider like Google DNS (8.8.8.8) or Cloudflare’s public resolver (1.1.1.1)

Problem 1 I’m not sure what’s causing it. Can you say what Wappler version are you using and your Windows version? And then this is a bug report

I have checked hostinger and the settings appear correct.
I suspect the settings are not being saved which in turn leads to the DNS lookup failure…
The development platform and OS type are not specified in the question so difficult to go further on the but I suspect 1 of 2 issues.

  1. File permission issue on machine (least likely)
  2. Wappler bug.

What do you think @Teodor?

Thanks everyone for the reply. I tried @ben 's suggestion to use a test SMTP. I don’t have mail server provided by my ISP. So i used a fake SMTP provided by debugmail.io and everything worked as expected. The error does not appear again and the form works well.

To answer @Apple I am using the latest version of Wappler (5.2.6) and Windows 10 22H2. I retried the hostinger SMTP settings and saved, this time no error. But there was error when I submitted the form:

{status: “500”, code: “ESOCKET”, message: “connect ETIMEDOUT 34.117.234.7:465”,…}

UPDATE: I tried a different ISP (using my mobile data) and now it worked for both the fake SMTP and hostinger SMTP. Everything is working perfectly.

Except that when I tried to press on “Save All” there is an error, but different message at a time. Sometimes it says the write file register.json failed, other times write file db.json failed. Also, it sometimes it says error exec query knex client not found.

UPDATE 2: i tried saving the files (the ones that appear on the error message) individually instead of save all when the error message appears. Then i tried clicking on save all again. No error message anymore. A bug?

Saving individual pages before using the save all actually solves the problem