5.10.1. Trouble Shooting¶
Below are the first steps that should generally be taken when trying to identify a ConsoleUser problem.
5.10.1.1. Confirm Config¶
The first step is, naturally, make sure you’re telling ConsoleUser to do the thing you want it to do. In particular, make sure you’re specifying the correct connection information.
Also, then, make sure you have correctly identified the platform type and the right type of application to use. For example, if the config file says to use Firefox51Win7 but the platform is actually Fluxbox, that is unlikely to be successful.
Make sure, as well, that the “windows theme” is set correctly in the
config. If ConsoleUser expects a different theme than the platform is
using then many region matches will fail. Themes should match paths in
the image library, and will be the last subdirectory before the actual
files themselves. For example, to use the images in
emailClient/thunderbird/45.8/win7/64/classic
when using the
Thunderbird 45 on Win 7 module you would have to specify
windowsTheme=classic
(this example also has a region modifier so
this would also need regionModifier=64
since 32- and 64-bit Win 7
have different appearances).
5.10.1.2. Verify Platform¶
One common problem is that the visual settings for the platform have
been changed from ConsoleUser needs. This can include things like the
screen resolution or theme. For some platforms there is a tool provided
to apply the needed settings. Try running that tool, which is named
Configure<platform>.py
as in ConfigureWin7.py
. These will take
as arguments the connection information and, in case it’s needed, the
admin credentials.
5.10.1.3. Log Messages¶
The default log level provides only general progress and error messages which are not always enough for full troubleshooting. This mostly applies when providing logs to a developer to help understand the failure.
Adding logLevel = Trace
to the config file before running (or
adding -t
to a unit test module) will enable the most verbose level
of logging, which can help a developer trace the actual location of the
issue.
For more discussion of how to use the logs (sometimes with other steps discussed here) to troubleshoot see _troubleshootingWithLogs.
5.10.1.4. Screen Comparison¶
The above steps can help tell why a match might be off if all other things are working as expected. Sometimes the way things are rendered are just different for some reason though. This could happen with other updates or when some platforms and settings are in use the surrounding environment changing.
To see if this is the case, by hand navigate so the expected match is
visible. Then, in the ConsoleUser install directory (often
/usr/loca/tg/cu
) there is a tools
directory. Use the
capture.py
script to grab a screenshot using the same view as
ConsoleUser uses. This command takes 3 arguments, the first is the
host name/address of the VNC server in question. The second is the
port number for the VNC server. Finally, is a prefix to use with all
files the tool creates. An example that talks to a server listening on
port 5925 on IP 192.168.114.57 that creates files like output-0.png
would be ./capture.py 192.168.114.57 5925 output-
.
The tool will take a couple of seconds to ensure it has a good
connection, then every time you hit ENTER
it will take another
screenshot, adding the next number to the prefix. This can let you
walk through several steps capturing different screens as you go.
When the screenshot is saved open it with a good image viewer (Skaion
uses GIMP for all of its image manipulation
related to ConsoleUser, so that’s recommended here too). The next step
may be clear, or might require information from a developer, but the
image that should match the screen should also be opened. Sometimes
that name is clear, but looking in the right images
directory under
the ConsoleUser install area. Most of the time it’s in the qemu
directory unless you know you’re using another VNC server (compare this
directory with the RegionTarget
config parameter). Many of the
image files in that directory have intuitive names like
okButton.png
. If it is clear which should be matched, open that
one.
Then zoom each image to the level where you can see individual pixels. In GIMP 8x is usually a good zoom level. If you look at the area of the screen that should be matched and compare pixel-by-pixel with the region that is what will actually attempt to be matched it should be possible to identify if there are in fact differences.
If there are, a new image will have to be captured for this region, or some other cause for why there is now a mismatch in this region should be found. See some of the steps above for making sure that the system and configuration match expectations.
This will confirm that something has changed the way the region we’re trying to match works, but solving such a problem is beyond the scope of this guide. Please contact a developer if this situation comes up.