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

selenium-webdriver build fails with iojs 3.0.0 but ok with 2.5.0 or with nodejs 0.12.7. #2337

Closed
Dzenly opened this issue Aug 9, 2015 · 6 comments

Comments

@Dzenly
Copy link
Contributor

Dzenly commented Aug 9, 2015

npm i selenium-webdriver
fails with iojs 3.0.0.
Is this by design?
Just in case: I built it on Windows7 x64 with 32-bit iojs.
32-bit iojs 2.5.0 and 32-bit nodejs 0.12.7 are both ok.
Below just fragment of build log.

node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)' : function template has already been defined [node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
          node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(256) : see declaration of '_NanEnsureLocal'
node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(661): error C2039: 'FreeCallback' : is not a member of 'node' [node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(661): error C2061: syntax error : identifier 'FreeCallback' [node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(665): error C2065: 'callback' : undeclared identifier [node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(665): error C2065: 'hint' : undeclared identifier [node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(672): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types [node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
          C:\Users\Alexey\.node-gyp\3.0.0\include\node\node_buffer.h(47): could be 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,char *,size_t)'
          C:\Users\Alexey\.node-gyp\3.0.0\include\node\node_buffer.h(35): or       'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)'
          while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\node_modules\nan\nan.h(676): error C2664: 'v8::Local<v8::Object>::Local(const v8::Local<v8::Object> &)' : cannot convert argument 1 from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' [node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
          Reason: cannot convert from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object>'
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
@r-52
Copy link
Contributor

r-52 commented Aug 9, 2015

The problem is in utf-8-validate, which is a dependency of ws and ws is a dependency of selenium. utf-8-validate is a C++ node addon built with NaN 1.8.x. The v8 version of io.js 3.0 brought some breaking C++ API changes that result in the errors.

@mscdex
Copy link
Contributor

mscdex commented Aug 9, 2015

The problem is that both utf-8-validate and bufferutil are using older versions of nan for compatibility. I've submitted PRs here and here.

@Fishrock123
Copy link
Contributor

Can we just make building outdated native modules show warnings that they are outdated somehow?

@bnoordhuis
Copy link
Member

There is no good, non-hacky way to determine what API version an add-on is written for.

I'm going to close the issue; it's not an issue with io.js itself and there isn't really anything actionable.

@Fishrock123
Copy link
Contributor

There is no good, non-hacky way to determine what API version an add-on is written for.

Even for NAN-based Addons?

@bnoordhuis
Copy link
Member

You could hack a blacklist or whitelist into npm or node-gyp but I estimate the chances of getting that accepted upstream are slim.

If I were a npm or node-gyp maintainer, I'd reject it because it would be a constant maintenance hassle; unless you baked the whitelist into io.js itself, but that would make it even ickier IMO.

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

5 participants