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

throws an error #88

Open
idibidiart opened this issue Sep 30, 2017 · 8 comments
Open

throws an error #88

idibidiart opened this issue Sep 30, 2017 · 8 comments

Comments

@idibidiart
Copy link

TypeError: namespace.charCodeAt is not a function

Trying to run it and it gives this error with or without command line arguments

@aliry
Copy link

aliry commented Oct 16, 2017

what configuration are you using?

@idibidiart
Copy link
Author

I just run it from command line with or without parameters and it crashes instantly.

The Readme does not say anything about a configuration profile.

@axemclion
Copy link
Owner

Can you run it after setting an environment variable called export DEBUG=*

@malled
Copy link

malled commented Oct 24, 2017

Fresh install on ubuntu 16.04:

ubuntu@ubuntu-xenial:~$ browser-perf
  bp:index Selenium is on localhost +0ms
  bp:metrics Initializing Metrics +5ms
  bp:probes Registering probe PerfLogProbe +225ms
  bp:probes:AndroidTracingProbe Initialize +3ms
  bp:probes Registering probe AndroidTracingProbe +0ms
  bp:probes Registering probe PerfLogProbe +3ms
  bp:probes Registering probe AndroidTracingProbe +1ms
  bp:probes Registering probe RafBenchmarkingProbe +3ms
  bp:probes Registering probe NavTimingProbe +6ms
  bp:probes Registering probe NetworkResourcesProbe +5ms
  bp:metrics TimelineMetrics setup called +4ms
  bp:metrics ChromeTracingMetrics setup called +3ms
  bp:metrics NetworkResources setup called +2ms
  bp:probes setup +1ms
  bp:probes PerfLogProbe setup called +2ms
  bp:probes AndroidTracingProbe setup called +2ms
  bp:probes NetworkResourcesProbe setup called +1ms
  bp:index Stating browser with {"browserName":"chrome","version":35,"chromeOptions":{"perfLoggingPrefs":{"traceCategories":",blink.console,devtools.timeline,disabled-by-default-devtools.timeline,to

plevel,disabled-by-default-devtools.timeline.frame,benchmark"},"args":["--enable-gpu-benchmarking","--enable-thread-composting"]},"loggingPrefs":{"performance":"ALL"}} +2ms
  bp:selenium CALL init({"browserName":"chrome","version":35,"chromeOptions":{"perfLoggin  +3ms
  bp:selenium CALL quit()  +71ms
/usr/lib/node_modules/browser-perf/node_modules/q/q.js:155
                throw e;
                ^

TypeError: namespace.charCodeAt is not a function
    at selectColor (/usr/lib/node_modules/browser-perf/node_modules/debug/src/debug.js:48:46)
    at createDebug (/usr/lib/node_modules/browser-perf/node_modules/debug/src/debug.js:120:17)
    at require.browsers (/usr/lib/node_modules/browser-perf/lib/cli.js:37:3)
    at /usr/lib/node_modules/browser-perf/lib/index.js:31:3
    at _fulfilled (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:816:13)
    at /usr/lib/node_modules/browser-perf/node_modules/q/q.js:624:44
    at runSingle (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:137:13)
    at flush (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:125:13)

error seems to derive from debug package.
dirty quick fix: disable debug output

@stephenwil
Copy link

How do you disable debug output? Getting the same error, and it's now 2019 :-)

@malled
Copy link

malled commented Feb 4, 2019

I've stopped using it, either because it didn't fulfill my needs or I couldn't get it running, cannot remember ;). But you could try to update the debug package through npm or edit it's code directly

@matclab
Copy link

matclab commented Jun 25, 2020

I got the same error here:

browser-perf -v http://localhost:8001/bigjson.html --browsers=firefox --selenium=localhost:4444/wd/hub
  bp:index Selenium is on localhost +0ms
  bp:metrics Initializing Metrics +1ms
  bp:probes Registering probe PerfLogProbe +80ms
  bp:probes:AndroidTracingProbe Initialize +1ms
  bp:probes Registering probe AndroidTracingProbe +0ms
  bp:probes Registering probe PerfLogProbe +2ms
  bp:probes Registering probe AndroidTracingProbe +0ms
  bp:probes Registering probe RafBenchmarkingProbe +1ms
  bp:probes Registering probe NavTimingProbe +1ms
  bp:probes Registering probe NetworkResourcesProbe +1ms
  bp:metrics TimelineMetrics setup called +0ms
  bp:metrics ChromeTracingMetrics setup called +0ms
  bp:metrics NetworkResources setup called +1ms
  bp:probes setup +0ms
  bp:probes PerfLogProbe setup called +0ms
  bp:probes AndroidTracingProbe setup called +0ms
  bp:probes NetworkResourcesProbe setup called +0ms
  bp:index Stating browser with {"browserName":"firefox","chromeOptions":{"perfLoggingPrefs":{}},"loggingPrefs":{"performance":"ALL"}} +1ms
  bp:selenium CALL init({"browserName":"firefox","chromeOptions":{"perfLoggingPrefs":{}},  +0ms
  bp:selenium RESPONSE init({"browserName":"firefox","chromeOptions":{"perfLoggingPrefs":{}}, "72e24769-6779-442a-aaa4-0261c9c56276",{"acceptInsecureCerts":false,"b +3s
  bp:index Session is 72e24769-6779-442a-aaa4-0261c9c56276 +4ms
  bp:index Running Prescript +1ms
  bp:selenium CALL get("http://localhost:8001/bigjson.html")  +0ms
  bp:selenium RESPONSE get("http://localhost:8001/bigjson.html")  +9s
  bp:probes start +1ms
  bp:probes PerfLogProbe start called +0ms
  bp:selenium CALL logTypes()  +0ms
  bp:selenium CALL quit()  +13ms
  bp:selenium RESPONSE quit()  +1s
/usr/lib/node_modules/browser-perf/node_modules/q/q.js:155
                throw e;
                ^

TypeError: namespace.charCodeAt is not a function
    at selectColor (/usr/lib/node_modules/browser-perf/node_modules/debug/src/debug.js:48:46)
    at createDebug (/usr/lib/node_modules/browser-perf/node_modules/debug/src/debug.js:120:17)
    at require.browsers (/usr/lib/node_modules/browser-perf/lib/cli.js:37:3)
    at /usr/lib/node_modules/browser-perf/lib/index.js:31:3
    at _fulfilled (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:854:54)
    at /usr/lib/node_modules/browser-perf/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:816:13)
    at /usr/lib/node_modules/browser-perf/node_modules/q/q.js:624:44
    at runSingle (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:137:13)
    at flush (/usr/lib/node_modules/browser-perf/node_modules/q/q.js:125:13)

And selenium standalone server log is :

11:07:47.778 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
11:07:47.853 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2020-06-25 11:07:47.899:INFO::main: Logging initialized @296ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:07:48.097 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
11:07:48.186 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
11:07:52.802 INFO [ActiveSessionFactory.apply] - Capabilities are: {
  "browserName": "firefox",
  "chromeOptions": {
    "perfLoggingPrefs": {
    }
  },
  "javascriptEnabled": true,
  "loggingPrefs": {
    "performance": "ALL"
  },
  "version": ""
}
11:07:52.804 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 83.0.4103.97 (326d148b9655369b86498d9ecca39f63dd2bdd2d-refs/branch-heads/4103@{#657}) on port 23774
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
11:07:53.088 INFO [ServicedSession$Factory.apply] - invalid argument: entry 0 of 'firstMatch' is invalid
from invalid argument: perfLoggingPrefs specified, but performance logging was not enabled
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'loriot', ip: '192.168.0.161', os.name: 'Linux', os.arch: 'amd64', os.version: '5.6.15-arch1-1', java.version: '1.8.0_252'
Driver info: driver.version: unknown
remote stacktrace: #0 0x55a5572b459a <unknown>

org.openqa.selenium.InvalidArgumentException: invalid argument: entry 0 of 'firstMatch' is invalid
from invalid argument: perfLoggingPrefs specified, but performance logging was not enabled
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'loriot', ip: '192.168.0.161', os.name: 'Linux', os.arch: 'amd64', os.version: '5.6.15-arch1-1', java.version: '1.8.0_252'
Driver info: driver.version: unknown
remote stacktrace: #0 0x55a5572b459a <unknown>

	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
	at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
	at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
	at org.openqa.selenium.grid.session.remote.RemoteSession$Factory.performHandshake(RemoteSession.java:147)
	at org.openqa.selenium.grid.session.remote.ServicedSession$Factory.apply(ServicedSession.java:161)
	at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:180)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:440)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
	at org.openqa.selenium.remote.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:183)
	at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:66)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.Collections$2.tryAdvance(Collections.java:4719)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
	at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:69)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Streams.java:405)
	at java.util.stream.Streams$ConcatSpliterator.tryAdvance(Streams.java:728)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
	at org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:72)
	at org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65)
	at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:235)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
11:07:53.102 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
1593076075689	Marionette	INFO	Listening on port 35259
11:07:55.826 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
11:07:55.865 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session 9b7c3c79-9f08-44b5-9241-12e6f2240336 (org.openqa.selenium.firefox.GeckoDriverService)
1593076085988	Marionette	INFO	Stopped listening on port 35259
11:08:07.423 INFO [ActiveSessions$1.onStop] - Removing session 9b7c3c79-9f08-44b5-9241-12e6f2240336 (org.openqa.selenium.firefox.GeckoDriverService)

with browser-perf 1.4.11, firefox 77.0.1 and selenium-server-standalone 3.141.59

@matclab
Copy link

matclab commented Jun 25, 2020

I imagine performance logging was not enabled in selenium may be the root cause.

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

6 participants