Skip to content

Conversation

@benzoid
Copy link

@benzoid benzoid commented Jun 9, 2023

Hi Bob,
When trying to set
Info = {
...
console: window.console,
...
}
I got an error after launching jalviewjs:
TypeError: con.err is not a function loading file swingjs/j2s/java/lang/Class.js
TypeError: con.err is not a function
at Con.consoleOutput (file://.../site/swingjs/swingjs2.js:16966:11)
at file://.../site/swingjs/swingjs2.js:17302:33
at ...
.

It looks like it should be error(s): this PR changes it in two files.
There is a workaround of defining con.err(s) with
window.console.err = function() {
this.error.apply(this,arguments);
}
but presumably better to fix at source.
Ben

P.S. The context of this is piping the sysoutdiv output to shell STDERR of chromium running in headless mode so that we can look for specific output of JalviewJS to detect launch, or other operations:

mkdir -p /tmp/chrome/TEMP
touch "/tmp/chrome/TEMP/First Run"
chrome
--headless=new
--timeout=15000
--virtual-time-budget=15000
--user-data-dir=/tmp/chrome
--profile-directory=TEMP
--allow-file-access-from-files
--enable-logging=stderr
./site/launcher_with_window_console.html

@BobHanson
Copy link
Owner

BobHanson commented Jun 9, 2023 via email

@BobHanson BobHanson merged commit c80cb72 into BobHanson:master Nov 28, 2023
@BobHanson
Copy link
Owner

no actual change was done in this merge

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

Successfully merging this pull request may close these issues.

2 participants