Issue after updating any server action

======== TEMPLATE BUG FORM ========

Wappler Version : 3.5.2
Operating System : MAC Catalina 10.15.7

Expected behavior

What do you think should happen?
Update server action

Actual behavior

Page error

How to reproduce

Update any server action

I have followed the advice on another thread to delete the dmxConnectLib folder, save action, then upload it to the new server. This does not fix the issue. If I restore the dmxConnectLib folder (only this folder) from a copy 4 days ago the page loads without an issue

Full error message:
{"type":"ExecuteError","fileName":"modules/auth.asp","lineNumber":107,"errorNumber":-2146823279,"message":"'identity' is undefined","stack":[{"fileName":"lib/app.asp","lineNumber":107,"method":"_exec","args":["SecurityProviders/SiteValidation"]},{"fileName":"lib/app.asp","lineNumber":107,"method":"_exec","args":[["Connections/droplet","SecurityProviders/SiteValidation",{"name":"Configuration","module":"dbconnector","action":"select","options":{"connection":"droplet","sql":{"type":"SELECT","columns":[{"table":"Configuration","column":""}],"table":{"name":"Configuration"},"joins":[],"wheres":{"condition":"AND","rules":[{"id":"Configuration.ConfigurationID","field":"Configuration.ConfigurationID","type":"double","operator":"equal","value":"1","data":{"table":"Configuration","column":"ConfigurationID","type":"number"},"operation":"="}],"conditional":null,"valid":true},"query":"SELECT \nFROM Configuration\nWHERE ConfigurationID = 1","params":[]}},"output":true,"meta":[],"outputType":"array"},{"name":"Page","module":"dbconnector","action":"select","options":{"connection":"droplet","sql":{"type":"SELECT","columns":[{"table":"Content","column":""}],"table":{"name":"Content"},"joins":[],"wheres":{"condition":"AND","rules":[{"id":"Content.URLParam","field":"Content.URLParam","type":"string","operator":"equal","value":"{{$_GET.id}}","data":{"table":"Content","column":"URLParam","type":"text"},"operation":"="},{"id":"Content.PageGroup","field":"Content.PageGroup","type":"string","operator":"equal","value":"{{$_GET.pagegroup}}","data":{"table":"Content","column":"PageGroup","type":"text"},"operation":"="}],"conditional":null,"valid":true},"query":"SELECT \nFROM Content\nWHERE URLParam = :P1 / {{$_GET.id}} / AND PageGroup = :P2 / {{$_GET.pagegroup}} /","params":[{"operator":"equal","type":"expression","name":":P1","value":"{{$_GET.id}}"},{"operator":"equal","type":"expression","name":":P2","value":"{{$_GET.pagegroup}}"}]}},"output":true,"meta":[{"name":"id","type":"number"},{"name":"ContentType","type":"text"},{"name":"AdminTitle","type":"text"},{"name":"Active","type":"boolean"},{"name":"URLParam","type":"text"},{"name":"ModelGroup","type":"text"},{"name":"PageGroup","type":"text"},{"name":"PrimaryTitle","type":"text"},{"name":"PrimarySubTitle","type":"text"},{"name":"PrimaryContent","type":"text"},{"name":"SecondaryTitle","type":"text"},{"name":"SecondarySubTitle","type":"text"},{"name":"SecondaryContent","type":"text"},{"name":"PageTitle","type":"text"}],"outputType":"array"}]]},{"fileName":"lib/app.asp","lineNumber":85,"method":"exec","args":[{"steps":["Connections/droplet","SecurityProviders/SiteValidation",{"name":"Configuration","module":"dbconnector","action":"select","options":{"connection":"droplet","sql":{"type":"SELECT","columns":[{"table":"Configuration","column":""}],"table":{"name":"Configuration"},"joins":[],"wheres":{"condition":"AND","rules":[{"id":"Configuration.ConfigurationID","field":"Configuration.ConfigurationID","type":"double","operator":"equal","value":"1","data":{"table":"Configuration","column":"ConfigurationID","type":"number"},"operation":"="}],"conditional":null,"valid":true},"query":"SELECT \nFROM Configuration\nWHERE ConfigurationID = 1","params":[]}},"output":true,"meta":[],"outputType":"array"},{"name":"Page","module":"dbconnector","action":"select","options":{"connection":"droplet","sql":{"type":"SELECT","columns":[{"table":"Content","column":""}],"table":{"name":"Content"},"joins":[],"wheres":{"condition":"AND","rules":[{"id":"Content.URLParam","field":"Content.URLParam","type":"string","operator":"equal","value":"{{$_GET.id}}","data":{"table":"Content","column":"URLParam","type":"text"},"operation":"="},{"id":"Content.PageGroup","field":"Content.PageGroup","type":"string","operator":"equal","value":"{{$_GET.pagegroup}}","data":{"table":"Content","column":"PageGroup","type":"text"},"operation":"="}],"conditional":null,"valid":true},"query":"SELECT \nFROM Content\nWHERE URLParam = :P1 / {{$_GET.id}} / AND PageGroup = :P2 / {{$_GET.pagegroup}} /","params":[{"operator":"equal","type":"expression","name":":P1","value":"{{$_GET.id}}"},{"operator":"equal","type":"expression","name":":P2","value":"{{$_GET.pagegroup}}"}]}},"output":true,"meta":[{"name":"id","type":"number"},{"name":"ContentType","type":"text"},{"name":"AdminTitle","type":"text"},{"name":"Active","type":"boolean"},{"name":"URLParam","type":"text"},{"name":"ModelGroup","type":"text"},{"name":"PageGroup","type":"text"},{"name":"PrimaryTitle","type":"text"},{"name":"PrimarySubTitle","type":"text"},{"name":"PrimaryContent","type":"text"},{"name":"SecondaryTitle","type":"text"},{"name":"SecondarySubTitle","type":"text"},{"name":"SecondaryContent","type":"text"},{"name":"PageTitle","type":"text"}],"outputType":"array"}]}]},{"fileName":"lib/app.asp","lineNumber":57,"method":"define","args":[{"meta":{"$_GET":[{"type":"text","name":"id"},{"type":"text","name":"pagegroup"},{"type":"text","name":"sort"},{"type":"text","name":"dir"}]},"exec":{"steps":["Connections/droplet","SecurityProviders/SiteValidation",{"name":"Configuration","module":"dbconnector","action":"select","options":{"connection":"droplet","sql":{"type":"SELECT","columns":[{"table":"Configuration","column":""}],"table":{"name":"Configuration"},"joins":[],"wheres":{"condition":"AND","rules":[{"id":"Configuration.ConfigurationID","field":"Configuration.ConfigurationID","type":"double","operator":"equal","value":"1","data":{"table":"Configuration","column":"ConfigurationID","type":"number"},"operation":"="}],"conditional":null,"valid":true},"query":"SELECT \nFROM Configuration\nWHERE ConfigurationID = 1","params":[]}},"output":true,"meta":[],"outputType":"array"},{"name":"Page","module":"dbconnector","action":"select","options":{"connection":"droplet","sql":{"type":"SELECT","columns":[{"table":"Content","column":""}],"table":{"name":"Content"},"joins":[],"wheres":{"condition":"AND","rules":[{"id":"Content.URLParam","field":"Content.URLParam","type":"string","operator":"equal","value":"{{$_GET.id}}","data":{"table":"Content","column":"URLParam","type":"text"},"operation":"="},{"id":"Content.PageGroup","field":"Content.PageGroup","type":"string","operator":"equal","value":"{{$_GET.pagegroup}}","data":{"table":"Content","column":"PageGroup","type":"text"},"operation":"="}],"conditional":null,"valid":true},"query":"SELECT \nFROM Content\nWHERE URLParam = :P1 / {{$_GET.id}} / AND PageGroup = :P2 / {{$_GET.pagegroup}} /","params":[{"operator":"equal","type":"expression","name":":P1","value":"{{$_GET.id}}"},{"operator":"equal","type":"expression","name":":P2","value":"{{$_GET.pagegroup}}"}]}},"output":true,"meta":[{"name":"id","type":"number"},{"name":"ContentType","type":"text"},{"name":"AdminTitle","type":"text"},{"name":"Active","type":"boolean"},{"name":"URLParam","type":"text"},{"name":"ModelGroup","type":"text"},{"name":"PageGroup","type":"text"},{"name":"PrimaryTitle","type":"text"},{"name":"PrimarySubTitle","type":"text"},{"name":"PrimaryContent","type":"text"},{"name":"SecondaryTitle","type":"text"},{"name":"SecondarySubTitle","type":"text"},{"name":"SecondaryContent","type":"text"},{"name":"PageTitle","type":"text"}],"outputType":"array"}]}}]}],"data":"function(exports, module, require) { \r\n\r\n\tvar Provider = require('lib/auth/provider');\r\n\tvar Parser = require('lib/core/parser');\r\n\tvar App = require('lib/app');\r\n\r\n\texports.provider = provider;\r\n\texports.identity = identity;\r\n\texports.validate = validate;\r\n\texports.login = login;\r\n\texports.logout = logout;\r\n\texports.restrict = restrict;\r\n\r\n\t/\r\n\t\tSetup authorization provider\r\n\t/\r\n\tfunction provider(options, name) {/* STACK({"fileName":"modules/auth.asp", "lineNumber":17, "method": "provider"}) /\r\n\t\treturn new Provider(options, name);\r\n\t};\r\n\r\n\tfunction identify(options) {/ STACK({"fileName":"modules/auth.asp", "lineNumber":21, "method": "identify"}) /\r\n\t\tvar provider = Provider.get(options.provider);\r\n\r\n\t\treturn provider.identity;\r\n\t}\r\n\r\n\t/\r\n\t\tValidate\r\n\t*/\r\n\tfunction validate(options) {/* STACK({"fileName":"modules/auth.asp", "lineNumber":30, "method": "validate"}) /\r\n\t\tvar provider = Provider.get(options.provider);\r\n\r\n\t\tswitch (App.request.post['action']) {\r\n\t\t\tcase 'login':\r\n\t\t\t\tprovider.login(App.request.post['username'], App.request.post['password'], App.request.post['remember'] == '1');\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'logout':\r\n\t\t\t\tprovider.logout();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif (!provider.identity) {\r\n\t\t\tApp.response.end(401);\r\n\t\t}\r\n\r\n\t\tApp.data.identity = provider.identity;\r\n\t}\r\n\r\n\t/\r\n\t\tLogin\r\n\t*/\r\n\tfunction login(options) {/* STACK({"fileName":"modules/auth.asp", "lineNumber":53, "method": "login"}) /\r\n\t\tvar provider = Provider.get(options.provider);\r\n\r\n\t\tif (!options.username) options.username = '{{$_POST.username}}';\r\n\t\tif (!options.password) options.password = '{{$_POST.password}}';\r\n\t\tif (options.remember == null) options.remember = '{{$_POST.remember}}';\r\n\r\n\t\treturn provider.login(\r\n\t\t\tParser.parseTemplate(options.username),\r\n\t\t\tParser.parseTemplate(options.password),\r\n\t\t\t!!Parser.parseValue(options.remember)\r\n\t\t);\r\n\t};\r\n\r\n\t/\r\n\t\tLogout\r\n\t*/\r\n\tfunction logout(options) {/* STACK({"fileName":"modules/auth.asp", "lineNumber":70, "method": "logout"}) /\r\n\t\tvar provider = Provider.get(options.provider);\r\n\r\n\t\treturn provider.logout();\r\n\t}\r\n\r\n\t/\r\n\t\tRestrict\r\n\t*/\r\n\tfunction restrict(options) {/*

1 Like

Here an update, unzip in dmxConnectLib/modules.

auth.zip (708 Bytes)

Hi @patrick,

Wappler Version : 3.5.2
Operating System : MAC Catalina 10.15.7

I made a change to a server action, saved it and every server action stopped working. I can login as a user but every server action after the Security Restrict is failing regardless of the server action I actually modified.

Do I need to save this file in the folder mentioned in your post?

In another post on a similar issue, dmxAppConnect.js file has been attached to replace. Does this file also need to be updated to resolve issues with server actions?

@guptast, try adding the new security identity to the globals as outlined in

Hi @scott,

Thank you for your response and providing the links. I haven’t tried the Globals yet. I am planning to update the project in a couple of weeks to make use of this new functionality.

The login function & Security Restrict are working correctly. The issue is that every server action has stopped working / loading dynamic data, after I modified a server action. This has started only after upgrading to 3.5.2 version. I can see server actions failing continuously in the development tools and the only way to stop this is to stop the web server.

That's not really useful info. We already have a guide explaining how to check the exact error message!

Hi @Teodor,

I have attached a video showing the issue. The user login is working correctly but the server action on this page is failing - status showing as canceled. The web page keeps making web requests. This started after I made a change in the server action cust_info_external.aspx linked to Server Connect on this page. This is happening with server actions on another page as well even though no modification was made to those server actions.

What are the steps in the cust_info_external action file?

Hi @patrick,

I have attached a screenshot of the steps.

Does it work correctly if you disable the security steps?

It is the same result even after removing the Security Provider and Security Restrict steps.

Are there more actions not working, or is this the only one giving problems?

Yes, there is one more server action on a different contents page that is not working.

Exactly the same issue with the action being cancelled each time and being called continuously like in the video?

If you call the action directly in the browser, does it then also have a problem.

If the problem is only from the page, then try updating dmxAppConnect.js. Here is the latest version of the file I’m currently working on, it is a newer update then the previous posted one.

dmxAppConnect.zip (22.3 KB)

1 Like

Yes, the other server action has the same issue.

I removed Security Provider, Security Restrict in the action and Security Provider Enforcer on the page, then called the action directly in the browser and I got the result as expected from the connected database.

It seemed to be an issue on the page only. I have updated the dmxAppConnect.js file and everything is back to normal.

I will now add the Security Settings and test it again to make sure that all is working ok.

Thank you kindly for your help in resolving this issue. I really appreciate Wappler Team’s prompt responses in attending to the issues and assistance in resolving them :slight_smile:

Fixed in Wappler 3.5.3

Please any assistance would be helpful. I updated the file Patrick sent and updated to 3.5.4. And now dynamic pages load, but new server actions do not work. Here is the message I get on an Update action.

ANY help please, I am at a standstill on the project and need to catch up.
{“type”:“TypeError”,“fileName”:“lib/app.asp”,“lineNumber”:85,“errorNumber”:-2146823281,“message”:"‘exec’ is null or not an object",“stack”:[{“fileName”:“lib/app.asp”,“lineNumber”:85,“method”:“exec”,“args”:[null]},{“fileName”:“lib/app.asp”,“lineNumber”:57,“method”:“define”,“args”:[{“name”:“update”,“module”:“dbupdater”,“action”:“update”,“options”:{“connection”:“droplet”,“sql”:{“type”:“update”,“values”:[{“table”:“WaterWaste”,“column”:“Status”,“type”:“text”,“value”:“Closed”}],“table”:“WaterWaste”,“wheres”:{“condition”:“AND”,“rules”:[{“id”:“TicketID”,“field”:“TicketID”,“type”:“double”,“operator”:“equal”,“value”:3131,“data”:{“column”:“TicketID”},“operation”:"="}],“conditional”:null,“valid”:true},“query”:“UPDATE WaterWaste\nSET Status = ‘Closed’\nWHERE TicketID = 3131”,“params”:}},“meta”:[{“name”:“affected”,“type”:“number”}]}]}],“scope”:{"$_ERROR":null,"$_SERVER":{“ALL_HTTP”:"HTTP_CONNECTION:close\nHTTP_CONTENT_LENGTH:1254\nHTTP_CONTENT_TYPE:multipart/form-data; boundary=----WebKitFormBoundary9eN0XxVtYS1CyUaX\nHTTP_ACCEPT:application/json\nHTTP_ACCEPT_ENCODING:gzip, deflate, br\nHTTP_ACCEPT_LANGUAGE:en-US,en;q=0.9,la;q=0.8\nHTTP_COOKIE:_ga=GA1.2.365426226.1574701026; _gid=GA1.2.1463477537.1605390008;