Unable to save project

Hi,

Having a problem saving any changes to my project.

If I open the project settings, first the save button doesn't do anything so instead I "command" + S to save the project (with or without changes) and I get a little red pop-up (nothing in the Output):

CleanShot 2024-06-05 at 15.58.37

It appears for about a second then goes, no other errors that I can see/find.

I thought it might be a problem in my project.json file but it is valid json (no missing {[ etc.)

I am able to use the resource manager to add servers etc. and the settings are reflected in the project.json file.

Anyone seen anything similar or got any thoughts on what I should be looking for to fix this?

Everything else is working fine, just can't add a staging server or make any changes to the project.

Thanks,

Paul

Do you have specific database settings per target seems like a port is missing there somewhere.

What kind of database have you selected?

I use Postgresql in docker in the development target.

I can't add a live target now although I did previously have a target setup and removed it so perhaps something is lurking in the background.

At the beginning I had a different db setup which I remove early on in development but oddly enough it resurfaced in the live target I created last week which is why I removed the live target a few days ago.

Is there anywhere I can look for where the port setting might be?

Would it help if I showed the contents of the project.json file.

I tried recovering the project.json from before I removed the live server but I still get the error.

Well all project target settings are saved in .wappler/project.json

It is a hidden folder, so choose to show the hidden files first from the context menu in File Manager.

So check if you see any leftovers there

Thanks George,

I have gone through the project.json file and compared it against a couple of other projects and all looks fine with nothing missing.

Tried opening another recent project I have not touched for a couple of weeks and that is giving the same error.

So went back to an older project from last year and that saved the options without an error (and the Save button worked).

Tried a couple of other projects (a mobile app project and another backend project from last year) and they also worked fine although in all cases I didn't update assets/project frameworks when prompted.

So then back to the original project, removed the remote server from the project.json file (since the remote server folder was missing from the .wappler/targets folder just to be tidy, I am keeping backups) but still the same error.

I will keep plugging away at this :slight_smile:

Maybe you should check your database connections named db

Seems like there might be a wrong port setting there somewhere and that goes wrong when reading it that we do also during project settings save

We are getting closer ...

I keep finding a db.json file appearing!

I open Wappler go to project settings and I can save and the message says -
"Target Creation: DB connection successfully saved for database"

Then after that I cannot save the project settings, back to the error message.

My database is called Database:
CleanShot 2024-06-06 at 09.01.20

So I look in the .wappler directory and a db.json file has appeared in targets/Development/app/modules/connections next to the database.json

The db.json file has the same content as the database.json file except the meta, actionFilePath, serverType and fileName.

Is this correct? I ask since the old database connection was called db and I have removed that, or so I thought.

Looking through the globals section I see both database and db listed under database connections.

database is what is used and db is the leftover that I want to remove however, if I try to delete it I get the following message:

CleanShot 2024-06-06 at 14.09.11

So looking at the connection options and they are identical (even passwords are the same:

database connection -

db connection -

Could this be causing an issue?
Is there a way to use database as the default so I can then remove db?

Also checked for missing port but nothing jumping out at me from the settings page (and the project.json mirrors these settings):

So this is getting worrying.

Updated to the latest Wappler version (6.7.0), still can't save the project.

So created a new project, tried to add a new target, and got the same red pop-up error.

Last resort, closed Wappler (I have tried closing between trying to change settings) including the Wappler service, uninstalled Wappler (using CleanMyMac to try and make sure ALL files were removed) and restarted my Mac.

Booted up and installed Wappler.

Created a new project, removed the database as it created a MySQL database, saved the settings (and it worked).

Now go back into the project settings, added a database, selected Postgres and saved the project settings but ... got the red warning, exactly the same as before and the save button stopped working again.

I did notice that after ceating the database and successfully saving the settings, if I toggle the "No Sample Data" option, the save button does not work.

Any thoughts?
Is there a better way to completely remove Wappler in case something is corrupted in the installation?

Thanks, Paul.

More testing:

Next step, restart Wappler, open the project settings, no database listed and no docker database running in Docker so all good.
The "save" button works, nice green message.
Here are the settings:

So, select a Docker/Postgres database and check "No Sample Data":

Click save and get the green messages, so deploy Docker to start the database container:

Close the project settings.
Open the project settings and see the following (note, no database details shown):

Looking at he docker-compose.yml in .wappler it has the database info (this is a test project which will be deleted soon):

services:
  web:
    volumes:
      - '../../../app:/opt/node_app/app'
      - '../../../lib:/opt/node_app/lib'
      - '../../../views:/opt/node_app/views'
      - '../../../public:/opt/node_app/public'
      - '../../../extensions:/opt/node_app/extensions'
      - '../../../db:/opt/node_app/db'
      - '../../../certs:/opt/node_app/certs'
    ports:
      - '8100:3000'
    restart: 'always'
    stdin_open: true
    tty: true
    build:
      context: '../../../'
      dockerfile: '.wappler/targets/Development/web/Dockerfile'
    logging:
      options:
        max-file: '5'
        max-size: '10m'
    depends_on:
      - 'db'
  db:
    image: 'postgres:14.8'
    environment:
      POSTGRES_PASSWORD: 'yVoKB3Cz'
      POSTGRES_USER: 'db_user'
      POSTGRES_DB: 'asa-forms'
    volumes:
      - './db_init:/docker-entrypoint-initdb.d'
    ports:
      - '9906:5432'
    restart: 'always'
    logging:
      options:
        max-file: '5'
        max-size: '10m'

But in the project.json, no database info:

{
  "projectName": "asa-forms",
  "styleFile": "/css/style.css",
  "assetsFolder": "/assets",
  "designFramework": "bootstrap5",
  "frameworks": [
    {
      "name": "fontawesome_5",
      "type": "cdn"
    },
    {
      "name": "bootstrap5",
      "type": "local"
    },
    {
      "name": "appConnect",
      "type": "local"
    }
  ],
  "hostingType": "docker",
  "projectServerModel": "node",
  "runtime": "capacitor",
  "webRootFolder": "/public",
  "useRouting": true,
  "addBase": true,
  "routingHandler": "node",
  "projectLinksType": "site",
  "targets": [
    {
      "name": "Development",
      "remoteURL": "http://localhost:8100",
      "webServerPort": 8100,
      "webServerLang": "node",
      "targetType": "docker",
      "webServer": "node",
      "NodeVersion": "18",
      "NodeOS": "bullseye",
      "NodeImageType": "slim",
      "webLoggingMaxFiles": "5",
      "webLoggingMaxFileSize": "10m",
      "dockerTimezone": "Europe/London",
      "databaseConnectionType": "none"
    }
  ],
  "activeTarget": "Development",
  "projectType": "web",
  "extensions": []
}

Very strange.

Hey,

I'm experiencing the same problem, however, when I use Wappler 6.4.2 it works.

I think I experienced something similar:

1 Like

Please restart Wappler with debug log, reproduce the issue and send us the log

Just cloned my repo on my spare Windows PC which has Wappler 6.6.0 and could edit the project settings, create a remote servers/target and everything else.
I will update now and see if the problems persist (and create a bug report if they do).

Bug report created but in windows, not Mac where I first encountered it.
I managed to get it to error and the save button does not always work (ctrl+S saves sometimes) so sent the bug report anyway, will do one on my Mac later this week.
Bug Report #1719234886205

Hi Danielle,

Do you have the install dmg for Apple Mac Silicon?

I need to downgrade to get a project finished (and to test).

Thanks,

Paul

I have experienced the same issue. Logged a bug report;

1 Like

It seems to me like you have a corrupted database connection file for server connect.

Try indeed the re-edit and save those in the globals / database connection in the server connect panel.