Hi, I don’t know if this is the right forum to post this. Also, I tried to report a bug and I never got an ID to track it, so I wasn’t sure if the feature was working / I was reporting it properly.
Bug Description :
The ZeroConf plugin (link here) won’t work properly after restarting the app.
I thought the following bugs were independent but I realized that they have a common cause:
- On Windows, the ZeroConf browser won’t call the previously initialized event listener after restarting the app (Ctrl+R), and no errors are displayed on the console.
- On Android, the ZeroConf browser won’t call the event listener either (after restarting the app, i.e. when a file is changed and the app restarts automatically), and a subtle error is shown on the logcat:
“CoronaRuntimeTaskDispatcher.send() doesn’t have an available CoronaRuntime to run this task on! Abort!”
Steps to reproduce
The ZeroConf plugin fails when the app is restarted without closing.
- In the Windows 10 simulator (simulating Android):
Launch the app, publish the service and start the browser… An event is issued.
Everything seems to work normally.
Stopping the browser and the service or not, does not affect reproducibility of the bug (it will happen anyway).
Now, press Ctrl+R to restart the app, publish the service again and start the browser… No event is issued this time.
The only solution is to close the simulator application, and start the simulator again.
- Similarly, on an Android phone (using “logcat Corona:v *:s”)
Launch the app, publish the service and start the browser… An event is issued (again)
Everything seems to work normally.
Force a refresh on the phone through the Corona Live server (add and remove on space on the editor, and save the file)
Now, publish the service and start the browser… No event is issued.
However, the Android logcat shows:
“CoronaRuntimeTaskDispatcher.send() doesn’t have an available CoronaRuntime to run this task on! Abort!”
Comments
In my experience, this happens whether a single device or two devices are used for service/browser tasks.
Also, I am pretty sure that the logcat message is shown when the event is about to dispatch the event, but somehow, the dispatcher fails to be send the event, and that is probably why the event is never received on Android, and maybe, for a similar reason, also on Windows 10.
Code for testing purposes :
See attachment