Server Action not found even though the path and permissions are correct

Seems like it’s one thing after another for me so hopefully you guys don’t get sick of hearing from me. I’m sure I’ll catch a groove after the learning curve haha.

I’m getting the following error when trying to update a form. It’s saying it can’t find the file but the path is correct and the permissions appear to be correct as well. It was working but before adding/changing some validations. Not sure what happened.

Screen Shot 2021-01-20 at 9.51.59 AM

{
“code”: 0,
“file”: “/Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php”,
“line”: 392,
“message”: “Trying to get property of non-object”,
“trace”: “#0 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(392): exception_error_handler(8, ‘Trying to get p…’, ‘/Applications/A…’, 392, Array)\n#1 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(364): lib\core\Parser->objectMember(Object(Closure))\n#2 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(306): lib\core\Parser->primary()\n#3 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(283): lib\core\Parser->group()\n#4 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(263): lib\core\Parser->unary()\n#5 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(253): lib\core\Parser->multiplicative()\n#6 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(243): lib\core\Parser->addictive()\n#7 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(233): lib\core\Parser->bitwiseShift()\n#8 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(223): lib\core\Parser->relational()\n#9 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(213): lib\core\Parser->equality()\n#10 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(203): lib\core\Parser->bitwiseAnd()\n#11 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(193): lib\core\Parser->bitwiseXor()\n#12 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(183): lib\core\Parser->bitwiseOr()\n#13 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(171): lib\core\Parser->logicalAnd()\n#14 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(155): lib\core\Parser->logicalOr()\n#15 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(151): lib\core\Parser->conditional()\n#16 /Applications/Ampps/www/dmxConnectLib/lib/core/Parser.php(96): lib\core\Parser->expression()\n#17 /Applications/Ampps/www/dmxConnectLib/lib/App.php(241): lib\core\Parser->parse(’$_POST.’, NULL)\n#18 /Applications/Ampps/www/dmxConnectLib/lib/validator/rules/core.php(281): lib\App->parseObject(’{{$_POST.}}’)\n#19 /Applications/Ampps/www/dmxConnectLib/lib/validator/Validator.php(112): lib\validator\rules\core->notEqualTo(‘3’, NULL)\n#20 /Applications/Ampps/www/dmxConnectLib/lib/validator/Validator.php(93): lib\validator\Validator->validateRule(‘core:notEqualTo’, ‘3’, Object(stdClass))\n#21 /Applications/Ampps/www/dmxConnectLib/lib/validator/Validator.php(70): lib\validator\Validator->validateField(Object(stdClass), ‘3’, NULL, ‘vehicle_id’)\n#22 /Applications/Ampps/www/dmxConnectLib/lib/validator/Validator.php(12): lib\validator\Validator->validateFields(Array, Array, NULL)\n#23 /Applications/Ampps/www/dmxConnectLib/lib/App.php(108): lib\validator\Validator->parseMeta(Object(stdClass))\n#24 /Applications/Ampps/www/dmxConnectLib/lib/App.php(87): lib\App->meta(Object(stdClass))\n#25 /Applications/AMPPS/www/dmxConnect/api/crud_actions/crud_inspection.php(368): lib\App->define(’{\n “meta”: {\n …’)\n#26 {main}”
}

I see an error 500, which doesn’t mean it can’t find the file.
The error is:

“message”: “Trying to get property of non-object”,

And looking at the stack i see that you are probably using some value like {{$_POST.}}’ somewhere in some validation step maybe?
Can you check this?

@Teodor, thank you for such a quick reply. The support from you and the community really give me confidence in the purchase of Wappler.

I removed all server side and client side validations and it’s still showing the error. I looked at my form inputs and they all have a name that matches the database update action.

It’s an error in the server action. What steps do you have there?

I believe I fixed it. I created another update action and used just it on the form. It worked. I then noticed back on the original action with the conditions (crud_inspection) the “vehicle_id” $_POST variable listed for that action had a check inside a square by it. The new action I created did not. I deleted the one with the check by it and then recreated it and it worked after that. What usually causes that check to appear? When it has a validation on it? Perhaps even though I removed the validation something got confused. Seems to be working now. I’ll let you know if it stops after I had validation back.

Yes.

This sometimes happens when creating variables or saving server action, our saving some step with incorrect param. There is no reliable way to reproduce. But, what you can try is open the server action in editor and try to valuate the json for any issues.

From the looks of it, its more likely that you would have put in some incorrect values unknowingly and maybe it also got removed in the same manner. :sweat_smile:

@sid who knows haha. I’m still getting used to the UI and it’s “quirks”. Overall really loving Wappler though. :blush: