I can’t get frappe.publish_realtime() to do anything. I’ve been browsing the forums for the last several hours, but I haven’t uncovered any leads that help me figure out what’s going wrong.
Both code blocks trigger when I press a button. I expect to see this in the browser console:
setup realtime
data {'task_id': 1, 'foo': 'bar'}
in the browser console, as well as a frappe message box with the word “past” in it. All I see is setup realtime and the messagebox, with no indication error or indication of any kind that frappe.publish_realtime() did anything at all.
Environment
I’m running ERPNext 12 in development mode. On the suggestion from one of the forums, I ran
bench setup socketio
bench build
after which I restarted the server and refreshed the page. Nothing changed.
Is anyone familiar with the publish_realtime API able to help me? This is a bit of a mystery to me, especially since the notifications appear that indicate when other people are viewing a document you have open.
I am running in production mode by set
bench set-config -g developer_mode 0
and bench start.
still i don’t get any response in
frappe.realtime.on(‘gang_process’, (data) => {
console.log(‘data’, data);
});