UXP Webview Logs Location

Are the WebView logs for UXP stored on disk anywhere?

They don’t appear to be in the regular UXP Log Folder:

  • Windows: C:\Users\<username>\AppData\Roaming\Adobe\Premiere Pro (Beta)\Logs

  • Mac: /Users/<username>/Library/Logs/Adobe/Adobe Premiere Pro (Beta)

Or the regular WebView Logs locations per OS.

We can of course pass the logs back to the UXP layer, but it would be ideal to have these stored separately.

Thanks

1 Like

No, there are no such logs.

@bbb_999 thanks for confirming.

As this is a core UXP item, being WebView related, @indranil any chance of exposing WebView logs in the future?

We don’t have any plans for supporting this.

1 Like

@indranil I know you have no plans to support this, however upon testing, passing logs constantly from the WebView layer back to the UXP layer causes a few issues, one major one with Premiere being that it can interrupt the Modal state of any dialogs such as alert() which causes the entire app to freeze until relaunching.

I would instead think to setup a WebSocket server and pass the logs that way to not interrupt the postMessage() stream, however there’s no way to setup a WS server in UXP without a Hybrid Plugin function, and setting up a Hybrid Plugin function for a WS server just to save WebView logs seems like severe overkill.

Alternatively we could just store logs on the WebView side and then save them to disk when a user presses a “Save Logs” button, but in a lot of cases where errors cause a plugin to crash, there won’t be time for this operation, we would need to see every last log up until the plugin crashed.

Having standard logging for WebView is just going to be a pretty essential requirement for lots of complex UXP plugins.


Upon doing further research, it seems enabling logs in UXP would be as simple as passing a path argument to the Webview constructor for Windows:

(assuming UXP source is C++)

Webview2 on Windows with CreateCoreWebView2EnvironmentWithOptions()

The Data folder is simply passed as the second argument and the WebView API handles logging.

This is how Tauri handles it (in Rust, but same setup): wry/src/webview2/mod.rs at 9d0a9fe31321797b2fb4dd83e01408df9d7fedcc · tauri-apps/wry · GitHub


And on MacOS, there would be a few more steps, but if you’re using WebKit2GTK, the methods already exist, they just need to be plugged in.

WebKit WebView on MacOS

How Tauri sets it up:


If your team is able to review this, myself and the whole community would greatly appreciate it as more and more of us are migrating to UXP with WebView for more complex projects.

Happy to help your team in research or testing to get this feature implemented.

Thanks so much

3 Likes

That looks to be a well-thought-out option @justin2taylor.

I hope it becomes a standard with UXP. My team’s project has started using WebView for some things, and since all our users are remote, having adequate logs makes support possible.
jsw

1 Like

Hello @justin2taylor . Thank you for the detailed proposal. I am not committing to timelines, but we shall definitely take a look at this. I think it adds value to the UXP ecosystem.

2 Likes

Appreciate your team looking into this! Be sure to reach out if we can help.