Api action not found

Hello, I’m new here, but quickly fell in love with Wappler and I’m definitely planning to stay for a bit longer, given the complexity wappler provides! However, I came across the database action issue, going through official documentation, once the action of database query is successfully set up, I should be able to view results on “Open in Browser” localhost, however, I always receive an error as it doesn’t exist. I can confirm that the action received the data as tested while setting it up. Does anyone know what I could be doing wrong? thank you!Screenshot 2022-12-08 at 13.31.43

It may be caused by a pesky browser cache. I always have the cache disabled and the Developer Tools panel open while testing my apps.

1 Like

Hello Ben, Apologies for the late reply. Unfortunately, no luck. I’ve tried recreating the same action under Windows Virtual Machine ( I am using M1 Client), however, without any luck either. As mentioned previously, I’m not entirely sure whether I have misconfigured something, or haven’t completed previous steps, but following official docs it should be working out the box. Needless to say, populating table with api action in min, returns no data. I’m attaching images of my configuration, whoever, it’s fresh project and there shouldn’t be anything else that would prevent it from working. So far I’ve been following these docs: https://docs.wappler.io/t/creating-database-queries/2872

Any help would be much appreciated! :blush:

Click this button:

Check if you see there a /api/orders route, if not try to create and point to your server action /api/orders

When you click the open-in-browser button, what do you see?

Hey, thank you fr the suggestion. Unfortunately the issue still persists, unless I’ve haven’t set the route correctly.

Inability of providing correct path to server file, prevents me from using it all together, as page returns internal 5000 error.

Unfortunately Exact same error as before :pensive:

The issue should be easily replicated by simply creating a new project, adding server connection to any of the databases and creating api action through chosen db connection and testing it out in browser :man_shrugging:t3::persevere:

I would change it from api/orders to endpoints/orders (or something else). Wappler names the SC folder api so it’s probably causing confusion

It’s actually a server action, so everything looks fine :man_shrugging:

At this point I’d click “Deploy” and see if it works

But if you add a route staring /api/ it might cause problems…

1 Like

Interesting, now I understood what you meant! A route is not necessarily needed for a server action, so he/she can delete it or rename as you said

A route for /api/orders pointing to /api/orders which you are overwriting is likely to be a problem.

Another deploy, if you haven’t already is definitely worth a try as @Apple suggests

Worked like a charm gents! Thank you for your help! :wink:

For the records, I also tried to follow the documentation and end up with the same problem: 404 / action not found.

(complete new blank project. Just two tables from @Hyperbytes tutorial “Joins, sub tables and multi references demystified”)

(After quitting Wappler and killing all processes, it seems to work - the terminal then gave me the hint that the port was already in use - I had some stalled Wappler processes on the Mac)

1 Like