Library Server Action not found

I have a Library server action that is called from another action. Locally everything works and the lib server action runs.

When the docker container with site is deployed to live, the normal server action is unable to call the Lib server action. I think it is because I changed the name of the action from uppercase to lowercase and server connect is still looking for the uppercase lib action.

This is the error on the server:

{
    "status": "500",
    "message": "There is no action called 'Income/AddScalingSingle' found in the library.",
    "stack": "Error: There is no action called 'Income/AddScalingSingle' found in the library.\n    at App.exec (/opt/node_app/lib/modules/core.js:233:19)\n    at App._exec (/opt/node_app/lib/core/app.js:545:57)\n    at App._exec (/opt/node_app/lib/core/app.js:512:28)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async App.exec (/opt/node_app/lib/core/app.js:481:9)\n    at async App.condition (/opt/node_app/lib/modules/core.js:105:17)\n    at async App._exec (/opt/node_app/lib/core/app.js:545:30)\n    at async App._exec (/opt/node_app/lib/core/app.js:512:17)\n    at async App.exec (/opt/node_app/lib/core/app.js:481:9)\n    at async App.exec (/opt/node_app/lib/modules/core.js:228:13)"
}

when opening the normal server action I call the lowercase lib action:

{
        "name": "exec1",
        "module": "core",
        "action": "exec",
        "options": {
          "exec": "Income/addScalingSingle",
          "params": {
            "incomeid": "{{salaryid}}"
          }
        },
        "output": true
      },

Opening the lib server action it starts with lower case

Screenshot 2022-10-26 at 07.56.19

I cannot find the place in the code the normal action has a reference with the uppercase ‘a’ in it.

Should I then just keep on changing action names till I get it to work locally and online or is there a place to fix this in Wappler?

You can search for this term and see where you might have forgotten to change. Or, maybe the SA where you made it lowercase is not uploaded.
You can also try to rename the main lib file to something else entirely, and then back to the name you want.

Thanks, going to do the rename or just duplicate and see if it works then.

Site is hosted in docker container, so no chance the file is not uploaded… I think

So I changed the name of the library action to uppercase as the server action is looking for the lib action in uppercase spelling. Uploaded.

NOW THE SERVER ACTION IS LOOKING FOR THE LOWER CASE SPELLED ONE… MAKE UP YOUR MIND WAPPLER :exploding_head: :crazy_face:

Screenshot 2022-10-27 at 11.23.05

I also disabled the actions in question and redeployed, but it seems like the changes aren’t pushed on redeployment. file stays the same and has the same error despite disabling the steps.

Further more I added 123 to my modal header just to make sure the changes are deployed and it displays, so somehow the server side of Wappler is broken and does not register changes done in the interface. It keeps on deploying the wrong old file or what I think is happening, not making changes at all, even after making changes to it…

Screenshot 2022-10-27 at 12.14.01

In code view it references the correct file, and all works on local but once docker site is deployed it breaks:

@patrick How can I control whether the server action looks for a lower or uppercase spelled Library action. every time I change to all lowercase I get file with uppercase cannot be found and then I change it to uppercase spelling and I get the reverse. It is driving me nuts…

addScalingSingle vs AddScalingSingle

And I am adding and removing everything via the interface. Nothing done in code view.

Anyone on the Wappler team that can help me look into this please?

I’m not sure what goes wrong with the deployment, that is more something @George can help with.

Server Connect tries to find the file as it is given in the json, on Windows the filesystem is not case- sensitive and would always work while in Docker it is a linux filesystem and is case-sensitive.

Instead of only changing the case try changing a bit more, for example change the a in an e. This is because windows doesn’t detect a change when you only change the case of a character. Changing it first to an e and then back to an a could help.

1 Like

thanks - I have tried some changes like duplicating file, without success. I am on mac. works on mac but not on live server with docker container.

Will try some options and revert - thanks @patrick!

I made some changes without immediate effect, but it seems to have sorted itself over a couple of deployments.

Really not sure what I did to help.

Changes in case can be problematic, especially with Windows as it’s not case sensitive and on rename does not see “a” being different to “A”.
If changing case only I always add an intermediate change for example name goes to name1 then back to Name which seems to work correctly every time

1 Like

Thanks for the comment @Hyperbytes. I did use the same method and that is probably what did the trick.

1 Like