Discussion:
No sign in possible due to cookie problem [2.1.0 / workaround]
f***@isys-software.de
2014-07-28 14:46:48 UTC
Permalink
|Hello, i got the problem that the webinterface is not being completely loaded.
The following JavaScript-Error is being thrown and not catched:

"SyntaxError: Unexpected token u
at Object.parse (native)
at Function.m.parseJSON (http://maven/archiva/js/jquery-1.11.1.min.js?_archivaVersion=2.1.0:4:15739)
at getUserFromLoginCookie (http://maven/archiva/js/archiva/main.js?_archivaVersion=2.1.0:69:18)
at startArchivaApplication (http://maven/archiva/js/archiva/main.js?_archivaVersion=2.1.0:888:16)
athttp://maven/archiva/js/archiva/archiva.js:119:19
at Object.i.execCb (http://maven/archiva/js/require.min.2.1.11.js:29:311)
at Object.$.check (http://maven/archiva/js/require.min.2.1.11.js:18:423)
at Object.$.enable (http://maven/archiva/js/require.min.2.1.11.js:23:238)
at Object.$.init (http://maven/archiva/js/require.min.2.1.11.js:17:68)
athttp://maven/archiva/js/require.min.2.1.11.js:26:369"

Lines in main.js relevant to the stacktrace:

|| getUserFromLoginCookie=function(){
|| var cookieContent=$.cookie('archiva_login');
|| $.log("archiva_getUserFromLoginCookie cookie content:"+cookieContent);
|| var user = $.parseJSON(cookieContent); // <-- throws the error
|| if(!user){
|| return null;
|| }||

|cookieContent is undefined. It should not be undefined.
I did the following hack to get the webinterface of archiva useable again:

| getUserFromLoginCookie=function(){
|| var cookieContent=$.cookie('archiva_login');
|| $.log("archiva_getUserFromLoginCookie cookie content:"+cookieContent);
|| if(typeof cookieContent === "undefined") { // hack begin
|| return null;
|| } // hack end
|| var user = $.parseJSON(cookieContent);
|| if(!user){
|| return null;
|| }|

Does someone has an idea why this is happening?
I updated recently from archiva 2.0.1 to 2.1.0.

Thanks,
Fabian
--
iSYS Software GmbH

Fabian Trampusch
Abteilung Hama-Webstage

Tel: +49 (0) 89 46 23 28-0 | Fax (0) 89 46 23 28-14
email: ***@isys-software.de
Grillparzerstr. 10 | D-81675 Muenchen
www.isys-software.de

Sitz der Gesellschaft: MÃŒnchen | HRB 111760
Geschaeftsfuehrer: Prof. Dr. Peter Mandl und Michael Sailer
Olivier Lamy
2014-07-29 00:03:49 UTC
Permalink
Post by f***@isys-software.de
|Hello, i got the problem that the webinterface is not being completely loaded.
"SyntaxError: Unexpected token u
at Object.parse (native)
at Function.m.parseJSON
(http://maven/archiva/js/jquery-1.11.1.min.js?_archivaVersion=2.1.0:4:15739)
at getUserFromLoginCookie
(http://maven/archiva/js/archiva/main.js?_archivaVersion=2.1.0:69:18)
at startArchivaApplication
(http://maven/archiva/js/archiva/main.js?_archivaVersion=2.1.0:888:16)
athttp://maven/archiva/js/archiva/archiva.js:119:19
at Object.i.execCb
(http://maven/archiva/js/require.min.2.1.11.js:29:311)
at Object.$.check (http://maven/archiva/js/require.min.2.1.11.js:18:423)
at Object.$.enable
(http://maven/archiva/js/require.min.2.1.11.js:23:238)
at Object.$.init (http://maven/archiva/js/require.min.2.1.11.js:17:68)
athttp://maven/archiva/js/require.min.2.1.11.js:26:369"
|| getUserFromLoginCookie=function(){
|| var cookieContent=$.cookie('archiva_login');
|| $.log("archiva_getUserFromLoginCookie cookie
content:"+cookieContent);
|| var user = $.parseJSON(cookieContent); // <-- throws the error
|| if(!user){
|| return null;
|| }||
|cookieContent is undefined. It should not be undefined.
| getUserFromLoginCookie=function(){
|| var cookieContent=$.cookie('archiva_login');
|| $.log("archiva_getUserFromLoginCookie cookie
content:"+cookieContent);
|| if(typeof cookieContent === "undefined") { // hack begin
|| return null;
|| } // hack end
|| var user = $.parseJSON(cookieContent);
|| if(!user){
|| return null;
|| }|
Does someone has an idea why this is happening?
Yup that's a bug :-)
It's fixed but need a new release.
Post by f***@isys-software.de
I updated recently from archiva 2.0.1 to 2.1.0.
Thanks,
Fabian
--
iSYS Software GmbH
Fabian Trampusch
Abteilung Hama-Webstage
Tel: +49 (0) 89 46 23 28-0 | Fax (0) 89 46 23 28-14
Grillparzerstr. 10 | D-81675 Muenchen
www.isys-software.de
Sitz der Gesellschaft: München | HRB 111760
Geschaeftsfuehrer: Prof. Dr. Peter Mandl und Michael Sailer
--
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy
Fabian Trampusch
2014-07-28 14:28:50 UTC
Permalink
|Hello, i got the problem that the webinterface is not being completely loaded.
The following JavaScript-Error is being thrown and not catched:

"SyntaxError: Unexpected token u
at Object.parse (native)
at Function.m.parseJSON (http://maven/archiva/js/jquery-1.11.1.min.js?_archivaVersion=2.1.0:4:15739)
at getUserFromLoginCookie (http://maven/archiva/js/archiva/main.js?_archivaVersion=2.1.0:69:18)
at startArchivaApplication (http://maven/archiva/js/archiva/main.js?_archivaVersion=2.1.0:888:16)
athttp://maven/archiva/js/archiva/archiva.js:119:19
at Object.i.execCb (http://maven/archiva/js/require.min.2.1.11.js:29:311)
at Object.$.check (http://maven/archiva/js/require.min.2.1.11.js:18:423)
at Object.$.enable (http://maven/archiva/js/require.min.2.1.11.js:23:238)
at Object.$.init (http://maven/archiva/js/require.min.2.1.11.js:17:68)
athttp://maven/archiva/js/require.min.2.1.11.js:26:369"

Lines in main.js relevant to the stacktrace:

|| getUserFromLoginCookie=function(){
|| var cookieContent=$.cookie('archiva_login');
|| $.log("archiva_getUserFromLoginCookie cookie content:"+cookieContent);
|| var user = $.parseJSON(cookieContent); // <-- throws the error
|| if(!user){
|| return null;
|| }||

|cookieContent is undefined. It should not be undefined.
I did the following hack to get the webinterface of archiva useable again:

| getUserFromLoginCookie=function(){
|| var cookieContent=$.cookie('archiva_login');
|| $.log("archiva_getUserFromLoginCookie cookie content:"+cookieContent);
|| if(typeof cookieContent === "undefined") { // hack begin
|| return null;
|| } // hack end
|| var user = $.parseJSON(cookieContent);
|| if(!user){
|| return null;
|| }|

Does someone has an idea why this is happening?
I updated recently from archiva 2.0.1 to 2.1.0.

Thanks,
Fabian
--
iSYS Software GmbH

Fabian Trampusch
Abteilung Hama-Webstage

Tel: +49 (0) 89 46 23 28-0 | Fax (0) 89 46 23 28-14
email:***@isys-software.de
Grillparzerstr. 10 | D-81675 Muenchen
www.isys-software.de

Sitz der Gesellschaft: MÃŒnchen | HRB 111760
Geschaeftsfuehrer: Prof. Dr. Peter Mandl und Michael Sailer
Loading...