Tools: DeprecationWarning after update.

Created on 26 Oct 2016  路  14Comments  路  Source: Polymer/tools

Hey,

I just updated the wct and now I get the following 2 warnings:

(node:12269) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Starting Selenium server for local browsers
Selenium server running on port 61159
Web server running on port 2000 and serving from /Users/lukasoppermann/Code/material-input
(node:12269) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()`

It also says chrome failed to maximize and firefox failed to maximize. However the tests all show up as passed.

Is there any more info I can provide to help?

web-component-tester wontfix

Most helpful comment

Did anyone manage to fix this bug?

All 14 comments

@FredKSchott
I see the same problem reported by @lukasoppermann.
I am running WCT 5.

Hmm, I can't reproduce on my machine. Can either of you try running in another repo to make sure this isn't a problem with the project you're running it in?

If it is happening across projects, can you share steps that I could run to reproduce from an empty directory?

@FredKSchott I am getting the same issue, I can reproduce with latest stable polymer-cli and wct like so:

$ polymer init
 -> select starter-kit
$ wct

I'm running macOS 10.12.1 and chrome 56.0.2908.0 canary (64-bit)

Okay, here are the steps:

mkdir test && cd test
npm i -D @webcomponents/custom-elements github:webcomponents/shadycss github:webcomponents/shadydom web-component-tester

Now when you run the wct you shold get the error

./node_modules/.bin/wct

The same happens with my global installation. I have [email protected] globally & locally.

@lukasoppermann @darrenhewett thanks for the easy to follow steps. I'm now seeing chrome failed to maximize but no deprecation warnings. Tests are still passing/failing correctly.

I'll try to take a look at the failure to maximize issue later today.

/cc @rictic

Seeing the same behavior with the seed-element project, while following along with polycast 36 on unit-testing.

'chrome failed to maximize' and 'firefox failed to maximize', then all tests pass. (It happens that safari fails much more spectacularly, but that's tracked in a separate issue.)

My environment:

  • OS X 10.11.6
  • Java 8u111 (Oracle, NOT OpenJDK)
  • node 6.6
  • wct 5

I am getting same error and even worse thing is safari 10 could not launch. Here is my error report. I am using latest safari driver 2.48 from Apple. I run simple web-driver google open page works fine with this. I think it is problem with wct.

$ wct
(node:5653) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Installing and starting Selenium server for local browsers
Selenium server running on port 51523
Web server running on port 2000 and serving from /Users/kk/polymer-testing/seed-element
(node:5653) DeprecationWarning: Using Buffer without new will soon stop working. Use new Buffer(), or preferably Buffer.from(), Buffer.allocUnsafe() or Buffer.alloc() instead.
chrome 54 Beginning tests via http://localhost:2000/components/seed-element/generated-index.html?cli_browser_id=0
chrome 54 Tests passed
firefox 45 Beginning tests via http://localhost:2000/components/seed-element/generated-index.html?cli_browser_id=1
firefox 45 Tests passed
chrome failed to maximize
firefox failed to maximize
Connection refused (Connection refused)
safari 10.0 Tests failed: {"state":"unknown error","sessionId":null,"hCode":1790560929,"value":{"localizedMessage":"Connection refused (Connection refused)","cause":null,"stackTrace":[{"fileName":"PlainSocketImpl.java","nativeMethod":true,"methodName":"socketConnect","className":"java.net.PlainSocketImpl","hCode":1566792002,"lineNumber":-2,"class":"java.lang.StackTraceElement"},{"fileName":"AbstractPlainSocketImpl.java","nativeMethod":false,"meth

My test environment is OS X 10.12, node 7.0

Did anyone manage to fix this bug?

Did anyone manage to fix this bug?

Sorry, we're still unable to reproduce this warning. I just tried the following:

$ nvm install v6.6.0
$ npm install -g web-component-tester
$ cd paper-checkbox
$ wct

And didn't see any warning about os.tmpDir. Full output in this gist: https://gist.github.com/rictic/11af399ea1777e0a6b3947e1ebf08a7b

I see three warnings: failure to maximize, deprecated minimatch, and deprecated node-uuid. The minimatch warning is fixed in master, the node-uuid warning is tracked by https://github.com/Polymer/wct-local/issues/54 and the failure to maximize warning requires further investigation.

One thing to look for in trying to reproduce this error is to verify that you don't have a local install of wct in your project, as wct will defer to any local versions even if you run it from the global install. So double check that there's not an old install of it at e.g. ./node_modules/web-component-tester

I get the exact same error when using your step and the paper-checkbox directory. The only difference is, I am on node v7.5.0. Could that be the issue?

@lukasoppermann Ah, that explains it. I can repro the tmpDir warning with node v7.5.0, looks like that api is deprecated starting in node v7.

grepping around a bit, it looks like we need to update wd to fix it.

Are you still seeing the warning about needing to use new with Buffer?

@rictic no, only the tmpDir one:

(node:50804) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Installing and starting Selenium server for local browsers
Selenium server running on port 59308
Web server running on port 2000 and serving from /Users/lukasoppermann/Code/page-sections
chrome 56                Beginning tests via http://localhost:2000/components/page-sections/generated-index.html?cli_browser_id=0
chrome failed to maximize
chrome 56                Tests passed
firefox 51               Beginning tests via http://localhost:2000/components/page-sections/generated-index.html?cli_browser_id=1
firefox failed to maximize
firefox 51               Tests passed
Test run ended with great success

chrome 56 (8/0/0)                       firefox 51 (8/0/0)

Good that you have an idea on how to fix it. 馃憤

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manolo picture manolo  路  4Comments

ronnyroeller picture ronnyroeller  路  4Comments

priyabrat1801 picture priyabrat1801  路  3Comments

stramel picture stramel  路  4Comments

Westbrook picture Westbrook  路  4Comments