Application with no name showed up in project

I have an application that has appeared inside one of my projects that has no name listed for it. Two things occurred today that could be related, but I’m not sure they are.

First, I was working on a ‘blank’ php application earlier without having used the ‘Keep me logged in’ option on the logon screen and the session timed out while I was editing the application. When I clicked the save button it redirected me back to the logon screen. I didn’t notice the blank application after that, but I might have missed it.

Second, I got a server error while trying to check for Scriptcase updates. After I refreshed the browser and logged back in I noticed the phantom application.

The application is not in the root, but is in the same subfolder where the blank PHP application I was working on is located.

If I click the run button next to the phantom app, I get:

() : This application requires a connection to be performed. The connection is still not set.
To change it please go the SQL option in the left menu, and edit the Connection

If I click the edit button next to it, I get:

The error message is: PHP Fatal error: Class ‘nm’ not found in C:\Program Files\NetMake\v9-php73\wwwroot\scriptcase\devel\class\page\nmPageApp.class.php on line 1032

If I click the rename button I get “Rename application undefined to:”
image

If I try to rename it, I get:
an error occurred while accessing the database. NOT NULL constraint failed: sc_tbapl.Cod_Prj | Script: C:\Program Files\NetMake\v9-php73\wwwroot\scriptcase\devel\class\interface\nmApplication.class.php linha: 660

Finally, if I check the box to the left of the application and try to move it to another folder, I get “Before proceeding, close the applications.” and if I try to delete it I get “It is not possible to delete an application that is opened.”

Is there any way to get this phantom application out of my project, or do I have to export all the other applications and import them into a new project?

I have the same problem.
If you find a solution please let me know.

I had the same problem sometime ago. I had export my project and import as new project to get rid of it

Another option is to locate the SQLite file that contains the project. I removed it from there. I can’t exactly remember as it happened quite some time ago. But if you inspect the tables you’ll be able to find out.

@aducom Thanks, that worked.

@maxi If you plan to do the same thing see the queries I used below. I first made a backup of the database, and since this is the first time I had edited the DB I was extra cautious and tried my queries in the backup database first. Once I was comfortable that I had the queries written correctly, I ran them against the original database file. When I reopened the project, the bad app was gone.

In my case I was using sqlite3.exe in windows command window:

c:\path_to_sqlite3_exe\sqlite3 c:\program files\netmake\v9-php73\wwwroot\scriptcase\devel\conf\scriptcase\nm_scriptcase.db

^^^^ this is the real database path (for my environment). Change the last part to point your backup if you want to work on that first.

then to list all the apps in the project:

sqlite> select Cod_Prj, Cod_Apl, Descricao, Folder, Data_Inc from sc_tbapl where Cod_Prj = 'my project name';

or list just the bad app:

sqlite> select Cod_Prj, Cod_Apl, Descricao, Folder, Data_Inc from sc_tbapl where Cod_Prj = 'my project name' and Cod_Apl = '';

That brought up just the one record with the blank name.

Finally:

sqlite> delete from sc_tbapl where Cod_Prj = 'my project name' and Cod_Apl = '';

That removed the bad record.