this error shows when inspecting in browser console
hi @bahaou . below is just a copy and paste of the logfile created in docker websocket container.
not sure if this info can help to clarify?
2024-12-09 11:00:49 node:internal/process/promises:288
2024-12-09 11:00:49 triggerUncaughtException(err, true /* fromPromise */);
2024-12-09 11:00:49 ^
2024-12-09 11:00:49
2024-12-09 11:00:49 Error: connect ECONNREFUSED 127.0.0.1:6379
2024-12-09 11:00:49 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
2024-12-09 11:00:49 Emitted ‘error’ event on RedisClient instance at:
2024-12-09 11:00:49 at RedisSocket. (/home/frappe/frappe-bench/apps/frappe/node_modules/@redis/client/dist/lib/client/index.js:412:14)
2024-12-09 11:00:49 at RedisSocket.emit (node:events:517:28)
2024-12-09 11:00:49 at RedisSocket._RedisSocket_connect (/home/frappe/frappe-bench/apps/frappe/node_modules/@redis/client/dist/lib/client/socket.js:166:18)
2024-12-09 11:00:49 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-12-09 11:00:49 at async RedisClient.connect (/home/frappe/frappe-bench/apps/frappe/node_modules/@redis/client/dist/lib/client/index.js:185:9)
2024-12-09 11:00:49 at async /home/frappe/frappe-bench/apps/frappe/realtime/index.js:47:2 {
2024-12-09 11:00:49 errno: -111,
2024-12-09 11:00:49 code: ‘ECONNREFUSED’,
2024-12-09 11:00:49 syscall: ‘connect’,
2024-12-09 11:00:49 address: ‘127.0.0.1’,
2024-12-09 11:00:49 port: 6379
2024-12-09 11:00:49 }
2024-12-09 11:00:49
2024-12-09 11:00:49 Node.js v18.18.2
2024-12-09 11:00:49 Realtime service listening on: 9000
2024-12-09 11:01:04 Realtime service listening on: 9000
2024-12-10 07:46:24 Realtime service listening on: 9000
2024-12-10 09:51:57 Realtime service listening on: 9000
ok you using multi containers . try to expose port 9000 for the erpnext workers .
I still think this is not the issuer of your client server not running . socketio is not mandatory to run your erpnext app .
I will doublecheck if port 9000 is exposed. I think it is already.
what else can be the issue for scripts not working? I am at a loss currently.
@jacobotha777 please explain how they are not working ? are you writing client scripts but simply not running ?
when testing a basic client script like the button example it does not add the button when refreshing the browser page. i just use the quotation form as example location
frappe.ui.form.on(‘Quotation’, {
refresh: function(frm) {
frm.add_custom_button(__(‘Get User Email Address’), function() {
frappe.msgprint(frm.doc.email);
}, __(“Utilities”));
}
});
can you maybe explain an alternate method to quickly test if client scripts work?
any other suggestions? did my script seem fine?
still struggling with client scripts not functioning
Update utils.js to make websockets functional · Nirmaan-app/frappe@b1af4e7 · GitHub
I found this post on github forum, but I am simply not educated enough to know how I implement this fix!
it seems that the default repository has an issue and must be fixed?
@jacobotha777 please create one quotation and open it . the client script type form function only inside the doctype page .
I now know where I slipped up. I apologise!!! thank you for clearing this up for me.
your patients and help is much appreciated
so just to clarify a bit.
what does the warnings mean in the console? or is this something the avarage erp next user should not be concerned abaout?
@jacobotha777 socketio is mostly responsible about real time data and real time notification . for example you have a list of quotations opened . and someone else created a quotation , socketio will listen to that change and refresh your page for you . if it’s not working you have to refresh the page manually so you can see the new data .
same thing for notifications , chat …
it will not affect anything crucial, but it’s nice to have it working .
usually port 9000 is responsible for this and by opening it it should work fine .