E0009 Cannot create file "filepath". "Error Text"

From RAD Studio
Jump to: navigation, search

Go Up to Platform Assistant Server Errors Index


The "Error Text" may be any of the following:

Each of the above has a different reason and a different solution. See the appropriate section below for more information.

Access is denied

This error may occur if you do not have write permissions in your scratch directory.

The filepath in the error message is an absolute path of the system running the Platform Assistant. The Platform Assistant server could not write a file from your development PC into the specified filepath.

There are several ways to fix this error:

  • If the Platform Assistant server is running on a Mac follow these steps:
    1. Open the Finder, and go into the target directory.
    2. Right-click somewhere inside the directory, and select Get Info.
    3. Expand Sharing and Permissions.
    4. Change your user permissions (Privilege) so that you have both read and write permissions on the target directory.
  • If the Platform Assistant server is running on a Windows system do any of the following:
    • Specify a different scratch directory. To specify a different scratch directory do any of the following:
      • Specify a new scratch directory path in the default configuration file of the Platform Assistant: paserver.config. This file is located in the PAServer installation directory. Open paserver.config with a text editor and add the new path where it says {{{1}}}. For example, scratchdir=C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\23.0\PAServer\scratch-dir.
        Note: If you use this method, you do not have to specify the scratch directory every time you run the Platform Assistant.
      • Provide the new path to the scratch directory as a command-line switch. See Specifying the Scratch Directory Location on the Command Line.
        Note: If you use this method, you have to specify the scratch directory every time you run the Platform Assistant.
      • Create a shortcut to the paserver.exe file and specify the command-line switch in the "Target" field:
        1. Right-click on paserver.exe and select "Create shortcut".
        2. Right-click on the shortcut that you created and select "Properties".
        3. Add the -scratchdir=<path> command switch to the end of the "Target" field. For example, "C:\Program Files (x86)\Embarcadero\PAServer\23.0\paserver.exe" -scratchdir=C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\23.0\PAServer\scratch-dir.
          Note: If you use this method, you do not have to specify the scratch directory every time you run the Platform Assistant.
    • Run paserver.exe as administrator:
      • Right-click on paserver.exe and select "Run as administrator".
        Note: If you use this method, you have to do this step every time you run the Platform Assistant.
      • Right-click on paserver.exe and select "Properties". In the "Compatibility" tab, check "Run this program as administrator". Click "OK" to apply the change.
        Note: If you use this method, you do not have to this step every time you run the Platform Assistant.
    • Reinstall the Platform Assistant in a different location.
      Note: During the installation, provide an install location where your user account has read and write permissions, such as C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\23.0\PAServer.

The process cannot access the file because it is being used by another process

This error may occur when you remote-debug a 32-bit windows application. It occurs if you do not set the Include remote debug symbols option in Project > Options > Delphi Compiler > Linking to True. This option is True by default for 64-bit windows applications, so this error only applies to 32-bit windows applications.

In order to resolve this error:

  1. Close the PAServer instance on the remote machine (run the q command, as described here: Running the Platform Assistant on Windows).
  2. Set the Include remote debug symbols option in Project > Options > Delphi Compiler > Linking to True.
  3. Restart the PAServer instance on the remote machine.
  4. Debug the application.

The system cannot find the path specified

This error occurs if you specify an invalid path as the scratch-dir parameter for the PAServer. If the path that you provide does not exist but can be created (for example, the path includes directories that do not exist), PAServer automatically creates any missing directories. If that is not possible, the aforementioned error occurs.

See Configuring the Scratch Directory on the Command Line and Configuring the Platform Assistant with a Configuration File for more information on how to set the scratch-dir path.

Stream write error

This PAClient Error occurs when you are trying to deploy a running project and you have limited hard drive space. Freeing up hard drive space and restarting the PAServer will make your project run without issues again.

Other Exceptions

There are other exceptions or error dialogs that may occur if you specify a path as the scratch directory that is too long. The maximum total path for the application executable may not exceed 255 characters. This includes the subdirectories that the PAServer automatically creates for each project, so keep that in mind when setting the path to your scratch directory. The path to your application executable is: scratch-dir/<Username>-<Connection Name>/<Project Name>/<Project Name>.exe

See Also