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

ShowVer.exe does not return browser versions on Windows 10 #110

Closed
hellokatili opened this issue Jan 16, 2019 · 2 comments
Closed

ShowVer.exe does not return browser versions on Windows 10 #110

hellokatili opened this issue Jan 16, 2019 · 2 comments

Comments

@hellokatili
Copy link
Contributor

The ShowVer.exe does not return any browsers versions on Windows 10.
If you add an error logging in the exec callback you can see that the command returns a "Permission denied" error on Windows 10:

https://github.com/bitovi/launchpad/blob/master/lib/local/version.js#L21

  // Run ShowVer.exe and parse out ProductVersion key (Windows)
  if (process.platform === 'win32') {
    var command = path.join('"' + __dirname, '..', '..', 'resources', 'ShowVer.exe" "' + browser.command + '"');
    var deferred = Q.defer();

    debug('Retrieving version for windows executable', command);
    // Can't use Q.nfcall here unfortunately because of non 0 exit code
    exec(command, function(error, stdout) {
      console.log('DEBUG:', error); // <-- Added logging
      var regex = /ProductVersion:\s*(.*)/;
      // ShowVer.exe returns a non zero status code even if it works
      if (typeof stdout === 'string' && regex.test(stdout)) {
        browser.version = stdout.match(regex)[1];
        debug('Found browser version', browser.name, browser.version);
      }

      return deferred.resolve(browser);
    });

    return deferred.promise;
  }

Output:

image

I have set the environment variables LAUNCHPAD_BROWSERS and LAUNCHPAD_FIREFOX, LAUNCHPAD_CHROME, LAUNCHPAD_EDGE.

@joao-m-santos
Copy link

I'm having this issue on Windows 7 as well.
This is causing problems when using the web-components-tester (Polymer/tools#528)
As far as I understand, this happens when you set the environment variables, overriding the default paths.

Does anyone know a way to go around this error?

@bmomberger-bitovi
Copy link
Contributor

Closed via #125

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

No branches or pull requests

4 participants