When having await message("File deleted."); in the code, the app just freezes with no console.log message or Rust-error. It only freezes most of the time. If I restart my laptop and run it the first time after restart, the messages work.
I'm not sure why it isn't working, it could be a bug in Tauri I suppose. Is it opening a dialog and displaying a message?
The fact that rebooting your laptop can make it work suggests that something weird is going on.
The fact that it freezes without any error messages suggests it's stuck during execution and not making any progress, which is why it sounded like a deadlock or infinite loop.