some time will callback error, "[Error] Callback 'xxxx' not registered!!! Callback (runtime.js:234) Global Code (Script Element 11:1) "
Description
some time, when i use wails dev or use compiled exe. it will appear [Error] Callback 'main.App.Xxx-3457571642' not registered!!! Callback (runtime.js:234) Global Code (Script Element 11:1) [Error] Error: Callback 'main.App.Xxx-3457571642' not registered!!! Callback (runtime.js:235) Global Code (Script Element 11:1)
To Reproduce
reload some times.
Expected behaviour
how to fix this bug
Screenshots
No response
Attempted Fixes
No response
System Details
Mac, Windows
Additional context
No response
Hi! It looks like you are trying to report a bug but haven't provided enough details. Please make sure your report includes:
- Clear, reproducible steps that demonstrates the bug
- Please include the output of
wails doctor
I don't know if this will help, but the same error log popped up for me, and it was a case where the form was sent when the button in the form tag was clicked, and the page was automatically re-rendered. This was resolved by inserting
// react
<form onSubmit={e=>{e.preventDefault()}}></form>
code to prevent the form tag from being sent when the button is clicked.
If you don't want to prevent the default action on the form, then I believe the default button type is submit so you could also fix this with:
<button type="button">click!</button>