/
Measure Troubleshooting

Measure Troubleshooting

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

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.


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

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.


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.


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.


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.


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.


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.


Example :

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


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


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 '\’.


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

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

Please clean components installed on your device with the following command

Then relaunch your test