New library actions being overwritten on restart

Wappler Version : 4.7.2
Operating System : MacOS Big Sur - M1
Server Model: NodeJS
Database Type: Postgres
Hosting Type: Own Server

Expected behavior

What do you think should happen?

When creating a new library file (e.g an action named generate_api_error_object.json) and adding actions and saving the file, I expect the actions and settings I added to be there when I re-open Wappler.

Actual behavior

What actually happens?

When I relaunch Wappler, the newly created library file is there, but none of the actions or parameters I added are there. It looks like a freshly created library action.

I checked in version control and it looks like a version of the library action is also created in the /.wappler/targets/Development/app/modules/lib/utils/api/generate_api_error_object.json. The content of this file is:

{
  "exec": {},
  "name": "generate_api_error_object"
}

When I delete the file in that directory, the changes are saved properly in Wappler, but only for that file. If I create a new library action, the issue happens again.

The issue started with the latest update (4.7.2) and only happens with newly created files, not previously created files.

I’ve removed and reinstalled Wappler from scratch, but the issue is still present. Does anyone have the previous version of Wappler (Mac) that I can install, since the issue started for me with 4.7.2?

Maybe a stupid question but have you saved the action file? Is the blue dot in the tab gone?

I’ve saved the file. And when I check the content of the action file in a code editor, it shows that all the info is there. The file is definitely saved, It’s when I close Wappler, that the file gets reset.

When library actions are created, is Wappler supposed to be duplicate the file in the /.wappler/targets/Development/app/modules/lib/ directory? Because whenever I create a new library action in 4.7.2, it also creates a new action in that directory, but the changes I make to the action after are not updated there.

No this folder is only for global actions like database connections. They are saved per target.

Regular actions from the library conjure to:

/app/modules/lib

Ah, that looks like the cause of the problem. There’s a bug when new library actions are created in my project, they are saved in /app/modules/lib but for some reason, are also being created in the /.wappler/targets/Development/app/modules/lib/ at the same time.

If it helps, I can record my screen, and dm you the video (as it has some sensitive information) to show you what I mean. Or if you have an alternative way, I can do that too.

Yes please do

No problem. Just sent you a dm!

Thanks! Already found the problem!

Was indeed with new library actions being saved to the wrong location per target initially - and those are copied later on to your project - so essentially emptying your saved ones.

Will be solved in the next update - to be released tomorrow.

2 Likes

Glad to hear that. Thank you!

This has been fixed in Wappler 4.7.3

1 Like

This topic was automatically closed after 32 hours. New replies are no longer allowed.