Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win Chrome 130 - Dialogs, Popup Windows and Dev Tools #336

Open
oleteacher opened this issue Nov 10, 2024 · 10 comments
Open

Win Chrome 130 - Dialogs, Popup Windows and Dev Tools #336

oleteacher opened this issue Nov 10, 2024 · 10 comments
Labels

Comments

@oleteacher
Copy link

oleteacher commented Nov 10, 2024

Thanks for releasing Windows Chrome 130.

I do not think it is my end, have tried on my desktop and laptop.

Cannot get any of the JavaScript alerts to work in dialogs.php

Cannot get the dev tools to show using either f12 or Show Dev Tools (right click). Using right click, there is no log shown, using f12 there is log entry shown.

Maybe this will help:

 17:35:43.922 DEBUG: OnLoadingStateChange: loading=0, url=http://127.0.0.1:64782/dialogs.php
- 17:35:43.000 INFO: GET 200 /favicon.ico
- 17:37:36.125 DEBUG: ClientHandler::OnAfterCreated()
- 17:37:36.125 DEBUG: GetBrowserWindow(): not found, hwnd = 3019194
- 17:37:36.140 DEBUG: BrowserWindow::BrowserWindow() created for Popup
- 17:37:36.140 DEBUG: StoreBrowserWindow(): hwnd = 3019194
- 17:37:36.140 DEBUG: GetBrowserWindow(): not found, hwnd = 0
- 17:37:36.140 DEBUG: Centering popup window relative to its parent
- 17:45:04.984 DEBUG: OnLoadingStateChange: loading=1, url=http://127.0.0.1:64782/dialogs.php
- 17:45:04.094 INFO: GET 200 /dialogs.php
- 17:45:04.109 INFO: GET 200 /style.css
- 17:45:05.672 DEBUG: OnLoadingStateChange: loading=0, url=http://127.0.0.1:64782/dialogs.php
- 17:45:05.765 INFO: GET 200 /favicon.ico
- 17:45:56.765 DEBUG: OnLoadingStateChange: loading=1, url=http://127.0.0.1:64782/dialogs.php
- 17:45:56.859 INFO: GET 200 /dialogs.php
- 17:45:56.875 DEBUG: OnLoadingStateChange: loading=0, url=http://127.0.0.1:64782/dialogs.php
- 17:45:56.969 INFO: GET 200 /favicon.ico
- 17:47:00.687 DEBUG: F12 pressed, opening developer tools

Default dialogs.php debug.log:

-field-trial-handle=4432,i,15068399474415448331,6920777093694457870,262144 --variations-seed-version --enable-logging=handle --log-file=4364 --mojo-platform-channel-handle=4408 /prefetch:8
- 18:00:25.890 DEBUG: OnLoadingStateChange: loading=1, url=http://127.0.0.1:65361/
- 18:00:25.515 DEBUG: OnBrowserCreated()
- 18:00:25.515 ERROR: StoreJavascriptApi() failed, api already exists
- 18:00:25.594 DEBUG: OnContextCreated()
- 18:00:25.969 INFO: GET 200 /dialogs.php
- 18:00:25.984 DEBUG: OnLoadingStateChange: loading=0, url=http://127.0.0.1:65361/dialogs.php
- 18:00:25.078 INFO: GET 200 /favicon.ico
[3892:18700:1110/180028.660:INFO:CONSOLE(0)] "A window.prompt() dialog generated by this page was suppressed because this page is not the active tab of the front window. Please make sure your dialogs are triggered by user interactions to avoid this situation. https://www.chromestatus.com/feature/5637107137642496", source: http://127.0.0.1:65361/dialogs.php (0)
[3892:18700:1110/180029.760:INFO:CONSOLE(0)] "A window.prompt() dialog generated by this page was suppressed because this page is not the active tab of the front window. Please make sure your dialogs are triggered by user interactions to avoid this situation. https://www.chromestatus.com/feature/5637107137642496", source: http://127.0.0.1:65361/dialogs.php (0)
- 18:01:00.953 DEBUG: WM_DESTROY
- 18:01:00.953 DEBUG: RemoveBrowserWindow(): hwnd = 1381480
- 18:01:00.953 INFO: Stopping Mongoose web server
- 18:01:00.953 DEBUG: Mongoose webserver stopped immediately
- 18:01:00.969 DEBUG: OnBeforeClose() hwnd=726084
- 18:01:00.969 DEBUG: RemoveBrowserWindow(): hwnd = 726084
- 18:01:00.984 DEBUG: GetBrowserWindow(): not found, hwnd = 726084
- 18:01:00.984 WARNING: RemoveBrowserWindow() failed: GetBrowserWindow() failed
- 18:01:00.984 DEBUG: Calling CefQuitMessageLoop()
- 18:01:00.172 INFO: Ended application
- 18:01:00.172 INFO: --------------------------------------------------------

Testing a custom dialogs.php debug.log:

- 17:45:56.765 DEBUG: OnLoadingStateChange: loading=1, url=http://127.0.0.1:64782/dialogs.php
- 17:45:56.422 DEBUG: OnContextCreated()
- 17:45:56.422 ERROR: GetJavascriptApi() failed, api not found
- 17:45:56.422 ERROR: GetJavascriptApi() failed in OnContextCreated()
- 17:45:56.422 DEBUG: OnContextCreated()
- 17:45:56.422 ERROR: GetJavascriptApi() failed, api not found
- 17:45:56.422 ERROR: GetJavascriptApi() failed in OnContextCreated()
- 17:45:56.859 INFO: GET 200 /dialogs.php
[24116:24220:1110/174556.746:INFO:CONSOLE(104)] "Uncaught SyntaxError: Unexpected identifier 'confirmMessage'", source: http://127.0.0.1:64782/dialogs.php (104)
- 17:45:56.875 DEBUG: OnLoadingStateChange: loading=0, url=http://127.0.0.1:64782/dialogs.php
- 17:45:56.969 INFO: GET 200 /favicon.ico
[24116:24220:1110/174559.044:INFO:CONSOLE(54)] "Uncaught ReferenceError: showAlert is not defined", source: http://127.0.0.1:64782/dialogs.php (54)
[24116:24220:1110/174600.271:INFO:CONSOLE(56)] "Uncaught ReferenceError: showConfirm is not defined", source: http://127.0.0.1:64782/dialogs.php (56)
[24116:24220:1110/174600.623:INFO:CONSOLE(56)] "Uncaught ReferenceError: showConfirm is not defined", source: http://127.0.0.1:64782/dialogs.php (56)
[24116:24220:1110/174600.857:INFO:CONSOLE(56)] "Uncaught ReferenceError: showConfirm is not defined", source: http://127.0.0.1:64782/dialogs.php (56)
[24116:24220:1110/174601.584:INFO:CONSOLE(58)] "Uncaught ReferenceError: showPrompt is not defined", source: http://127.0.0.1:64782/dialogs.php (58)
[24116:24220:1110/174601.865:INFO:CONSOLE(58)] "Uncaught ReferenceError: showPrompt is not defined", source: http://127.0.0.1:64782/dialogs.php (58)
- 17:47:00.687 DEBUG: F12 pressed, opening developer tools
- 17:54:41.140 DEBUG: WM_DESTROY
- 17:54:41.156 DEBUG: RemoveBrowserWindow(): hwnd = 201864
- 17:54:41.203 DEBUG: OnBeforeClose() hwnd=3019194
- 17:54:41.203 DEBUG: RemoveBrowserWindow(): hwnd = 3019194
- 17:54:41.219 DEBUG: Calling CefQuitMessageLoop()
- 17:54:41.250 DEBUG: OnBeforeClose() hwnd=7210128
- 17:54:41.250 DEBUG: RemoveBrowserWindow(): hwnd = 7210128
- 17:54:41.250 DEBUG: GetBrowserWindow(): not found, hwnd = 7210128
- 17:54:41.250 WARNING: RemoveBrowserWindow() failed: GetBrowserWindow() failed
- 17:54:41.250 DEBUG: Calling CefQuitMessageLoop()
[22280:22440:1110/175441.466:WARNING:sqlite_persistent_store_backend_base.cc(198)] Failed to post task from FlushAndNotifyInBackground@net\extras\sqlite\sqlite_persistent_store_backend_base.cc:248 to client_task_runner_.
- 17:54:41.640 INFO: Ended application
- 17:54:41.640 INFO: --------------------------------------------------------

@cztomczak
Copy link
Owner

cztomczak commented Nov 11, 2024

I noticed the issue with dialogs, however devtools worked for me fine. I recall I changed runtime style from chrome to alloy later and I think this may have broken devtools.

@cztomczak
Copy link
Owner

popups.php works ok for me.

@cztomczak
Copy link
Owner

Commit 8ceda28 adds runtime_style setting configurable through settings.json.

runtime_style
This option is supported only on some platforms.

Default value: "alloy"

Alternative value is "chrome" which can provide more features and looks similar to native Chrome.

With chrome runtime style dialogs do work ok. Popups look like native Chromium browser with a tab.

I am mostly testing alloy style which hides Chromium styles.

@cztomczak
Copy link
Owner

Developer Tools fixed in commit 0a04732.

@oleteacher
Copy link
Author

Thank you for looking into!

@cztomczak
Copy link
Owner

Dialogs don't work due to bug in upstream CEF:
chromiumembedded/cef#3818
https://magpcss.org/ceforum/viewtopic.php?f=6&t=20041

@cztomczak
Copy link
Owner

New release 130.1 is ready:
https://github.com/cztomczak/phpdesktop/releases/tag/chrome-v130.1

@oleteacher
Copy link
Author

That is great Czarek. Thank you. Will close this now.

@oleteacher
Copy link
Author

No popup dialogs shown. Thought you may find this helpful:

- 11:50:15.672 DEBUG: JS dialog: Test alert
- 11:50:17.672 DEBUG: JS dialog: Test confirm
- 11:50:17.672 INFO: JS Console: [Warning] A window.confirm() dialog generated by this page was suppressed because this page is not the active tab of the front window. Please make sure your dialogs are triggered by user interactions to avoid this situation. https://www.chromestatus.com/feature/5140698722467840(http://127.0.0.1:50988/dialogs.php:0)
- 11:50:18.859 DEBUG: JS dialog: Test
- 11:50:18.859 INFO: JS Console: [Warning] A window.prompt() dialog generated by this page was suppressed because this page is not the active tab of the front window. Please make sure your dialogs are triggered by user interactions to avoid this situation. https://www.chromestatus.com/feature/5637107137642496(http://127.0.0.1:50988/dialogs.php:0)

@cztomczak
Copy link
Owner

JS dialogs are still unfixed, so you may re-open this. Dialogs will be fixed when it's fixed in upstream and phpdesktop updates Chromium version to sync with upstream.

@oleteacher oleteacher reopened this Nov 12, 2024
@cztomczak cztomczak added the v130 label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants