wails icon indicating copy to clipboard operation
wails copied to clipboard

some time will callback error, "[Error] Callback 'xxxx' not registered!!! Callback (runtime.js:234) Global Code (Script Element 11:1) "

Open Qingluan opened this issue 1 year ago • 3 comments

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

Qingluan avatar Jul 10 '24 09:07 Qingluan

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

leaanthony avatar Jul 22 '24 20:07 leaanthony

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.

rayshoo avatar Jul 26 '24 09:07 rayshoo

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>

brettinternet avatar Mar 11 '25 05:03 brettinternet