Make sure your callback function is being defined in the global scope. For some reason, in production my function was not in this namespace.
In addition to:
function myCallback() { ... }
Make sure you directly assign it into the global space:
window.myCallback = myCallback;
You should be able to test whether this is your problem, my typing the function name at the Javascript console and seeing if it’s defined or not.