We’ve had a site running (in test) for the past few months, and yesterday all server connect calls stopped returning data. The response is always success (ie code 200), but there is no body returned.
I’ve tried reverting to an older version of the site, and have also tried deploying to a completely new domain (although still on the same server). All static and dynamic content seems to work other than SC calls. I’ve tried creating a simple SC call that does nothing except return a static value (I think this should work?) but it also fails.
If I manually edit this file to add an echo "456"; line to the file, this works, so I can verify that the file is getting called, and PHP is working, and the included file is really there (if I change the filename I get an error).
I’m at a bit of a loss as to what has changed - possibly it’s something outside of Wappler generated code - ie it could be something on the site/server, but I’m not sure how to debug this further at the moment.
If anyone has seen this sort of issue, or has any suggestions on how to debug this to get the server connect API calls working, I would very much appreciate it.
I’ve tried also to deploy this with a clean local Docker test environment and it also fails there, so I’m confident it’s not the server. Looking at git, nothing significant has changed as far as I can see.
Having spent 2 days now looking at this, I’m starting fresh and copying everything back into a clean system. If you have any ideas, I’m open to hear them as even basic SC calls do not work (as above). I’ve also tried a SC that just returns an error code, but again, this always returns 200 with no data.
Most likely something on your server config would have changed.
A fresh deploy should definitely give a better idea.
Another test you can do is send an error response at the top of the php server action file itself.
If that works, there might be a Wappler file missing in the deploent.. or a Wappler bug.
That's what I thought initially, but that doesn't seem to be the case.
As I mentioned above, I also used Wappler to deploy to a local Docker container, and that does exactly the same thing, so I don't think it's the server. From Git, there are no changes, so it's hard to really understand where the issue lies.
The link above was a fresh deployment (yesterday). Once things stopped working, I thought I'd take the opportunity to deploy to the final server as we are (were!) getting close to going live, but this does exactly the same thing as my original test system.
This is fundamentally what I did earlier - except instead I put echo 123 at the top of the PHP script - that worked, so it showed that the server was correctly running PHP. I also moved this after the dmx include, and that proved that the include was working - but the action doesn't run - even the simplest action possible.
Yeah, I read about that in your original post.
What I meant was to explicitly set the response code in the PHP script to say 400, and see if that works or not.
Yes, that also works. It seems that everything I do directly in PHP works fine, but nothing works via SC . I can only assume at this point that Wappler has somehow got completely screwed up - I’ve started to move everything across to a fresh project and everything works again there with no changes to my code/configuration.
This seemed to have happened just after I upgraded to Wappler 3.01 on Friday - the affected project was open at the time, but another project seems to be unaffected. Yesterday I also tried to uninstall Wappler and add it back again, hoping it might update the project, but that also didn’t help - this project is just broken.
That too bad. I don’t really know how such a behaviour would happen.
Although I still think its the files that are not correctly uploaded dmxAppConnect or some other dmx folder.
Did you try to copy the other working project’s dmx/wappler files onto this one?
Or, maybe @Teodor can help.
That's quite possible - I think something in here is messed up. As I said I also created a Docker test install, and this has the same issue.
Hmmm - that's not something I tried, but it's a good suggestion. I will see if I can try this - the issue I see is that both projects don't have the same components installed - it would be good if there was a way to update everything?
It’s a mySQL database, and yes, all the data is still there.
Even if it wasn’t, shouldn’t I expect my really simple SC call to work - ie as above where I use no database functions, and just set a value? This isn’t using any database connection.
php error logging is enabled. There is nothing obvious being logged in the error log. The site log again shows 200 being returned.
If there was a php exception, wouldn't you expect a 500 return? If I create an error in the file on purposem then I see a parse error in the error log, and I get a 500 error return - not 200.