Measure Troubleshooting

1 - Message "Please set […] in .greenspector/config.yml"

Problem

Message :

  • Please set the application name in .greenspector/config.yml to use this feature

  • Please set the version in .greenspector/config.yml to use this feature

This message appears if the file .greenspector/config.yml is not complete to use this feature.

Solution

Complete the file .greenspector/config.yml with the missing information by looking at the CLI usage section.


2 - http_request module installation

If you activated the http_request module, it’s possible you encounter an error of this kind.

INFO[2016-09-08T08:06:42+02:00] Phantomas - isPhantomasInstalled ERRO[2016-09-08T08:06:42+02:00] Phantomas command execution failed: fork/exec : no such file or directory INFO[2016-09-08T08:06:42+02:00] Phantomas - Install npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130 INFO[2016-09-08T08:07:53+02:00] Phantomas - Launch http://www.greenit.fr ERRO[2016-09-08T08:07:53+02:00] Phantomas command execution failed: fork/exec : no such file or directory ERRO[2016-09-08T08:07:53+02:00] Error while launching phantomas: fork/exec : no such file or directory

It happens because you activated the module but the phantomas dependency is not installed. The Testrunner is doing this for you but you still need NPM (Node Package Manager) installed on your computer.

From here, you need to add Phantomas Path and version in your config.yml, then relaunch the Testrunner.


3 - Measure results are not sent to the server

Problem

Results are not displayed on the web interface after measures have been run.

Solution

Verify the logcat of the android device with the tag GSPT:

logcat

adb logcat | grep GSPT

These logs may give relevant information if a problem occurred during the measure.

Verify permissions are properly set up in your application manifest:

AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />

If not set, the application cannot access the Internet and thus send results to your GREENSPECTOR instance.

  1. In your browser, https://your-instance.greenspector.com/api must return OK.

  2. If your measures were run using the Test Runner, verify that your measures were not done in offline mode by checking your .greenspectorconf.json file. In that case, simply fix your configuration. Moreover, you can send your previous measurement results using the CLI.


4 - Unauthorized return with CLI

Problem

Error: Unauthorized. Your token may be invalid. Please check your configuration file.

Reason

This message appears when you are trying to use a feature that requires connection and your private token is not valid.

Solution

  1. Verify your token and server address in [USER HOME]/.greenspector/config.yml

  2. Check your connection using the command gspt ping.


5 - Bash compatibility on Windows

The PC-Launcher used by the Testrunner to measure Websites on PC relies on Bash.exe. We support the Git Bash Implementation provided by Git for Windows. If you use another Bash implementation, you may encounter some issues while measuring a Website. which are, the browser getting stuck for more than a minute on a blank page with URL field set as "data;" and the Testrunner stuck on the following

If that’s the case, please ensure you are compliant with our requirements and update your Bash implementation.


6 - "Command not found" when I run CLI

Problem

When I try to run the CLI , I get a command not found error.

Solution

If the gspt command is not found by your system, check if the path to the GREENSPECTOR Command Line executable file is in the $PATH.


7 - Chromedriver issue on Windows

While doing website measures on Windows, chromedriver processes may stay open and accumulate after the Testrunner exited and disturb further use. You may need to kill those processes.


8 - Firefox browser is not supported for standard URL jobs on mobile

When launching a standard URL job on mobile with the Test Runner, only Chrome browser is supported. If you set Firefox browser in the job configuration file, the Test Runner may not fail with an error indicating that the browser is not supported.


9 - Meter compatibility with Windows

Meter tools running on PCs or servers (Meter API Java and JS, Meter Standalone, TestRunner, Plugin JMeter) can be used:

  • in local mode on Mac OS, Windows or Linux;

  • in distant mode (via SSH) from a Mac OS or Linux-based PC to a Linux-based server.

They are not validated in distant mode (via SSH) from a Windows-based PC to a Linux- or Windows-based server.


10 - Ping command of CLI doesn’t work

It's likely that your network requires a proxy to access the Internet. For example, it may work at home, but not at the office. To make sure it's your corporate network that's doing the blocking, you can do a connection share with your phone so that your PC no longer uses your office network, and re-run the 'gspt ping' command. If the ping command still doesn't work, the problem is elsewhere. If the ping command works, you'll need to configure the CLI with the proxy.

The documentation to configurate the proxy for the CLI is here https://greenspectorstudio.atlassian.net/wiki/x/hoDKBw in “Optional proxy configuration” part.


11 - Testrunner Read error for GDSL file : EACCES (Permission denied)

Example :

  • java.lang.Exception: Error reading test file /sdcard/greenspector/testssuites/suite1/script.testgb 

  • Caused by: java.io.FileNotFoundException: /sdcard/greenspector/testssuites/suite1/script.testgb open failed: EACCES (Permission denied) 

  • Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied) 

On some phones, the Greenspector application does not acquire the correct rights to read files from the sdcard or the Greenspector application has lost its rights.

To solve this problem, try to use the command :

Then launch your test.

If you have the same problem, go to the phone in settings / apps, choose the Greenspector application, in Permissions / Files and media, choose 'Allow management of all files'. Do the same for the application com.greenspector.testbench.launcher.android.test


12 - Test results passed but I think the test didn't run

On rooted device (like s9 on our TestBench), you can’t pass spaces in extras parameters values.

In the example bellow, you need to remove spaces in extra parameter QUESTION1 when you run Greenspector CLI

In the example bellow, you need to remove spaces in extra parameter step1 in job.yml when you run Test Runner


13 - CLI (gspt) error when using a '!' in the terminal

In bash, the ! is interpreted. For example the command ‘!u' attempts to execute your last command starting with u. When using the CLI, if you must use a ‘!’ in your additional parameter you need to escape it with '\’.


14 - Website GDSL tests behavior may differ between local device and Test Bench device

When automating your user journey, sometimes a GDSL test will pass on a local device and fail on a Test Bench device or vice versa. Test results may show that there are differences in the dump, the text may be found in the Test Bench device dump and not in a local device dump.

This behavior probably comes from the fact that the local device and the Test Bench device do not have the same Chrome version. Please install chrome 110 on local device How to change chrome version to chrome 110 on local device


15 - Test Runner error DELETE_FAILED_INTERNAL_ERROR when uninstalling com.greenspector.testbench.launcher.android

If you have this error when launching a test with the TestRunner, please read the following :

For Xaomi Devices

You have to set more rights set in developer option. Please enable the options as in the capture. These 4 options require to create and log in a Xaomi account and put a SIM card on your phone (the simcard could be disabled). Accept all the popup to confirm the option.

 

IMG_20240923_105559.jpg

 

Then relaunch your test. You have to manually accept the Greenspector apks installation by clicking on ‘Install’ button on your phone.

 

Screenshot_2024-09-19-18-09-05-417_com.miui.securitycenter.jpg

 

For other devices

please clean components installed on your device with the following command

Then relaunch your test