Troubleshooting Thursdays : Server detected changes needs to refreshed again (File operations in Functions, tested locally using CLI)

Troubleshooting Thursdays : Server detected changes needs to refreshed again (File operations in Functions, tested locally using CLI)

If you face an error saying that the server detected changes inside the functions folder and needs to refresh again and stops executing your code, then we got the fix for you.

  1. catalyst serve --no-watch
While performing file related operations, the catalyst serve command will perform hot code replace when a change to any file in the folder is detected. This will cause ECONNRESET(connection reset) issue. When catalyst serve --no-watch command is run, there will be no hot code replace(will not look for any changes), and hence the file will be written properly.
    • Related Articles

    • Troubleshooting Thursdays : Permission Issues while installing the CLI

      If you face EACCESS issues, while installing the CLI, this is because you do not have adequate permission to install the CLI in the system. If you are using a Windows system, you can install the Catalyst CLI with admin access, otherwise, you can use ...
    • Attaching a file from File Store in an email

      As of now, we do not have the support for attaching files while sending email.  For now, we would suggest you to upload the file to the Catalyst Filestore, and create an URL for the same using the Catalyst functions and share the URL via mail to ...
    • Code sample to upload files in File Store using Java

      import java.io.File; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import ...
    • File upload code samples

      For all file operations like uploading, downloading files from the File Store we've created a sample repository that can be accessed here.
    • Basic I/O Function :Troubleshooting Tips

      Do check in your code whether you have used context.close() anywhere after the function block as it might close the function before sending the response. This might have caused you the issue.  The code within the function block will be executed only ...