Server connect running like app connect?

Hey everyone, honestly don't know how can I call this, but I need to figure out this one:

I updated to latest, a project which was working fine on digital ocean node js..
And then a weird result (Can't revert right now, but will do it on the next days..)

The thing is, somehow, my APIS are rendering like a frontend page:
For example this:

Output this:

Can't find anything strange around here, not even on logs.
Has someone been on the same boat?

Thanks in advance

1 Like

Now there's another project which is throwing the same result, please I need some assistance here..
Both localhost / nginx server on DO are completely useless right now

Hey @franse I'd hesitate to suggest that your nginx configuration could be playing a part.. What have you changed recently? Are you also running nginx locally? Have you tried without using it? Can you remove it in full and check no configuration files remain and then reinstall it. Any reason why you are using nginx specifically?

Thanks for the reply my friend..

Just updated to latest..

Not really, something is really wrong, wappler local server does the same thing.

Sorry for all the questions. What happens if you create a new Project in Beta 14 and then open it?

The only thing I could find is: new apis works as it should.. the problem are with old ones

Have you got a route pointing to /api/ at all? It may well have parameters after the base part…

1 Like

Do you see any errors in the Network logs or does it return the data?

1 Like

It could be a caching issue.

BACKUP FIRST BEFORE DOING ANY OF THIS


### For Windows:

1. **Stop Nginx**:

nginx -s stop


2. **Remove or clear the cache directory**:
  * Nginx on Windows typically uses a different cache path. You need to know the specific cache path configured in your Nginx configuration file (`nginx.conf`). The default might be something like `C:\nginx\cache`.
  * Assuming the cache path is `C:\nginx\cache`, you can clear it using:

rmdir /s /q C:\nginx\cache
mkdir C:\nginx\cache

3. **Start Nginx** again:

start nginx


### For macOS:

1. **Stop Nginx**:

sudo nginx -s stop


2. **Remove or clear the cache directory**:
  * Nginx on macOS typically uses a different cache path. You need to know the specific cache path configured in your Nginx configuration file (`nginx.conf`). The default might be something like `/var/cache/nginx`.
  * Assuming the cache path is `/var/cache/nginx`, you can clear it using:

sudo rm -rf /var/cache/nginx/*

3. **Start Nginx** again:

sudo nginx

All works as it should..

No :frowning_face:

Not a single hint..

Thanks @Cheese but I don't think this could be related to nginx..

Somehow my project get corrupted:

Well thanks everyone, found a log here after some attempts:

[2025-01-09 17:05:25.741] Inspect Server Action: file:///C:/xampp/htdocs/test_node/app/api/customquery.json
[2025-01-09 17:05:25.757] ERROR: The parameter "name" is not unique. There are other objects already created with the same name (obj: serverConnect_actionsPanel_layout_main_toolbar).

What's the meaning of that error message? :thinking:

The error message indicates that within your Wappler project, there is a conflict where a parameter or object with the name serverConnect_actionsPanel_layout_main_toolbar is not unique. This means the same name has been reused for different objects, parameters, or configurations in your project.

Here’s a breakdown:

  1. Parameter Name Conflict:
  • The parameter name has a duplicate value of serverConnect_actionsPanel_layout_main_toolbar.
  • Wappler requires unique parameter names to avoid ambiguity in object references.
  1. Object Duplication:
  • The error suggests that multiple objects (likely within the same scope) are defined with this conflicting name.
  • It might be in your customquery.json file or other related files.

Steps to Resolve:

  1. Locate the Conflicting Name:
  • Open customquery.json and search for serverConnect_actionsPanel_layout_main_toolbar.
  • Check if the same name appears more than once in this file.
  1. Check Related Files:
  • If the conflict isn’t apparent in customquery.json, expand your search to other project files where serverConnect_actionsPanel_layout_main_toolbar might be defined.
  1. Rename to Resolve the Conflict:
  • If the name is used for different parameters or objects, update one of them to a unique name.
  1. Verify Uniqueness:
  • Ensure all name attributes in your project are unique within their respective scopes.
  1. Restart Wappler:
  • After making changes, restart Wappler and re-test to ensure the issue is resolved.

Additional Notes:

  • This error often arises in dynamic frameworks like Wappler, where object names play a key role in identifying elements and linking data.
  • Always use descriptive and unique names for your objects to avoid similar conflicts in the future.
1 Like

You don't see the action in the network logs like this after opening network logs and refreshing the page?

There are just some custom query and a few set value..

Json file doesn't seem wrong to me..

On dev tools it looks like a regular content page..

I'm sure I had something similar ages ago and it was caused by a folder or page I created called api which then conflicted with the routing for SC - I know you checked routes but something to double-check maybe?

Oh - and maybe check for a folder of pages call 'app' you might have created - I think that might have also caused problems

Sorry, it's so long ago, I can't remember exactly...

I would try opening project properties and clicked yes. It will re-write all Docker files, so make a backup, unless you're using GIT.

Thank you all for staying with me...

@bpj I'll recheck everything trough vscode and let you know if something is tricky here..

I noticed that some actions after names were changed, started to rename automatically to others..

Example:

Set value name 1
Set value name 2
Set value name 3

After renaming Set value name 3 to 4

Then others steps are also renamed:

Set value name 1
Set value name 4
Set value name 4

I'll record my screen today..
It's funny when you try to recreate and the issue is solved :melting_face:

@Notum
Not using docker..
I'm using github so will push and inspect some changes, but on the tree, under commits the changes are mainly assets from Wappler (remember that my only action was updating App connect and Server connect files and after that, everything is failing)

Will try also revert to beta, and see what's going on..

@Teodor sorry for the tag, but opening the project on 6.8.0 and updating to latest should update all to the point before beta was released, right?

Thanks again..