webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.9k stars 164 forks source link

Yandex browser issue (Windows, webui 2.4.0) #185

Closed delphius closed 11 months ago

delphius commented 1 year ago

I usually have a Yandex browser running, so webui selects it to launch the window, I looked at the mechanism in the source codes of the library. When testing a new version of the library, such a thing happens, if the Yandex browser is running, then webui_show (both html code and path to html file) simply opens windows Explorer in the folder C:\Users and that's it. If you unload Yandex, the library loads chrome by default and everything is ok. I haven't checked other browsers yet, there's no time.

hassandraga commented 1 year ago

Thank you for reporting this. Can you please share the logs so we can know whats going on?

To get the logs please use webui built in debug mode.

delphius commented 1 year ago

Thank you for reporting this. Can you please share the logs so we can know whats going on?

To get the logs please use webui built in debug mode.

[User] webui_new_window()... [Core] WebUI v2.4.0 [Core] _webui_init()... [Core] _webui_get_current_path()... [Core] _webui_malloc([260])... [Core] _webui_ptr_add(0x0000000005f41470) -> Allocate 512 bytes [Core] _webui_malloc([260])... [Core] _webui_ptr_add(0x0000000005f41680) -> Allocate 512 bytes [User] webui_get_new_window_id()... [Core] _webui_malloc([4272])... [Core] _webui_ptr_add(0x0000000005f465e0) -> Allocate 8192 bytes [Core] _webui_malloc([260])... [Core] _webui_ptr_add(0x0000000005f41910) -> Allocate 512 bytes [Core] _webui_malloc([260])... [Core] _webui_ptr_add(0x0000000005f41b20) -> Allocate 512 bytes [Core] _webui_malloc([260])... [Core] _webui_ptr_add(0x0000000005f41d30) -> Allocate 512 bytes [Core] _webui_is_empty()... [User] webui_new_window() -> New window #1 @ 0x0000000005f465e0 [User] webui_bind([1], [], [0x0000000100001610])... [Core] _webui_is_empty()... [Core] _webui_malloc([4])... [Core] _webui_ptr_add(0x0000000005f41f40) -> Allocate 8 bytes [Core] _webui_get_cb_index([1/])... [Core] _webui_set_cb_index([1/])... [Core] _webui_is_empty()... [User] webui_bind([1], [MyID], [0x0000000100001680])... [Core] _webui_is_empty()... [Core] _webui_strlen()... [Core] _webui_is_empty()... [Core] _webui_malloc([8])... [Core] _webui_ptr_add(0x0000000005f41f60) -> Allocate 16 bytes [Core] _webui_get_cb_index([1/MyID])... [Core] _webui_is_empty()... [Core] _webui_set_cb_index([1/MyID])... [Core] _webui_is_empty()... [Core] _webui_is_empty()... [User] webui_show([1])... [Core] _webui_find_the_best_browser()... [Core] _webui_is_process_running([chrome.exe])... [Core] _webui_is_process_running([msedge.exe])... [Core] _webui_is_process_running([epic.exe])... [Core] _webui_is_process_running([vivaldi.exe])... [Core] _webui_is_process_running([brave.exe])... [Core] _webui_is_process_running([firefox.exe])... [Core] _webui_is_process_running([browser.exe])... [Core] _webui_browser_exist([10])... [Core] _webui_get_windows_reg_value([S])... [Core] _webui_file_exist([C:\Users])... [Core] _webui_is_empty()... [Core] _webui_show([10])... [Core] _webui_is_empty()... [Core] _webui_strlen()... [Core] _webui_is_empty()... [Core] _webui_malloc([6])... [Core] _webui_ptr_add(0x0000000005f41f80) -> Allocate 8 bytes [User] webui_show() -> File: [1.html] [Core] _webui_show_window(FILE, [10])... [Core] _webui_get_free_port()... [Core] _webui_port_is_used([27758])... [Core] _webui_socket_test_listen_win32([27758])... [Core] _webui_get_free_port()... [Core] _webui_port_is_used([36160])... [Core] _webui_socket_test_listen_win32([36160])... [Core] _webui_strlen()... [Core] _webui_is_empty()... [Core] _webui_malloc([38])... [Core] _webui_ptr_add(0x0000000005f485f0) -> Allocate 64 bytes [User] webui_is_shown([1])... [Core] _webui_browser_start([http://localhost:27758/1.html], [10])... [Core] _webui_browser_start_yandex([http://localhost:27758/1.html])... [Core] _webui_browser_exist([10])... [Core] _webui_is_empty()... [Core] _webui_browser_create_profile_folder(10)... [Core] _webui_browser_get_temp_path([10])... [Core] _webui_get_browser_args([10])... [Core] _webui_run_browser()... [Core] _webui_cmd_async()... [Core] _webui_cmd_async() -> Running [cmd /c "START "" "C:\Users\" --user-data-dir="C:\Users\─юьр°эшщ.WebUI\WebUIYandexProfile" --no-first-run --no-proxy-server --safe-mode --disable-extensions --disable-background-mode --disable-plugins --disable-plugins-discovery --disable-translate --bwsi --disable-sync --disable-sync-preferences --app=http://localhost:27758/1.html" > nul 2>&1] [Core] _webui_system_win32()... [Loop] webui_wait()... [Loop] webui_wait() -> Timeout in 30 seconds [Loop] webui_wait() -> Waiting for connected UI... [Core] [Thread] _webui_server_start()... [Core] _webui_dereference_win_ptr()... [Core] [Thread] _webui_server_start([1]) -> URL: [http://localhost:27758/1.html] [Core] _webui_malloc([16])... [Core] _webui_ptr_add(0x0000000005f48930) -> Allocate 32 bytes [Core] _webui_malloc([16])... [Core] _webui_ptr_add(0x0000000005f48960) -> Allocate 32 bytes [Core] [Thread] _webui_server_start([1]) -> Listening Success [Core] [Thread] _webui_server_start([1]) -> HTTP Port: 27758 [Core] [Thread] _webui_server_start([1]) -> WS Port: 36160 [Core] [Thread] _webui_server_start([1]) -> Timeout is 30 seconds [Core] [Thread] _webui_server_start([1]) -> Root path: . [Core] [Thread] _webui_server_start([1]) -> Waiting for first HTTP request... [Core] [Thread] _webui_server_start([1]) -> Cleaning... [Core] _webui_free_port([27758])... [Core] _webui_free_port([36160])... [Core] [Thread] _webui_server_start([1]) -> Server stoped. [Loop] webui_wait() -> Wait is finished. [Core] _webui_clean()... [Core] _webui_free_all_mem()... [Core] _webui_free_all_mem() -> Free 512 bytes @ 0x0000000005f41470 [Core] _webui_free_all_mem() -> Free 512 bytes @ 0x0000000005f41680 [Core] _webui_free_all_mem() -> Free 8192 bytes @ 0x0000000005f465e0 [Core] _webui_free_all_mem() -> Free 512 bytes @ 0x0000000005f41910 [Core] _webui_free_all_mem() -> Free 512 bytes @ 0x0000000005f41b20 [Core] _webui_free_all_mem() -> Free 512 bytes @ 0x0000000005f41d30 [Core] _webui_free_all_mem() -> Free 8 bytes @ 0x0000000005f41f40 [Core] _webui_free_all_mem() -> Free 16 bytes @ 0x0000000005f41f60 [Core] _webui_free_all_mem() -> Free 8 bytes @ 0x0000000005f41f80 [Core] _webui_free_all_mem() -> Free 64 bytes @ 0x0000000005f485f0 [Core] _webui_free_all_mem() -> Free 32 bytes @ 0x0000000005f48930 [Core] _webui_free_all_mem() -> Free 32 bytes @ 0x0000000005f48960 [Core] Done.

delphius commented 1 year ago

perhaps the reason is in the Cyrillic name of the user profile

hassandraga commented 1 year ago

The issue starts from _webui_get_windows_reg_value. It should be the complete Unicode string. I will investigate more on this. Thank you for pointing this out.

hassandraga commented 1 year ago

https://github.com/webui-dev/webui/issues/188

hassandraga commented 11 months ago

Same as https://github.com/webui-dev/webui/issues/188