Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on console compare #109

Open
GeekZebre opened this issue Mar 27, 2019 · 12 comments
Open

Errors on console compare #109

GeekZebre opened this issue Mar 27, 2019 · 12 comments

Comments

@GeekZebre
Copy link
Contributor

When I launch ./bin/console compare , I have:

$ ./bin/console compare
These are all of the tests available, choose which you would like to run
+------------------+
| Test Suite       |
+------------------+
| browscap         |
| browser-detector |
| curated          |
| donatj           |
| endorphin        |
| piwik            |
| sinergi          |
| ua-parser        |
| uaparserjs       |
| whichbrowser     |
| woothee          |
| yzalis           |
| zsxsoft          |
+------------------+
Choose which test suites to run, separate multiple with commas (press enter to use all)
  [0 ] browscap
  [1 ] browser-detector
  [2 ] curated
  [3 ] donatj
  [4 ] endorphin
  [5 ] piwik
  [6 ] sinergi
  [7 ] ua-parser
  [8 ] uaparserjs
  [9 ] whichbrowser
  [10] woothee
  [11] yzalis
  [12] zsxsoft
  [13] All Suites
 >
Choose which parsers you would like to run this test suite against
+--------------------------------+------------+------------------+
| Name                           | Language   | Data Source      |
+--------------------------------+------------+------------------+
| 3rd-Eden useragent.js          | JavaScript | uaparser         |
| bowser JS 2.x                  | JavaScript |                  |
| Browscap JS 1.x                | JavaScript | browscap         |
| Browscap JS 2.x                | JavaScript | browscap         |
| Browscap JS 3.x                | JavaScript | browscap         |
| Browscap JS 4.x                | JavaScript | browscap         |
| Browscap PHP 2.x               | PHP        | browscap         |
| Browscap PHP 3.x Full File     | PHP        | browscap         |
| Browscap PHP 3.x Lite File     | PHP        | browscap         |
| Browscap PHP 3.x Standard File | PHP        | browscap         |
| Browscap PHP 4.x Full File     | PHP        | browscap         |
| Browscap PHP 4.x Lite File     | PHP        | browscap         |
| Browscap PHP 4.x Standard File | PHP        | browscap         |
| browser-detect JS 0.x          | JavaScript |                  |
| Browser Detector 5.0           | PHP        | browser-detector |
| Crossjoin Browscap 1.x         | PHP        | browscap         |
| Crossjoin Browscap 2.x         | PHP        | browscap         |
| Crossjoin Browscap 3.x         | PHP        | browscap         |
| detect-browser JS 4.x          | JavaScript |                  |
| Device Detector JS 1.x         | JavaScript | piwik            |
| Device Detector for Nodejs 0.x | JavaScript | piwik            |
| DonatJ PhpUserAgent 0.x        | PHP        | donatj           |
| Endorphin Browser Detector 3.x | PHP        | endorphin        |
| express-useragent JS 1.x       | JavaScript |                  |
| ua-device JS 0.x               | JavaScript |                  |
| Jenssegers Agent               | PHP        | jenssegers       |
| PHP Native get_browser         | PHP        | browscap         |
| Piwik Device Detector 3.x      | PHP        | piwik            |
| Sinergi Browser Detector       | PHP        | sinergi          |
| UA Parser PHP 3.x              | PHP        | uaparser         |
| UAParser.js                    | JavaScript | uaparserjs       |
| WhichBrowser JS 0.x            | JavaScript | whichbrowser     |
| WhichBrowser PHP 2.x           | PHP        | whichbrowser     |
| Wolfcast BrowserDetection      | PHP        |                  |
| Woothee JS Parser 1.x          | JavaScript | woothee          |
| Woothee PHP Parser 1.x         | PHP        | woothee          |
| yzalis UAParser                | PHP        | yzalis           |
| ZsxSoft PHP UserAgent          | PHP        | zsxsoft          |
+--------------------------------+------------+------------------+
Choose which parsers to use, separate multiple with commas (press enter to use all)
  [0 ] 3rd-Eden useragent.js
  [1 ] Browscap JS 1.x
  [2 ] Browscap JS 2.x
  [3 ] Browscap JS 3.x
  [4 ] Browscap JS 4.x
  [5 ] Browscap PHP 2.x
  [6 ] Browscap PHP 3.x Full File
  [7 ] Browscap PHP 3.x Lite File
  [8 ] Browscap PHP 3.x Standard File
  [9 ] Browscap PHP 4.x Full File
  [10] Browscap PHP 4.x Lite File
  [11] Browscap PHP 4.x Standard File
  [12] Browser Detector 5.0
  [13] Crossjoin Browscap 1.x
  [14] Crossjoin Browscap 2.x
  [15] Crossjoin Browscap 3.x
  [16] Device Detector JS 1.x
  [17] Device Detector for Nodejs 0.x
  [18] DonatJ PhpUserAgent 0.x
  [19] Endorphin Browser Detector 3.x
  [20] Jenssegers Agent
  [21] PHP Native get_browser
  [22] Piwik Device Detector 3.x
  [23] Sinergi Browser Detector
  [24] UA Parser PHP 3.x
  [25] UAParser.js
  [26] WhichBrowser JS 0.x
  [27] WhichBrowser PHP 2.x
  [28] Wolfcast BrowserDetection
  [29] Woothee JS Parser 1.x
  [30] Woothee PHP Parser 1.x
  [31] ZsxSoft PHP UserAgent
  [32] bowser JS 2.x
  [33] browser-detect JS 0.x
  [34] detect-browser JS 4.x
  [35] express-useragent JS 1.x
  [36] ua-device JS 0.x
  [37] yzalis UAParser
  [38] All Parsers
 >
Generating data for the browscap test suite... There was an error with the output from the browscap test suite.
Generating data for the browser-detector test suite... There was an error with the output from the browser-detector test suite.
Generating data for the curated test suite... There was an error with the output from the curated test suite.
Generating data for the donatj test suite... There was an error with the output from the donatj test suite.
Generating data for the endorphin test suite... There was an error with the output from the endorphin test suite.
Generating data for the piwik test suite... There was an error with the output from the piwik test suite.
Generating data for the sinergi test suite... There was an error with the output from the sinergi test suite.
Generating data for the ua-parser test suite... There was an error with the output from the ua-parser test suite.
Generating data for the uaparserjs test suite... There was an error with the output from the uaparserjs test suite.
Generating data for the whichbrowser test suite... There was an error with the output from the whichbrowser test suite.
Generating data for the woothee test suite... There was an error with the output from the woothee test suite.
Generating data for the yzalis test suite... There was an error with the output from the yzalis test suite.
Generating data for the zsxsoft test suite... There was an error with the output from the zsxsoft test suite.
Parsing complete, data stored in 20190327103055 directory
Normalizing data from test run: 20190327103055
Normalized files written to the test run's directory
Analyzing data from test run: 20190327103055
Error in options file for this test run
There was an error executing the "analyze" command, cannot continue.

A new console window is open when the 'build.sh' is called.
Is it te good behaviour ?

Thanks.

@mimmi20
Copy link
Contributor

mimmi20 commented Mar 27, 2019

@GeekZebre Did you call bin/prepare or bin/update before?

@mimmi20
Copy link
Contributor

mimmi20 commented Mar 27, 2019

@GeekZebre Do you use Linux? Which PHP/node version?

@GeekZebre
Copy link
Contributor Author

@mimmi20 Yes, I called bin/prepare.

I'm on Windows 10 with PHP 7.2 and node 8.11.1

$ php -version
PHP 7.2.8 (cli) (built: Jul 18 2018 10:03:03) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.1, Copyright (c) 2002-2018, by Derick Rethans
$ node -v
v8.11.1

@mimmi20
Copy link
Contributor

mimmi20 commented Mar 27, 2019

Did that work? On my system, Windows doesn't handle .sh files.

@GeekZebre
Copy link
Contributor Author

GeekZebre commented Mar 27, 2019

I use Git Bash to launch ! (MINGW64)

@mimmi20
Copy link
Contributor

mimmi20 commented Mar 27, 2019

I cannot reproduce this. I dont have installed php, node and the other required tool on my local machine, only in the vm.

@GeekZebre
Copy link
Contributor Author

"The vm" ? I don't see anything about a vm in the documentation. This is your personnal vm ?

What does the behaviour of this line ?

$testOutput = trim((string) shell_exec($testData['path'] . '/build.sh'));

A new window is open ?

In my case, a new windows is open. In the new window, the json is output.
But it's seem that the content is not transmit to the original windows.

What is your behaviour ?

@mimmi20
Copy link
Contributor

mimmi20 commented Mar 27, 2019

"The vm" ? I don't see anything about a vm in the documentation. This is your personnal vm ?

yes, my personell VM.

@GeekZebre
Copy link
Contributor Author

And the behaviour must be ?

@mimmi20
Copy link
Contributor

mimmi20 commented Mar 27, 2019

What does the behaviour of this line ?

Each parser has a file parse.sh. This is a shell script which initializes and starts the parsing of the test useragents.
$testData['path'] is the parser directory.
$testOutput contains the parsing result, which is a huge json.

@GeekZebre
Copy link
Contributor Author

It's seem that $testOutput is empty for me.

@GeekZebre
Copy link
Contributor Author

@mimmi20 I found a solution :

By example, replace
shell_exec( $testData['path'] . '/build.sh'));
by
shell_exec( 'sh '. $testData['path'] . '/build.sh'));

On windows, when we are passing 'shell_exec' a filepath, this is not interpreted as "execute the file at this path".
https://stackoverflow.com/questions/7397672/how-to-run-a-sh-file-from-php

On windows, we must add the command 'sh' before the filepath oh the sh file.

There are 2 'shell_exec' in the code + 1 in your pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants