Dorion icon indicating copy to clipboard operation
Dorion copied to clipboard

Tauri v2 (for real this time probably)

Open SpikeHD opened this issue 1 year ago • 9 comments

Porting to Tauri v2

SpikeHD avatar Jul 10 '24 03:07 SpikeHD

Awesome progress

image

SpikeHD avatar Jul 10 '24 03:07 SpikeHD

This is apparently due to the preinject script. Assuming I can get that working this actually doesn't seem too difficult

SpikeHD avatar Jul 10 '24 05:07 SpikeHD

Some discoveries related specifically to Windows:

  • Replacing inbuilt window properties (e.g fetch or XMLHttpRequest) causes STATUS_ACCESS_VIOLATION when done too early, and I suspect Tauri v2's initialization_script runs earlier than v1. These were moved to a later part of the loading process.
  • tauri-plugin-http hangs when sending requests for some reason. Does not throw an error, even if URL is something nonsensical like __TAURI__.http.fetch('test').
  • load_plugins command hangs when invoked in the frontend. It is not an infinite loop and the function does exit, so idk what's going on there.

TODO see if this happens on Linux too.

SpikeHD avatar Jul 12 '24 07:07 SpikeHD

Regarding the above ^

Tauri commands that return primitive values (string, number, bool, etc.) all work fine. Commands that return complex values, like HashMaps or other structs, will infinitely hang. I have not observed higher CPU usage or anything weird. The reason the HTTP module hangs is for the same reason - it returns a complex object here. I have no idea where this issue resides and it's driving me insane.

Can also confirm that this happens on Linux too, so it's definitely an internal Tauri IPC issue

SpikeHD avatar Jul 14 '24 02:07 SpikeHD

Hey spike, not sure if you want bug reports with this yet, but here are my observations while running windows 11. After installing i also got STATUS_ACCESS_VIOLATION, but pressing refresh fixed. I can't send messages (this is in your server, dms dont work either) image (never seen that message in a public server 👀) image image It seems all the api stuff is a bit whack Last issue i found (as it's very hard to find an issue when nothing works) is with the tray icon image The button with the icon focuses dorion when left clicked, but does nothing when right-clicked The button with no icon (left of dorion icon) does nothing when left clicked, but shows Open|Reload|Restart|Quit menu when right clicked)

If you need anymore testing I have both windows 11 and debian to test on

Banaanae avatar Jul 20 '24 09:07 Banaanae

Clicking the add reaction button causes this image Reactions still work

Banaanae avatar Jul 20 '24 10:07 Banaanae

That's fine those warnings are everywhere (and happen in current Dorion too, probably), they don't seem to mean anything

SpikeHD avatar Jul 20 '24 16:07 SpikeHD

Also yes that spam of errors is (likely) due to the issues I've outlined above, this branch is very much not finished yet

SpikeHD avatar Jul 20 '24 16:07 SpikeHD

Related: https://github.com/tauri-apps/tauri/issues/10327

SpikeHD avatar Jul 31 '24 23:07 SpikeHD