How does Playwright tracing file compare to HAR file? - playwright

Playwright lets you record HAR, but there's also context.tracing.start. The latter also lets you capture screenshots to the resulting ZIP, but HAR file seems to be better supported outside of Playwright. So what is the difference, are trace files basically HAR files with screenshots, or is there any info missing that would be found in a HAR?

Playwright Tracing enables you to see screenshots, DOM Snapshots, console logs, Playwright method calls etc. These can be viewed using the Playwright trace viewer.
HAR is a file specification which supports only network requests, these can be viewed e.g. in Chrome DevTools.
See here for more information about the trace viewer: https://playwright.dev/docs/next/trace-viewer

Related

How can I export/extract log from perfetto trace file?

I use perfetto to capture a trace on android device. and pull it to my computer.
I can found out the log after open on ui.perfetto. And the log is shown on android log column. But it's too hard to search.
Since perfetto save all its data including log in its database. Can I extract the log by some way?

TraceView able to capture logs occurring during driver installation, but shown as Unknown

I am developing a UMDF driver, and I am able to use its PDB file to confirm events/function calls during its lifetime. However, I am also able to capture events prior to its DriverEntry function. This events have become a concern for me, because I suspect that they alter some values initialized by the driver, thereby causing issues. I would like to know more about these events, but information on TraceView shows them as 'Unknown' as shown below:
Is there a way to capture these trace logs better? It seems like the driver pdb does not contain information for these logs to show up correctly.
EDIT: I extracted TMF files from my PDB file using tracepdb, and it seems like I do not have a TMF file that corresponds to the message GUIDs that are marked "No format information found". Could it be that these trace messages are from external entities, and not coming from the driver?
Fortunately, we have the complete list of PDB files that have been released. We found the a matching trace file after looking at each one of these files, and therefore got the information we wanted.

In Dart, what's the simplest way to get the bytes of a local file for a web app?

(I'm new to web stuff, I'm sorry for any botched terminology)
I want to make a Gameboy Emulator web app, and the first step in that is reading the bytes of the ROM. Eventually, the user will be able to select the ROM, but right now, I just have 'tetris.gb' in the directory along with 'index.html' and 'out.js' (the output of main.dart run through dart2js).
I've been trying to find an easy way to read the bytes of 'tetris.gb,' and the 'dart:io' library looked promising, but it's not available for browser-based applications.
In the browser you have 2 options.
Load a file from the server using an HTTP GET request.
See for example
Using dart to download a file
Load a file from the users computer using file upload functionality.
See for example File input and Dart
dart:io can only be used on the server or in console or Flutter apps, but not in code running in the browser.

Can I abuse ASL (Apple System Log) for logging only to a log file?

It is easy to configure ASL to log messages also to stderr or to log a copy of the message to a log file of my choice (using a log format of my choice), but I wonder if it is possible to "abuse" ASL to only log to such an external file, without passing messages through the standard logging processing (e.g. without having the message being processed by the asl.conf file rules and without having it ending up in the .asl binary files)? That way one could easily make use of the filter and formatting capabilities of ASL when writing application log files, that shall not appear in Console.app or log so much data, that they would flood the standard log files (like system.log).
For those who don't know what ASL is, it's Apple's default logging facility for OS X, similar to syslog on other systems (in fact the syslog API has became a slim wrapper around ASL, maintained only for backwards and POSIX compatibility). I haven't found any detailed documentation at Apple's website, there is no extensive guide for using this API, there is only the man page and the header file.

Installing applications OTA

I have a system set up to download jad files on users' Blackberries, but it only works intermittently, and seemingly randomly. If the user clicks on the link within their BlackBerry browser, 95% of the time on the first try an error message will pop up saying there was an HTTP 500 error (which our server never returns).
Viewing the details of this message within the blackberry browser, it says nothing but java.lang.nullpointerexception which, again, could not have come from our server (running apache/php).
However, if the user clicks on the link a few more times, or navigates away and goes back to that page, it suddenly works. No change on the server, it just shows the application install screen. Unfortunately, this doesn't always work; sometimes the error 500 just keeps showing up.
The link is rather long (containing an sha hash as a token as part of the URL), but I would think that a long URL would either always be broken or always work, not work intermittently.
The link uses a php script to download the jad and cod files. Linking to the files directly rather than using the script seems to work more often (I haven't determined if that also ever has an error 500 or not), but I can't find any issues with the headers. The content type is set correctly and, like I said, if the headers were an issue, I'd think it would either always work or always break.
Any clues?
You may be able to shed some light on the problem by looking at the event logs, which you can get using JavaLoader:
javaloader -u eventlog > event.log
Search for NullPointerException within those logs and you'll be able to see what's causing it.
I can't explain the intermittent behaviour, but I had a similar situation where I was getting the java.lang.NullPointerException in the browser details. Unfortunately, the Event Log (as dumped by javaloader.exe) or by viewing on-device using Alt-L-G-L-G didn't show the exception.
(I'm using bb-ant-tools and JDE 4.6.1.) When the signature tool ran, I noticed that there were two .cod files being signed and I can see both of them inside the .jar file the compiler creates. But the output written was a single .cod file of size 92306 bytes that was not a .zip of smaller .cod files. The compiler somehow was not able to create a .cod that contained siblings. For comparison, compiling the project with JDE 5.0.0 created sibling .cod files that were able to be loaded over OTA.
My project included an .mp3 file of 53542 bytes which I happened to not require. After removing it, the 4.6.1 compiler outputted a single .cod and I was able to successfully download it via OTA.

Resources