E0009 Cannot create file "filepath". "Error Text"
Go Up to Platform Assistant Server Errors Index
The "Error Text" may be any of the following:
- Access is denied.
- The process cannot access the file because it is being used by another process.
- The system cannot find the path specified.
Each of the above has a different reason and a different solution. See the appropriate section below for more information.
Contents
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 Mac:
- Open the Finder, and go into the target directory.
- Right-click somewhere inside the directory, and select Get Info.
- Expand Sharing and Permissions.
- Change your user permissions (Privilege) so that you have both read and write permissions on the target directory.
On Windows:
For the Windows Platform, users can choose any of the three methods described below.
Method 1: Specify a different scratch directory using any of the options below.
| Options | Perform on each PA run |
|---|---|
|
Specify a new scratch directory path in the Platform Assistant's default configuration file, paserver.config. This file is located in the 1=scratchdir=C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\23.0\PAServer\scratch-dir. |
No |
|
Provide the new path to the scratch directory as a command-line switch. See Specifying the Scratch Directory Location on the Command Line. |
Yes |
|
Create a shortcut to the
1="C:\Program Files (x86)\Embarcadero\PAServer\23.0\paserver.exe" -scratchdir=C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\23.0\PAServer\scratch-dir. |
No |
Method 2: Run paserver.exe as administrator using any of the options below.
| Options | Perform on each PA run |
|---|---|
|
Right-click on |
|
|
Right-click on |
Method 3: Reinstall the Platform Assistant in a different location.
| Options | Perform on each PA run |
|---|---|
|
During the installation, provide an install location where your user account has read and write permissions, such as |
N/A |
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:
- Close the PAServer instance on the remote machine (run the
qcommand, as described here: Running the Platform Assistant on Windows). - Set the Include remote debug symbols option in Project > Options > Delphi Compiler > Linking to
True. - Restart the PAServer instance on the remote machine.
- Debug the application.
The system cannot find the path specified
This error occurs when you specify an invalid path for the scratch-dir parameter of the PAServer. If the path 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 try to deploy a running project and have limited hard drive space. Freeing up hard drive space and restarting the PAServer will allow your project to run without issues again.
Other Exceptions
Other exceptions or error dialogs 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