You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(30) |
Sep
(15) |
Oct
(26) |
Nov
(12) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(7) |
Feb
(27) |
Mar
(73) |
Apr
(17) |
May
(17) |
Jun
(78) |
Jul
(67) |
Aug
(60) |
Sep
(89) |
Oct
(140) |
Nov
(173) |
Dec
(46) |
2004 |
Jan
(39) |
Feb
(7) |
Mar
(21) |
Apr
(31) |
May
(13) |
Jun
(86) |
Jul
(14) |
Aug
(14) |
Sep
(53) |
Oct
(184) |
Nov
(186) |
Dec
(319) |
2005 |
Jan
(336) |
Feb
(274) |
Mar
(226) |
Apr
(102) |
May
(196) |
Jun
(130) |
Jul
(119) |
Aug
(143) |
Sep
(76) |
Oct
(85) |
Nov
(70) |
Dec
(159) |
2006 |
Jan
(125) |
Feb
(100) |
Mar
(80) |
Apr
(39) |
May
(55) |
Jun
(58) |
Jul
(50) |
Aug
(76) |
Sep
(55) |
Oct
(101) |
Nov
(163) |
Dec
(85) |
2007 |
Jan
(56) |
Feb
(53) |
Mar
(180) |
Apr
(221) |
May
(290) |
Jun
(199) |
Jul
(322) |
Aug
(515) |
Sep
(121) |
Oct
(297) |
Nov
(177) |
Dec
(103) |
2008 |
Jan
(516) |
Feb
(315) |
Mar
(586) |
Apr
(615) |
May
(197) |
Jun
(381) |
Jul
(390) |
Aug
(195) |
Sep
(603) |
Oct
(499) |
Nov
(622) |
Dec
(350) |
2009 |
Jan
(313) |
Feb
(338) |
Mar
(507) |
Apr
(317) |
May
(197) |
Jun
(375) |
Jul
(235) |
Aug
(424) |
Sep
(410) |
Oct
(338) |
Nov
(286) |
Dec
(306) |
2010 |
Jan
(367) |
Feb
(339) |
Mar
(371) |
Apr
(172) |
May
(233) |
Jun
(264) |
Jul
(421) |
Aug
(110) |
Sep
(218) |
Oct
(189) |
Nov
(185) |
Dec
(168) |
2011 |
Jan
(145) |
Feb
(213) |
Mar
(205) |
Apr
(64) |
May
(159) |
Jun
(67) |
Jul
(104) |
Aug
(126) |
Sep
(144) |
Oct
(106) |
Nov
(154) |
Dec
(225) |
2012 |
Jan
(111) |
Feb
(87) |
Mar
(131) |
Apr
(102) |
May
(180) |
Jun
(160) |
Jul
(412) |
Aug
(315) |
Sep
(311) |
Oct
(369) |
Nov
(464) |
Dec
(284) |
2013 |
Jan
(343) |
Feb
(165) |
Mar
(174) |
Apr
(120) |
May
(153) |
Jun
(134) |
Jul
(202) |
Aug
(105) |
Sep
(228) |
Oct
(332) |
Nov
(192) |
Dec
(219) |
2014 |
Jan
(348) |
Feb
(194) |
Mar
(189) |
Apr
(188) |
May
(297) |
Jun
(206) |
Jul
(79) |
Aug
(279) |
Sep
(111) |
Oct
(159) |
Nov
(61) |
Dec
(78) |
2015 |
Jan
(152) |
Feb
(145) |
Mar
(239) |
Apr
(223) |
May
(248) |
Jun
(296) |
Jul
(172) |
Aug
(189) |
Sep
(338) |
Oct
(217) |
Nov
(131) |
Dec
(184) |
2016 |
Jan
(118) |
Feb
(221) |
Mar
(414) |
Apr
(412) |
May
(303) |
Jun
(133) |
Jul
(129) |
Aug
(121) |
Sep
(136) |
Oct
(67) |
Nov
(89) |
Dec
(245) |
2017 |
Jan
(349) |
Feb
(90) |
Mar
(328) |
Apr
(430) |
May
(284) |
Jun
(199) |
Jul
(164) |
Aug
(120) |
Sep
(57) |
Oct
(105) |
Nov
(108) |
Dec
(146) |
2018 |
Jan
(85) |
Feb
(48) |
Mar
(97) |
Apr
(62) |
May
(64) |
Jun
(136) |
Jul
(123) |
Aug
(87) |
Sep
(17) |
Oct
(27) |
Nov
(9) |
Dec
(16) |
2019 |
Jan
(9) |
Feb
(17) |
Mar
(18) |
Apr
(14) |
May
(8) |
Jun
|
Jul
(6) |
Aug
(12) |
Sep
(5) |
Oct
|
Nov
(2) |
Dec
|
2020 |
Jan
(8) |
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
(4) |
Oct
(1) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(4) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2023 |
Jan
|
Feb
(6) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: RBRi <rb...@us...> - 2024-05-14 11:46:30
|
- **status**: accepted --> closed --- **[bugs:#1956] java.lang.StackOverflowError when div.style.length = 100** **Status:** closed **Group:** Latest SVN **Created:** Mon Mar 12, 2018 04:04 AM UTC by Atsushi Nakagawa **Last Updated:** Tue May 14, 2024 11:46 AM UTC **Owner:** RBRi This bug report encompasses three problems caused by the same root cause. I'll first outline the problems, then go over what I think is the cause, and then offer my suggested fix. ## Problems * Setting `length` field of `CSSStyleDeclaration` in *non-strict mode* causes `java.lang.StackOverflowError`. * Setting the `size` field of a `Map` should not be allowed but is possible in HtmlUnit in *non-strict mode*. * Setting the `length` field of `javascript.host.dom.AbstractList` should not be allowed, but is possible in HtmlUnit, in both *strict mode* and *non-strict mode*. ## Test case This test is for demonstrating the behaviour in both conventional browsers and HtmlUnit. ```html <!DOCTYPE html> <html> <head> <script> function check(tn, func) { try { console.log(tn + ':', func()) } catch (e) { console.log(tn + ':', e.message) } } function test() { check('t1', function () { 'use strict'; var x = document.body.style; x.length = 100; return x.length }) check('t2', function () { var x = document.body.style; x.length = 100; return x.length }) check('t3', function () { 'use strict'; var x = new Map(); x.size = 100; return x.size }) check('t4', function () { var x = new Map(); x.size = 100; return x.size }) check('t5', function () { 'use strict'; var x = document.children; x.length = 100; return x.length }) check('t6', function () { var x = document.children; x.length = 100; return x.length }) } </script> </head> <body> <input type="button" onclick="test()" value="test"/> </body> </html> ``` ### Result in browsers #### Chrome: ```text t1: Cannot assign to read only property 'length' of object '#<CSSStyleDeclaration>' t2: 0 t3: Cannot set property size of #<Map> which has only a getter t4: 0 t5: Cannot assign to read only property 'length' of object '#<HTMLCollection>' t6: 1 ``` #### Firefox: Odd lines differ as follows: ```text t1: setting getter-only property "length" t3: setting getter-only property "size" t5: setting getter-only property "length" ``` #### Edge: Odd lines differ as follows: ```text t1: Assignment to read-only properties is not allowed in strict mode t3: Assignment to read-only properties is not allowed in strict mode t5: Assignment to read-only properties is not allowed in strict mode ``` ### Result in HtmlUnit ```text t1: Cannot set property [CSSStyleDeclaration].length that has only a getter to 100. t3: Cannot set property [Map].size that has only a getter to 100. t4: 100.0 t5. 100.0 t6. 100.0 ``` `t2` doesn't complete but instead throws `java.lang.StackOverflowException`. ## Possible cause 1) The problem appears to be caused foremost by HtmlUnit's rhino fork [attempting to `setValue()` in a `ScriptableObject$GetterSlot` that has no setter](https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L271). As to *why* it's doing that, I think it's partially caused by a regression in [this commit](https://github.com/HtmlUnit/htmlunit-rhino-fork/commit/d01bf85dd0149d73e6c057d1c64c0fa2b780daae). This commit message says *"Remove unused parameters"* but it appears to be removing it in the logically opposite manner for the three parameters `FEATURE_HTMLUNIT_ASK_OBJECT_TO_WRITE_READONLY`, `FEATURE_HTMLUNIT_FUNCTION_NULL_SETTER` and `FEATURE_HTMLUNIT_EVAL_LOCAL_SCOPE`. For example, the literal value of `FEATURE_HTMLUNIT_ASK_OBJECT_TO_WRITE_READONLY` was `false`. So logically, "`if (FEATURE_HTMLUNIT_ASK_OBJECT_TO_WRITE_READONLY) { ... } else { ... }`" blocks should leave the "`else`" part. The commit however leaves "`if`" part. 2) A follow up problem is that just reverting commit won't suffice as the previous code throws `TypeError` even in *non-strict mode*. Judging from [surround code](https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L2736), it should just `return true` in *non-strict mode*. 3) Lastly, a problem that will still break t5 and t6 is this line in [`AbstractList.has(String, Scriptable)`](https://sourceforge.net/p/htmlunit/code/15163/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AbstractList.java#l468) which makes HtmlUnit look for the `length` field in the *object* instance even though it should be looking at the *prototype* instance. This simple test in Chrone / FF / Edge shows there is no `"length"` field on the object for `document.children` but there is on `__proto__`. ```text > Object.getOwnPropertyDescriptor(document.children, 'length') < undefined > Object.getOwnPropertyDescriptor(document.children.__proto__, 'length') < {get: ƒ, set: undefined, enumerable: true, configurable: true} ``` ## Suggested fix These are the fixes we're using locally. #### Fix for `GetterSlot.setValue(Object value, Scriptable owner, Scriptable start)`. This change to [`ScriptableObject$GetterSlot.setValue()`](https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L260) puts it more in line with [`ScriptableObject$Slot.setValue()`]( https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L180). ```diff @@ -286,32 +286,14 @@ ScriptableObject getPropertyDescriptor(Context cx, Scriptable scope) { @Override boolean setValue(Object value, Scriptable owner, Scriptable start) { if (setter == null) { if (getter != null) { Context cx = Context.getContext(); - if (cx.isStrictMode() || - // Based on TC39 ES3.1 Draft of 9-Feb-2009, 8.12.4, step 2, - // we should throw a TypeError in this case. - cx.hasFeature(Context.FEATURE_STRICT_MODE)) { - + if (cx.isStrictMode()) { throw ScriptRuntime.typeError3("msg.set.prop.no.setter", name, start.getClassName(), Context.toString(value)); } - Scriptable scriptable = start; - - if (scriptable instanceof Delegator) { - scriptable = ((Delegator) scriptable).getDelegee(); - } - - if (scriptable instanceof ScriptableObject) { - boolean allowSetting = ((ScriptableObject) scriptable).isReadOnlySettable(name, value); - if (!allowSetting) { - return true; - } - } - if (owner == start) { - getter = null; - } + return true; } } else { Context cx = Context.getContext(); if (setter instanceof MemberBox) { MemberBox nativeSetter = (MemberBox)setter; ``` This change obseletes [`ScriptableObject.isReadOnlySettable()`](https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L3288), [`SimpleScriptable.isReadOnlySettable()`](https://sourceforge.net/p/htmlunit/code/15163/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java#l392) and the annotation [`CanSetReadOnly`](https://sourceforge.net/p/htmlunit/code/15163/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/CanSetReadOnly.java) as they become unused code. They might be salvagable but `isReadOnlySettable()`'s default return value is `true` which isn't easy to work with, and I don't know the use case. #### Extra fix for `AbstractList.has(final String name, final Scriptable start)`. This is the extra fix to [`AbstractList.has(final String name, final Scriptable start)`](https://sourceforge.net/p/htmlunit/code/15163/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AbstractList.java#l455) is needed for t5 and t6. ```diff @@ -457,13 +457,10 @@ public boolean has(final String name, final Scriptable start) { } catch (final NumberFormatException e) { // Ignore. } - if ("length".equals(name)) { - return true; - } final BrowserVersion browserVersion = getBrowserVersion(); if (browserVersion.hasFeature(JS_NODE_LIST_ENUMERATE_FUNCTIONS)) { final JavaScriptConfiguration jsConfig = getWindow().getWebWindow().getWebClient() .getJavaScriptEngine().getJavaScriptConfiguration(); if (jsConfig.getClassConfiguration(getClassName()).getFunctionKeys().contains(name)) { ``` --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2024-05-14 11:46:27
|
see https://github.com/HtmlUnit/htmlunit/issues/787 --- **[bugs:#1956] java.lang.StackOverflowError when div.style.length = 100** **Status:** accepted **Group:** Latest SVN **Created:** Mon Mar 12, 2018 04:04 AM UTC by Atsushi Nakagawa **Last Updated:** Sat Jun 30, 2018 12:51 PM UTC **Owner:** RBRi This bug report encompasses three problems caused by the same root cause. I'll first outline the problems, then go over what I think is the cause, and then offer my suggested fix. ## Problems * Setting `length` field of `CSSStyleDeclaration` in *non-strict mode* causes `java.lang.StackOverflowError`. * Setting the `size` field of a `Map` should not be allowed but is possible in HtmlUnit in *non-strict mode*. * Setting the `length` field of `javascript.host.dom.AbstractList` should not be allowed, but is possible in HtmlUnit, in both *strict mode* and *non-strict mode*. ## Test case This test is for demonstrating the behaviour in both conventional browsers and HtmlUnit. ```html <!DOCTYPE html> <html> <head> <script> function check(tn, func) { try { console.log(tn + ':', func()) } catch (e) { console.log(tn + ':', e.message) } } function test() { check('t1', function () { 'use strict'; var x = document.body.style; x.length = 100; return x.length }) check('t2', function () { var x = document.body.style; x.length = 100; return x.length }) check('t3', function () { 'use strict'; var x = new Map(); x.size = 100; return x.size }) check('t4', function () { var x = new Map(); x.size = 100; return x.size }) check('t5', function () { 'use strict'; var x = document.children; x.length = 100; return x.length }) check('t6', function () { var x = document.children; x.length = 100; return x.length }) } </script> </head> <body> <input type="button" onclick="test()" value="test"/> </body> </html> ``` ### Result in browsers #### Chrome: ```text t1: Cannot assign to read only property 'length' of object '#<CSSStyleDeclaration>' t2: 0 t3: Cannot set property size of #<Map> which has only a getter t4: 0 t5: Cannot assign to read only property 'length' of object '#<HTMLCollection>' t6: 1 ``` #### Firefox: Odd lines differ as follows: ```text t1: setting getter-only property "length" t3: setting getter-only property "size" t5: setting getter-only property "length" ``` #### Edge: Odd lines differ as follows: ```text t1: Assignment to read-only properties is not allowed in strict mode t3: Assignment to read-only properties is not allowed in strict mode t5: Assignment to read-only properties is not allowed in strict mode ``` ### Result in HtmlUnit ```text t1: Cannot set property [CSSStyleDeclaration].length that has only a getter to 100. t3: Cannot set property [Map].size that has only a getter to 100. t4: 100.0 t5. 100.0 t6. 100.0 ``` `t2` doesn't complete but instead throws `java.lang.StackOverflowException`. ## Possible cause 1) The problem appears to be caused foremost by HtmlUnit's rhino fork [attempting to `setValue()` in a `ScriptableObject$GetterSlot` that has no setter](https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L271). As to *why* it's doing that, I think it's partially caused by a regression in [this commit](https://github.com/HtmlUnit/htmlunit-rhino-fork/commit/d01bf85dd0149d73e6c057d1c64c0fa2b780daae). This commit message says *"Remove unused parameters"* but it appears to be removing it in the logically opposite manner for the three parameters `FEATURE_HTMLUNIT_ASK_OBJECT_TO_WRITE_READONLY`, `FEATURE_HTMLUNIT_FUNCTION_NULL_SETTER` and `FEATURE_HTMLUNIT_EVAL_LOCAL_SCOPE`. For example, the literal value of `FEATURE_HTMLUNIT_ASK_OBJECT_TO_WRITE_READONLY` was `false`. So logically, "`if (FEATURE_HTMLUNIT_ASK_OBJECT_TO_WRITE_READONLY) { ... } else { ... }`" blocks should leave the "`else`" part. The commit however leaves "`if`" part. 2) A follow up problem is that just reverting commit won't suffice as the previous code throws `TypeError` even in *non-strict mode*. Judging from [surround code](https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L2736), it should just `return true` in *non-strict mode*. 3) Lastly, a problem that will still break t5 and t6 is this line in [`AbstractList.has(String, Scriptable)`](https://sourceforge.net/p/htmlunit/code/15163/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AbstractList.java#l468) which makes HtmlUnit look for the `length` field in the *object* instance even though it should be looking at the *prototype* instance. This simple test in Chrone / FF / Edge shows there is no `"length"` field on the object for `document.children` but there is on `__proto__`. ```text > Object.getOwnPropertyDescriptor(document.children, 'length') < undefined > Object.getOwnPropertyDescriptor(document.children.__proto__, 'length') < {get: ƒ, set: undefined, enumerable: true, configurable: true} ``` ## Suggested fix These are the fixes we're using locally. #### Fix for `GetterSlot.setValue(Object value, Scriptable owner, Scriptable start)`. This change to [`ScriptableObject$GetterSlot.setValue()`](https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L260) puts it more in line with [`ScriptableObject$Slot.setValue()`]( https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L180). ```diff @@ -286,32 +286,14 @@ ScriptableObject getPropertyDescriptor(Context cx, Scriptable scope) { @Override boolean setValue(Object value, Scriptable owner, Scriptable start) { if (setter == null) { if (getter != null) { Context cx = Context.getContext(); - if (cx.isStrictMode() || - // Based on TC39 ES3.1 Draft of 9-Feb-2009, 8.12.4, step 2, - // we should throw a TypeError in this case. - cx.hasFeature(Context.FEATURE_STRICT_MODE)) { - + if (cx.isStrictMode()) { throw ScriptRuntime.typeError3("msg.set.prop.no.setter", name, start.getClassName(), Context.toString(value)); } - Scriptable scriptable = start; - - if (scriptable instanceof Delegator) { - scriptable = ((Delegator) scriptable).getDelegee(); - } - - if (scriptable instanceof ScriptableObject) { - boolean allowSetting = ((ScriptableObject) scriptable).isReadOnlySettable(name, value); - if (!allowSetting) { - return true; - } - } - if (owner == start) { - getter = null; - } + return true; } } else { Context cx = Context.getContext(); if (setter instanceof MemberBox) { MemberBox nativeSetter = (MemberBox)setter; ``` This change obseletes [`ScriptableObject.isReadOnlySettable()`](https://github.com/HtmlUnit/htmlunit-rhino-fork/blob/f41c211235de141394bff2ca1bf9ee02dfc3e58f/src/org/mozilla/javascript/ScriptableObject.java#L3288), [`SimpleScriptable.isReadOnlySettable()`](https://sourceforge.net/p/htmlunit/code/15163/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java#l392) and the annotation [`CanSetReadOnly`](https://sourceforge.net/p/htmlunit/code/15163/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/CanSetReadOnly.java) as they become unused code. They might be salvagable but `isReadOnlySettable()`'s default return value is `true` which isn't easy to work with, and I don't know the use case. #### Extra fix for `AbstractList.has(final String name, final Scriptable start)`. This is the extra fix to [`AbstractList.has(final String name, final Scriptable start)`](https://sourceforge.net/p/htmlunit/code/15163/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AbstractList.java#l455) is needed for t5 and t6. ```diff @@ -457,13 +457,10 @@ public boolean has(final String name, final Scriptable start) { } catch (final NumberFormatException e) { // Ignore. } - if ("length".equals(name)) { - return true; - } final BrowserVersion browserVersion = getBrowserVersion(); if (browserVersion.hasFeature(JS_NODE_LIST_ENUMERATE_FUNCTIONS)) { final JavaScriptConfiguration jsConfig = getWindow().getWebWindow().getWebClient() .getJavaScriptEngine().getJavaScriptConfiguration(); if (jsConfig.getClassConfiguration(getClassName()).getFunctionKeys().contains(name)) { ``` --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-25 14:12:02
|
- **status**: open --> closed - **assigned_to**: RBRi - **Comment**: was fixed in rhino and part of 2.68.0 --- ** [bugs:#1974] JavaScriptException. Error: In this configuration Angular requires Zone.js** **Status:** closed **Group:** 2.31 **Labels:** angular javascript zonejs polyfill **Created:** Thu Jul 12, 2018 07:33 PM UTC by Omega **Last Updated:** Fri Oct 19, 2018 08:01 AM UTC **Owner:** RBRi We are getting JavaScript exceptions when testing an Angular website built with webpack: ~~~ com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot modify readonly property: constructor. (https://login.company.com:443/discovery/polyfills.js#1) ~~~ The first exception we see in the stack trace is Zone.js not being loaded (we load it using polyfill): ~~~ Exception class=[net.sourceforge.htmlunit.corejs.javascript.JavaScriptException] com.gargoylesoftware.htmlunit.ScriptException: Error: In this configuration Angular requires Zone.js (https://login.company.com:443/js/main.js#1) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:918) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:532) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:798) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:774) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:108) [...] Caused by: net.sourceforge.htmlunit.corejs.javascript.JavaScriptException: Error: In this configuration Angular requires Zone.js (https://login.company.com:443/js/main.js#1) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1119) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:911) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:111) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:422) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:331) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3570) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:122) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:789) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:903) ... 34 more JavaScriptException value = Error: In this configuration Angular requires Zone.js ~~~ Here's the Zone.js stacktrace: ~~~ SEVERE: runtimeError: message=[Property 0 not found.] sourceName=[https://login.company.com:443/discovery/polyfills.js] line=[1] lineSource=[null] lineOffset=[0] Jul 12, 2018 1:20:24 PM com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine handleJavaScriptException INFO: Caught script exception ======= EXCEPTION START ======== EcmaError: lineNumber=[1] column=[0] lineSource=[<no source>] name=[TypeError] sourceName=[https://login.company.com:443/discovery/polyfills.js] message=[TypeError: Cannot modify readonly property: constructor. (https://login.company.com:443/discovery/polyfills.js#1)] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot modify readonly property: constructor. (https://login.company.com:443/discovery/polyfills.js#1) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:918) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:532) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:798) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:774) [...] Enclosed exception: net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot modify readonly property: constructor. (https://login.company.com:443/discovery/polyfills.js#1) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4276) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4254) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:4287) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError1(ScriptRuntime.java:4299) at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject$Slot.setValue(ScriptableObject.java:183) at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.putImpl(ScriptableObject.java:2865) at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.put(ScriptableObject.java:531) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitScriptable.put(HtmlUnitScriptable.java:151) at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.putProperty(ScriptableObject.java:2543) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1742) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1736) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1351) at script(https://login.company.com:443/discovery/polyfills.js:1) at script(https://login.company.com:443/discovery/polyfills.js:1) at script.i(https://login.company.com:443/discovery/runtime.js:1) at script(https://login.company.com:443/discovery/polyfills.js:1) at script.i(https://login.company.com:443/discovery/runtime.js:1) at script(https://login.company.com:443/discovery/polyfills.js:1) at script.i(https://login.company.com:443/discovery/runtime.js:1) at script(https://login.company.com:443/discovery/polyfills.js:1) at script.i(https://login.company.com:443/discovery/runtime.js:1) at script.t(https://login.company.com:443/discovery/runtime.js:1) at script.r(https://login.company.com:443/discovery/runtime.js:1) at script(https://login.company.com:443/discovery/polyfills.js:1) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:911) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:111) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:422) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:331) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3570) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:122) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:789) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:903) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:532) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:798) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:774) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:108) at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:992) at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:371) at com.gargoylesoftware.htmlunit.html.HtmlScript$2.execute(HtmlScript.java:246) at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:267) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:805) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:761) at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1236) at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1136) at net.sourceforge.htmlunit.cyberneko.filters.DefaultFilter.endElement(DefaultFilter.java:226) at net.sourceforge.htmlunit.cyberneko.filters.NamespaceBinder.endElement(NamespaceBinder.java:345) at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3189) at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2141) at net.sourceforge.htmlunit.cyberneko.HTMLScanner.scanDocument(HTMLScanner.java:945) at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:521) at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:472) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:1004) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:253) at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:195) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:267) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:158) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:529) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:398) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:315) at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:683) at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$get$8(HtmlUnitDriver.java:670) at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$runAsync$0(HtmlUnitDriver.java:424) at java.lang.Thread.run(Thread.java:748) ~~~ --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-10 18:54:16
|
- **status**: open --> closed - **assigned_to**: RBRi --- ** [bugs:#1691] [MutationObserver] Few TypeError's on website load** **Status:** closed **Group:** Latest SVN **Created:** Fri Jun 05, 2015 06:34 AM UTC by Matthew **Last Updated:** Fri Mar 10, 2023 06:54 PM UTC **Owner:** RBRi **Attachments:** - [Test.java](https://sourceforge.net/p/htmlunit/bugs/1691/attachment/Test.java) (3.4 kB; application/octet-stream) - [error.txt](https://sourceforge.net/p/htmlunit/bugs/1691/attachment/error.txt) (61.1 kB; text/plain) I am creating a small program that monitors a webpage for changes in data that can then be presented to me. I am currently able to login to the site without any issues, but once back on the main page it does not update with new values. Also when retrieving the main page an exceptions are thrown. Below is the sample code I was testing with. I also tried to use addHtmlAttributeChangeListener and addDomChangeListener, which was called at the correct times when changes were to be made, but the page never updated. I do not know if this is a bug or a problem with my code, but I can not find it anywhere else. The website works fine without any errors on firefox and chrome. The error log and test java file are attacked so this post isnt too long. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-10 18:54:04
|
Hopefully fixed inbetween. --- ** [bugs:#1691] [MutationObserver] Few TypeError's on website load** **Status:** open **Group:** Latest SVN **Created:** Fri Jun 05, 2015 06:34 AM UTC by Matthew **Last Updated:** Tue Jun 30, 2015 09:24 PM UTC **Owner:** nobody **Attachments:** - [Test.java](https://sourceforge.net/p/htmlunit/bugs/1691/attachment/Test.java) (3.4 kB; application/octet-stream) - [error.txt](https://sourceforge.net/p/htmlunit/bugs/1691/attachment/error.txt) (61.1 kB; text/plain) I am creating a small program that monitors a webpage for changes in data that can then be presented to me. I am currently able to login to the site without any issues, but once back on the main page it does not update with new values. Also when retrieving the main page an exceptions are thrown. Below is the sample code I was testing with. I also tried to use addHtmlAttributeChangeListener and addDomChangeListener, which was called at the correct times when changes were to be made, but the page never updated. I do not know if this is a bug or a problem with my code, but I can not find it anywhere else. The website works fine without any errors on firefox and chrome. The error log and test java file are attacked so this post isnt too long. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-10 18:52:36
|
- **status**: open --> closed - **assigned_to**: RBRi --- ** [bugs:#2017] The application freezes after webClient.getPage() is called** **Status:** closed **Group:** 2.35.0 **Created:** Thu Jun 13, 2019 10:42 AM UTC by anton.grinenko **Last Updated:** Fri Mar 10, 2023 06:52 PM UTC **Owner:** RBRi **Attachments:** - [htmlunit_issue.png](https://sourceforge.net/p/htmlunit/bugs/2017/attachment/htmlunit_issue.png) (63.7 kB; image/png) Hi, Here is a simpe code to reproduce the issue: ~~~ public static void main(String[] args) throws IOException { final WebClient webClient = new WebClient(BrowserVersion.CHROME); webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setActiveXNative(true); webClient.getOptions().setAppletEnabled(false); webClient.getOptions().setCssEnabled(true); webClient.getOptions().setDoNotTrackEnabled(true); webClient.getOptions().setGeolocationEnabled(false); webClient.getOptions().setPopupBlockerEnabled(true); webClient.getOptions().setPrintContentOnFailingStatusCode(true); webClient.getOptions().setThrowExceptionOnScriptError(true); webClient.getOptions().setUseInsecureSSL(true); webClient.getCookieManager().setCookiesEnabled(true); webClient.getOptions().setRedirectEnabled(true); HtmlPage page = webClient.getPage("https://new.santehnika-online.ru/product/unitaz_podvesnoy_gustavsberg_estetic_hygienic_flush_chernyy/"); final String pageAsText = page.asText(); System.out.println("====>>>> page: " + pageAsText); webClient.close(); } ~~~ The application freezes at webClient.getPage(...) call. Also I see with jvisualvm that memory grows. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-10 18:52:25
|
seems to work now with the upcomming 3.0.0 release. --- ** [bugs:#2017] The application freezes after webClient.getPage() is called** **Status:** open **Group:** 2.35.0 **Created:** Thu Jun 13, 2019 10:42 AM UTC by anton.grinenko **Last Updated:** Thu Jun 13, 2019 10:42 AM UTC **Owner:** nobody **Attachments:** - [htmlunit_issue.png](https://sourceforge.net/p/htmlunit/bugs/2017/attachment/htmlunit_issue.png) (63.7 kB; image/png) Hi, Here is a simpe code to reproduce the issue: ~~~ public static void main(String[] args) throws IOException { final WebClient webClient = new WebClient(BrowserVersion.CHROME); webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setActiveXNative(true); webClient.getOptions().setAppletEnabled(false); webClient.getOptions().setCssEnabled(true); webClient.getOptions().setDoNotTrackEnabled(true); webClient.getOptions().setGeolocationEnabled(false); webClient.getOptions().setPopupBlockerEnabled(true); webClient.getOptions().setPrintContentOnFailingStatusCode(true); webClient.getOptions().setThrowExceptionOnScriptError(true); webClient.getOptions().setUseInsecureSSL(true); webClient.getCookieManager().setCookiesEnabled(true); webClient.getOptions().setRedirectEnabled(true); HtmlPage page = webClient.getPage("https://new.santehnika-online.ru/product/unitaz_podvesnoy_gustavsberg_estetic_hygienic_flush_chernyy/"); final String pageAsText = page.asText(); System.out.println("====>>>> page: " + pageAsText); webClient.close(); } ~~~ The application freezes at webClient.getPage(...) call. Also I see with jvisualvm that memory grows. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-10 18:40:14
|
- **status**: accepted --> closed --- ** [bugs:#1968] Function.prototype.toString shall return actual source code** **Status:** closed **Group:** 2.31 **Created:** Sun Jun 17, 2018 11:49 AM UTC by Alex **Last Updated:** Fri Mar 10, 2023 06:40 PM UTC **Owner:** RBRi Some scripts make use of Function.prototype.toString and rely on it beeing the original source code especially newlines. This is due to some pattern matching done later via regexp. This breaks with the unparsing/decompiling that HTMLUNIT does. I therefore propose to store the original JS source and directly return it. This is the same as browsers do. Example: https://bugzilla.mozilla.org/show_bug.cgi?id=761723 --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-10 18:40:04
|
This is a really hard one - but finally i found a solution. Version 3.0.0 will include a fix - you can follow https://github.com/HtmlUnit/htmlunit/issues/552 for the progress. --- ** [bugs:#1968] Function.prototype.toString shall return actual source code** **Status:** accepted **Group:** 2.31 **Created:** Sun Jun 17, 2018 11:49 AM UTC by Alex **Last Updated:** Fri Aug 10, 2018 06:18 AM UTC **Owner:** RBRi Some scripts make use of Function.prototype.toString and rely on it beeing the original source code especially newlines. This is due to some pattern matching done later via regexp. This breaks with the unparsing/decompiling that HTMLUNIT does. I therefore propose to store the original JS source and directly return it. This is the same as browsers do. Example: https://bugzilla.mozilla.org/show_bug.cgi?id=761723 --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-10 18:38:09
|
- **status**: pending --> closed --- ** [feature-requests:#253] App crashes when I want to get a website using HtmlUnit** **Status:** closed **Group:** 2.31 **Labels:** android runtime-error java htmlunit html android studio **Created:** Sat May 26, 2018 01:15 PM UTC by Venatorc Coolerfigo **Last Updated:** Fri Mar 10, 2023 06:38 PM UTC **Owner:** RBRi For my app I want to get the html-text of a website. But the dynamic text on my website is written in JavaScript, so I wrote a Java-programm where I get the text using "HtmlUnit". Now I want to display this text in my android app. When I importet the newest version of HtmlUnit in Android-Studio an error occurred. I solved it by implementing an older version of HtmlUnit into the build.gradle: ~~~ dependencies { implementation 'net.sourceforge.htmlunit:htmlunit:2.12' } ~~~ I also added "internet-permission" to the AndroidManifest.xml. Then I tried using HtmlUnit like in Java, but when I try to launch the app, it immediately crashes. The code of my "MainActivity.java" is the following: ~~~ package com.example.test.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import java.io.IOException; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebClient webClient = new WebClient(); try { final HtmlPage page = webClient.getPage("https://www.google.com/"); } catch (IOException e) { e.printStackTrace(); } } } ~~~ Without final HtmlPage page = webClient.getPage("https://www.google.com/"); the app starts perfectly without any errors. As soon as I add this code, the app doesnt start properly and when I use the debugger, the following errors occur (I put it into "code-style" so it can be read better): ~~~ E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.test.myapplication, PID: 8543 java.lang.IncompatibleClassChangeError: Superclass org.apache.http.conn.scheme.PlainSocketFactory of com.gargoylesoftware.htmlunit.SocksSocketFactory is declared final (declaration of 'com.gargoylesoftware.htmlunit.SocksSocketFactory' appears in /data/app/com.example.test.myapplication-2/split_lib_dependencies_apk.apk) at com.gargoylesoftware.htmlunit.WebClient.createWebConnection(WebClient.java:2123) at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:129) at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:182) at com.example.test.myapplication.MainActivity.onCreate(MainActivity.java:18) at android.app.Activity.performCreate(Activity.java:6912) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2877) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2985) at android.app.ActivityThread.-wrap14(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1635) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) ~~~ Do I have to change the HtmlUnit-code? I already tried it but the code is "readonly". Or what can I do/use otherwise? (Maybe I have an error in my code?) Thank you in advance! Venatorc PS. I have already tried to declare HtmlPage page as not final. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-03-10 18:38:01
|
this should be solved now - please have a look at https://github.com/HtmlUnit/htmlunit-android --- ** [feature-requests:#253] App crashes when I want to get a website using HtmlUnit** **Status:** pending **Group:** 2.31 **Labels:** android runtime-error java htmlunit html android studio **Created:** Sat May 26, 2018 01:15 PM UTC by Venatorc Coolerfigo **Last Updated:** Sun May 27, 2018 06:34 PM UTC **Owner:** RBRi For my app I want to get the html-text of a website. But the dynamic text on my website is written in JavaScript, so I wrote a Java-programm where I get the text using "HtmlUnit". Now I want to display this text in my android app. When I importet the newest version of HtmlUnit in Android-Studio an error occurred. I solved it by implementing an older version of HtmlUnit into the build.gradle: ~~~ dependencies { implementation 'net.sourceforge.htmlunit:htmlunit:2.12' } ~~~ I also added "internet-permission" to the AndroidManifest.xml. Then I tried using HtmlUnit like in Java, but when I try to launch the app, it immediately crashes. The code of my "MainActivity.java" is the following: ~~~ package com.example.test.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import java.io.IOException; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebClient webClient = new WebClient(); try { final HtmlPage page = webClient.getPage("https://www.google.com/"); } catch (IOException e) { e.printStackTrace(); } } } ~~~ Without final HtmlPage page = webClient.getPage("https://www.google.com/"); the app starts perfectly without any errors. As soon as I add this code, the app doesnt start properly and when I use the debugger, the following errors occur (I put it into "code-style" so it can be read better): ~~~ E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.test.myapplication, PID: 8543 java.lang.IncompatibleClassChangeError: Superclass org.apache.http.conn.scheme.PlainSocketFactory of com.gargoylesoftware.htmlunit.SocksSocketFactory is declared final (declaration of 'com.gargoylesoftware.htmlunit.SocksSocketFactory' appears in /data/app/com.example.test.myapplication-2/split_lib_dependencies_apk.apk) at com.gargoylesoftware.htmlunit.WebClient.createWebConnection(WebClient.java:2123) at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:129) at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:182) at com.example.test.myapplication.MainActivity.onCreate(MainActivity.java:18) at android.app.Activity.performCreate(Activity.java:6912) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2877) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2985) at android.app.ActivityThread.-wrap14(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1635) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) ~~~ Do I have to change the HtmlUnit-code? I already tried it but the code is "readonly". Or what can I do/use otherwise? (Maybe I have an error in my code?) Thank you in advance! Venatorc PS. I have already tried to declare HtmlPage page as not final. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-02-02 06:28:23
|
will be in the 2.71.o release Probably the feature withthe larges wait/effort ratio. --- ** [feature-requests:#216] XMLSerializer needs to be public** **Status:** closed **Group:** Latest SVN **Created:** Wed Oct 23, 2013 09:39 PM UTC by cg_monroe **Last Updated:** Thu Feb 02, 2023 06:27 AM UTC **Owner:** RBRi I needed to make some changes to the HTMLPage.save(File) process and found that the logic is mostly contained in the XmlSerializer class. However, I could not create a subclass of this because the class declaration is not marked as public. Is there some reason this class isn't extendable? Adding public to the class def would be nice for others who need to do this. Probably easiest feature request ever..lol --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-02-02 06:27:29
|
- **status**: open --> closed - **assigned_to**: RBRi --- ** [feature-requests:#216] XMLSerializer needs to be public** **Status:** closed **Group:** Latest SVN **Created:** Wed Oct 23, 2013 09:39 PM UTC by cg_monroe **Last Updated:** Wed Oct 23, 2013 09:39 PM UTC **Owner:** RBRi I needed to make some changes to the HTMLPage.save(File) process and found that the logic is mostly contained in the XmlSerializer class. However, I could not create a subclass of this because the class declaration is not marked as public. Is there some reason this class isn't extendable? Adding public to the class def would be nice for others who need to do this. Probably easiest feature request ever..lol --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-02-02 06:22:53
|
- **status**: open --> closed - **assigned_to**: RBRi --- ** [feature-requests:#235] Support for windows.performance -> Google Analytics** **Status:** closed **Group:** 2.22 **Labels:** Analytics Performance **Created:** Fri Jun 10, 2016 06:41 PM UTC by Jason Durheim **Last Updated:** Thu Feb 02, 2023 06:22 AM UTC **Owner:** RBRi At a high level, the feature I'm looking for here is for htmlunit to have enough of the windows.performance features implemented out such that if a webpage has GoogleAnalytics configured to track the users accessing that page, htmlunit will pass page timing data to GoogleAnalytics, page load speeds, etc. I'm currently using 2.22, and GoogleAnalytics picks up the users accessing the page, page views down to the specific URL, but all page load speed are 0 seconds. Per the [GADoc](https://support.google.com/analytics/answer/1205784), "Site speed can only be tracked from browsers that support the HTML5 Navigation Timing interface". Based on closed bugs [1739](https://sourceforge.net/p/htmlunit/bugs/1739/) and [1756](https://sourceforge.net/p/htmlunit/bugs/1756/) I'm guessing it has not been implemented enough such that GA will get the necessary timing data. Our preference is to use htmlunit over something like phantomjs (for which GA does pick up page speed stats), but won't work for our performance testing solution without data getting loaded into Google Analytics. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-02-02 06:22:42
|
implemented in 2.21 --- ** [feature-requests:#235] Support for windows.performance -> Google Analytics** **Status:** open **Group:** 2.22 **Labels:** Analytics Performance **Created:** Fri Jun 10, 2016 06:41 PM UTC by Jason Durheim **Last Updated:** Fri Jun 10, 2016 06:41 PM UTC **Owner:** nobody At a high level, the feature I'm looking for here is for htmlunit to have enough of the windows.performance features implemented out such that if a webpage has GoogleAnalytics configured to track the users accessing that page, htmlunit will pass page timing data to GoogleAnalytics, page load speeds, etc. I'm currently using 2.22, and GoogleAnalytics picks up the users accessing the page, page views down to the specific URL, but all page load speed are 0 seconds. Per the [GADoc](https://support.google.com/analytics/answer/1205784), "Site speed can only be tracked from browsers that support the HTML5 Navigation Timing interface". Based on closed bugs [1739](https://sourceforge.net/p/htmlunit/bugs/1739/) and [1756](https://sourceforge.net/p/htmlunit/bugs/1756/) I'm guessing it has not been implemented enough such that GA will get the necessary timing data. Our preference is to use htmlunit over something like phantomjs (for which GA does pick up page speed stats), but won't work for our performance testing solution without data getting loaded into Google Analytics. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-02-02 06:18:08
|
- **status**: open --> closed - **assigned_to**: RBRi --- ** [bugs:#1630] form_owner incorrect when <form> are malformed** **Status:** closed **Group:** Latest SVN **Created:** Mon Aug 04, 2014 09:16 AM UTC by Atsushi Nakagawa **Last Updated:** Thu Feb 02, 2023 06:17 AM UTC **Owner:** RBRi **Attachments:** - [consumed1-div.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/consumed1-div.html) (308 Bytes; text/html) - [consumed1.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/consumed1.html) (312 Bytes; text/html) - [consumed2.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/consumed2.html) (398 Bytes; text/html) - [doc-order1-div.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/doc-order1-div.html) (308 Bytes; text/html) - [doc-order1.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/doc-order1.html) (312 Bytes; text/html) - [dom-tree1.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/dom-tree1.html) (619 Bytes; text/html) - [dom-tree2.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/dom-tree2.html) (700 Bytes; text/html) - [f1.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/f1.html) (40 Bytes; text/html) - [f2.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/f2.html) (40 Bytes; text/html) Unlike the recently closed [#1621], this problem isn't a regression and has existed at least as far back as 2.12. **Summary:** Owner forms returned by HtmlUnit do not match conventional browsers in certain cases when `<form></form>`s aren't aligned with the DOM tree. For example, the following incorrectly returns `"f1"` when `HtmlElement.getEnclosingForm()` is called on the `f2_submit` element. Chrome/IE11/Firefox returns `"f2"`: ~~~~~~ <html> <body> <div> <form name="f1" action="f1.html" method="GET"> <table> <input type="submit" name="f1_submit" value="expect f1"/> </form> <form name="f2" action="f2.html" method="GET"> </table> </div> <input type="submit" name="f2_submit" value="expect f2"/> </form> </body> </html> ~~~~~~ --- After some testing in Chrome/IE11/Firefox, owner forms seem to be determined by these three rules: **1. Document order pure and simple. (Completely ignoring the DOM heirachy):** ~~~~~~ <html> ... <form name="f1"> ... everything in between belongs to f1 ... </form> ... <form name="f2"> ... everything here and belongs to f2 ... (missing </form> so until the end of document) ~~~~~~ **2. Anything not encompassed between `<form>...</form>`, in document order, belong to the closest DOM-tree ancestor if any.** ~~~~~~ <html> ... <form name="f1"> ... everything here belongs to f1 ... <div> ... everything here belongs to f1 ... </form> ... things here belong to f1 because DOM-tree is `<form><div></div></form>` ... </div> ... ~~~~~~ **3. `<form>`s within `<form>`s simply cease to exist. (This is also determined by document order pure and simple.)** ~~~~~~ <html> ... <form name="f1"> ... everything in between belongs to f1 ... <form name="f2"> ... everything in between belongs to f1 ... </form><!--This actually closed f1's document-order enclosure--> ... things here belong to no one ... </form> ... things here belong to no one ... ~~~~~~ --- **Conclusion:** 1 and 3 seem to happen with no regards to the DOM tree and it doesn't seem to matter how whacky and nested the surrounding `<element>` and `</element>` placements are. Even though `<form>` nesting is not allowed *in document order*, it can be nested in the resulting DOM tree. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2023-02-02 06:17:55
|
Fixed in 2.71.0 --- ** [bugs:#1630] form_owner incorrect when <form> are malformed** **Status:** open **Group:** Latest SVN **Created:** Mon Aug 04, 2014 09:16 AM UTC by Atsushi Nakagawa **Last Updated:** Sat Sep 06, 2014 06:50 PM UTC **Owner:** nobody **Attachments:** - [consumed1-div.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/consumed1-div.html) (308 Bytes; text/html) - [consumed1.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/consumed1.html) (312 Bytes; text/html) - [consumed2.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/consumed2.html) (398 Bytes; text/html) - [doc-order1-div.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/doc-order1-div.html) (308 Bytes; text/html) - [doc-order1.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/doc-order1.html) (312 Bytes; text/html) - [dom-tree1.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/dom-tree1.html) (619 Bytes; text/html) - [dom-tree2.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/dom-tree2.html) (700 Bytes; text/html) - [f1.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/f1.html) (40 Bytes; text/html) - [f2.html](https://sourceforge.net/p/htmlunit/bugs/1630/attachment/f2.html) (40 Bytes; text/html) Unlike the recently closed [#1621], this problem isn't a regression and has existed at least as far back as 2.12. **Summary:** Owner forms returned by HtmlUnit do not match conventional browsers in certain cases when `<form></form>`s aren't aligned with the DOM tree. For example, the following incorrectly returns `"f1"` when `HtmlElement.getEnclosingForm()` is called on the `f2_submit` element. Chrome/IE11/Firefox returns `"f2"`: ~~~~~~ <html> <body> <div> <form name="f1" action="f1.html" method="GET"> <table> <input type="submit" name="f1_submit" value="expect f1"/> </form> <form name="f2" action="f2.html" method="GET"> </table> </div> <input type="submit" name="f2_submit" value="expect f2"/> </form> </body> </html> ~~~~~~ --- After some testing in Chrome/IE11/Firefox, owner forms seem to be determined by these three rules: **1. Document order pure and simple. (Completely ignoring the DOM heirachy):** ~~~~~~ <html> ... <form name="f1"> ... everything in between belongs to f1 ... </form> ... <form name="f2"> ... everything here and belongs to f2 ... (missing </form> so until the end of document) ~~~~~~ **2. Anything not encompassed between `<form>...</form>`, in document order, belong to the closest DOM-tree ancestor if any.** ~~~~~~ <html> ... <form name="f1"> ... everything here belongs to f1 ... <div> ... everything here belongs to f1 ... </form> ... things here belong to f1 because DOM-tree is `<form><div></div></form>` ... </div> ... ~~~~~~ **3. `<form>`s within `<form>`s simply cease to exist. (This is also determined by document order pure and simple.)** ~~~~~~ <html> ... <form name="f1"> ... everything in between belongs to f1 ... <form name="f2"> ... everything in between belongs to f1 ... </form><!--This actually closed f1's document-order enclosure--> ... things here belong to no one ... </form> ... things here belong to no one ... ~~~~~~ --- **Conclusion:** 1 and 3 seem to happen with no regards to the DOM tree and it doesn't seem to matter how whacky and nested the surrounding `<element>` and `</element>` placements are. Even though `<form>` nesting is not allowed *in document order*, it can be nested in the resulting DOM tree. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Ronald B. <rb...@rb...> - 2022-11-27 16:05:15
|
Can you please open an issue for this on github - otherwise the might get lost. Ronald On Fri, 18 Nov 2022 16:25:51 -0300 Adriano Oliveira da Silva wrote: > >Hello, > >I am try get page with htmlunit (all versions htmlunit, all BrowserVersion) >and the site return problem with cookie. As if it were disabled. > >sample code: > >WebClient webClient = new WebClient(BrowserVersion.BEST_SUPPORTED); > >webClient.getCookieManager().setCookiesEnabled(true); > >HtmlPage page = webClient.getPage(" >https://sso.acesso.gov.br/logn?client_id=consumidor.gov.br&authorization_id=1848bfa e21b >"); > >System.out.println(page.asNormalizedText()); > >show message >"Foi detectado que os cookies do seu browser podem estar >desabilitados. Por favor habilite os cookies e tente novamente." > >Does it have a solution? > >Thank you > > > >----< Inline text [text-plain-04.txt] >------------------ > > > > >----< Inline text [text-plain-05.txt] >------------------ > >_______________________________________________ >HtmlUnit-develop mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-develop > > |
From: Adriano O. da S. <adr...@gm...> - 2022-11-18 19:26:11
|
Hello, I am try get page with htmlunit (all versions htmlunit, all BrowserVersion) and the site return problem with cookie. As if it were disabled. sample code: WebClient webClient = new WebClient(BrowserVersion.BEST_SUPPORTED); webClient.getCookieManager().setCookiesEnabled(true); HtmlPage page = webClient.getPage(" https://sso.acesso.gov.br/logn?client_id=consumidor.gov.br&authorization_id=1848bfae21b "); System.out.println(page.asNormalizedText()); show message "Foi detectado que os cookies do seu browser podem estar desabilitados. Por favor habilite os cookies e tente novamente." Does it have a solution? Thank you |
From: Dale <drs...@se...> - 2022-04-23 02:08:52
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p><font face="Arial">I've looked at "Getting Latest Code" ( <a class="moz-txt-link-freetext" href="https://htmlunit.sourceforge.io/gettingLatestCode.html">https://htmlunit.sourceforge.io/gettingLatestCode.html</a> ), but my experience with public collaboration on projects is limited, and my old corporate skills are even a bit rusty.</font></p> <p><font face="Arial">I have Eclipse* on Windows and would like to get htmlunit source build going so that I can debug. I saw some descriptions of how to USE htmlunit, which is nothing but getting all the jars, but I want to build htmlunit from source code.<br> </font></p> <p><font face="Arial">If someone could tell me the basic steps to go through, like specifically where to get the source, how to unpack/arrange the source code in an Eclipse project, how to configure the project to use the most appropriate build tool, etc.<br> </font></p> <p><font face="Arial">Thanks.</font></p> <p><font face="Arial">--Dale--<br> </font></p> <p><font face="Arial"><br> </font></p> <p><font face="Arial">*Eclipse Luna (2015 era), just because my development is independent, and what I have has continued to work on my older/slower Windows machine. If the first step is "update Eclipse", I'll groan heavily, but if it must be done, then so be it.<br> </font></p> <p><br> </p> </body> </html> |
From: RBRi <rb...@us...> - 2021-11-12 12:52:47
|
- **status**: open --> closed - **assigned_to**: RBRi --- ** [feature-requests:#226] Authenticated SOCSK5 per Thread** **Status:** closed **Group:** 2.19 **Created:** Wed Feb 03, 2016 08:45 PM UTC by Brett Shouse **Last Updated:** Fri Nov 12, 2021 12:52 PM UTC **Owner:** RBRi I have been digging around and not found a way to provide SOCKS5 credentials. I have done this sort of thing with other Java applications, but I wanted to check to see if someone with more experience then I knew of a way to do this with the current code base. If this is not currently supported, I would be happy to draft somethign up to make it happen. Please let me know how to proceed. Thank you. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2021-11-12 12:52:24
|
- **Comment**: socks authentication is now implemented --- ** [feature-requests:#226] Authenticated SOCSK5 per Thread** **Status:** open **Group:** 2.19 **Created:** Wed Feb 03, 2016 08:45 PM UTC by Brett Shouse **Last Updated:** Mon Feb 08, 2016 04:31 PM UTC **Owner:** nobody I have been digging around and not found a way to provide SOCKS5 credentials. I have done this sort of thing with other Java applications, but I wanted to check to see if someone with more experience then I knew of a way to do this with the current code base. If this is not currently supported, I would be happy to draft somethign up to make it happen. Please let me know how to proceed. Thank you. --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2021-11-11 18:55:18
|
- **status**: open --> closed - **Group**: --> 2.38.0 --- ** [feature-requests:#196] XMLHttpRequest Level 2** **Status:** closed **Group:** 2.38.0 **Created:** Mon Jul 04, 2011 03:29 PM UTC by Hartmut Arlt **Last Updated:** Thu Nov 11, 2021 06:55 PM UTC **Owner:** nobody Are there any plans to add support of XMLHttpRequest Level 2 to HtmlUnit? If not, what would be the best strategy to accomplish this? --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2021-11-11 18:55:09
|
I think our XMLHttpRequest support is now in really good shape --- ** [feature-requests:#196] XMLHttpRequest Level 2** **Status:** open **Group:** **Created:** Mon Jul 04, 2011 03:29 PM UTC by Hartmut Arlt **Last Updated:** Sun Oct 21, 2012 04:16 AM UTC **Owner:** nobody Are there any plans to add support of XMLHttpRequest Level 2 to HtmlUnit? If not, what would be the best strategy to accomplish this? --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: RBRi <rb...@us...> - 2021-10-30 11:10:27
|
- **status**: open --> closed - **assigned_to**: RBRi - **Comment**: see https://github.com/HtmlUnit/htmlunit/issues/394 --- ** [bugs:#1960] Authenticated SOCKS5 with username/password does not work** **Status:** closed **Group:** 2.30 **Labels:** socks socks5 authentication **Created:** Tue Apr 03, 2018 07:27 AM UTC by Rahul Vaidya **Last Updated:** Sat Jul 21, 2018 04:08 PM UTC **Owner:** RBRi I am using this to set up my proxy connection: client.getOptions().setProxyConfig(new ProxyConfig(host, port, true)); DefaultCredentialsProvider credentialsProvider = (DefaultCredentialsProvider) client.getCredentialsProvider(); credentialsProvider.addCredentials(username, password); When I try to connect I get this: [main] INFO org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://checkip.amazonaws.com:80: SOCKS : authentication failed [main] INFO org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://checkip.amazonaws.com:80 [main] INFO org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://checkip.amazonaws.com:80: SOCKS : authentication failed [main] INFO org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://checkip.amazonaws.com:80 [main] INFO org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://checkip.amazonaws.com:80: SOCKS : authentication failed [main] INFO org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://checkip.amazonaws.com:80 Error getting web client IP address java.net.SocketException: SOCKS : authentication failed at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:473) at java.net.Socket.connect(Socket.java:589) at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:192) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1401) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1319) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:315) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:463) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:448) --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |