Security Provider broken in 3.5

I know there are some new posts on this, but I think my issue is a little different. I made a change to a page, uploaded it and now my security provider on the login page no longer works.

status	"500"
message	"provider is not defined"
stack	"ReferenceError: provider is not defined\n at App.setAuthProvider (E:\\Development Sites\\Target\\lib\\core\\app.js:132:9)\n at App.provider (E:\\Development Sites\\Target\\lib\\modules\\auth.js:4:37)\n at App._exec (E:\\Development Sites\\Target\\lib\\core\\app.js:392:57)\n at App.exec (E:\\Development Sites\\Target\\lib\\core\\app.js:334:20)\n at App._exec (E:\\Development Sites\\Target\\lib\\core\\app.js:353:25)\n at async App._exec (E:\\Development Sites\\Target\\lib\\core\\app.js:363:17)\n at async App.exec (E:\\Development Sites\\Target\\lib\\core\\app.js:334:9)\n at async App.define (E:\\Development Sites\\Target\\lib\\core\\app.js:317:9)"

I have not made any changes to the new Globals feature or to the Security Provider. What changes do I need to make for security provider to recognize the new Globals feature?

Please report what server model are you using, when posting issues like this.

Sorry, I thought I had NODE in the title.

Just upgraded to 3.5, using NODE.JS

Please test following update, unzip file into lib/core.

app.zip (3.4 KB)

2 Likes

@patrick

I just updated, copied the above file and I get an error just trying to load a page!!

ā€œ{ā€œstatusā€:ā€œ500ā€,ā€œmessageā€:ā€œprovider is not definedā€,ā€œstackā€:ā€œReferenceError: provider is not defined\n at App.setAuthProvider (/opt/node_app/lib/core/app.js:132:9)\n at App.provider (/opt/node_app/lib/modules/auth.js:4:37)\n at App._exec (/opt/node_app/lib/core/app.js:392:57)\n at App.exec (/opt/node_app/lib/core/app.js:334:20)\n at App._exec (/opt/node_app/lib/core/app.js:353:25)\n at async App.exec (/opt/node_app/lib/core/app.js:334:9)\n at async App.exec (/opt/node_app/lib/core/app.js:327:17)ā€}ā€

I have a security provider in my layout page (NodeJS). So basically every page is now broken…

This fixed the issue for me :+1:

@Teodor / @patrick can you provide the previous version for me to download, please - this has broken every page on the project.

You need to restart the node server after updating the file, the error is still the old one while the old file was loaded into memory.

1 Like

@patrick I’ve restarted Docker, I’ve closed and restarted Wappler, I’ve redeployed to Docker. I’ve clicked ā€˜Restart All Services’

How else should I restart Node?

Are you sure you did overwrite the app.js file in the lib/core folder? Check the content of the file, line 132 should be:

const provider = new Provider(this, options, name);
2 Likes

I did it twice. But triple checking now. 2 seconds…

@patrick something very odd is happening.

I replaced the file again, with Wappler closed.

I then check the file contents for line 132 and it reflects your line above.

Then, when I start Wappler - the issue remains. I look at the file after having restarted wappler and restarting services and it’s overwritten the file and reverts to the old one, so then fails again.

What’s more concerning, is that for a while - it won’t send any data to localhost…

I’m going to try and copy the code into the file within Wappler UI to see if that will make a difference.

UPDATE:
@patrick it’s working!

The overwriting is odd, but copying the code manually into the file within Wappler UI then saving/deploying solved the issue as it stored the update.

Thank you for pointing me towards line 132 to know if the file is storing - that fixed it!!

Now I just have the same issue with permissions not coming through, but i’m sure you guys will fix that soon.

1 Like

The file update worked for me. Thanks @patrick, I know it must be very late for you. You guys are so very dedicated, thank you very much.

3 Likes

Yes… they are very dedicated. Not easy find this kind of people !

agreed. Amazing.

Fixed in Wappler 3.5.1

I just downloaded the 3.5.1 of the Mac version and I still do not have a dropdown to select both the Security Provider. In addition in the Database Connection step, the list of Database names still do not appear in 3.5.1 of Mac version