Project

General

Profile

Bug #12002

JS error when starting Rudder 4.3 with jetty 9

Added by Nicolas CHARLES 11 months ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
Web - UI & UX
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
49
Tags:

Description

At first login, I get the following error in the dashboard

TypeError: decomposedValues[i] is undefined
rudder-datatable.js:1590:5

and graphs are very slow to show up

Update: the problem is somehow linked to Jetty version: Rudder 4.3 with Jetty 8 works fine, and Rudder 4.1 with Jetty 9 has the problem.
We keep target = 4.3 because we don't have jetty 9 before.


Related issues

Related to Rudder - Bug #11991: Javascript error on every pages, preventing usage of file explorerReleased
Has duplicate Rudder - Bug #12159: In 4.3, right after logging in, the dashboard remains empty, with a JS errorRejected

Associated revisions

Revision 97389f3a (diff)
Added by François ARMAND 9 months ago

Issue #12002: makes the JSESSIONID cookie 'HTTP only' in the servlet

Revision e40bab75 (diff)
Added by François ARMAND 9 months ago

Issue #12002: makes the JSESSIONID cookie 'HTTP only' in the servlet

Revision 0d28c8f1 (diff)
Added by François ARMAND 9 months ago

Fixes #12002: JS error when starting Rudder 4.3 with jetty 9

Revision 308ddf3f (diff)
Added by François ARMAND 9 months ago

Fixes #12002: JS error when starting Rudder 4.3 with jetty 9

History

#1 Updated by François ARMAND 11 months ago

  • Subject changed from JS error when starting Rudder 4.3 to JS error when starting Rudder 4.3

In my cases, the graphe don't show at all, and all the JS is broken. My errors are different, to:

TypeError: angular.module(...).unsafePerformSync is not a function
[Learn More]
angular-translate.min.js:6:19057
<anonymous>
http://localhost:8082/rudder-web/cache-4.3.0~alpha1-SNAPSHOT/javascript/angular/angular-translate.min.js:6:19057
<anonymous>
http://localhost:8082/rudder-web/cache-4.3.0~alpha1-SNAPSHOT/javascript/angular/angular-translate.min.js:6:132
<anonymous>
http://localhost:8082/rudder-web/cache-4.3.0~alpha1-SNAPSHOT/javascript/angular/angular-translate.min.js:6:2
TypeError: angular.module(...).unsafePerformSync is not a function
[Learn More]
angular-filemanager.min.js:3:1657
<anonymous>
http://localhost:8082/rudder-web/cache-4.3.0~alpha1-SNAPSHOT/javascript/angular/angular-filemanager.min.js:3:1657
Loading failed for the <script> with source “http://localhost:8082/rudder-web/lift/page/F471683393803U4BS1U.js”.
[Learn More]

It feels like some things are not ready or correctly loaded, which it turns broke all the JS.

#2 Updated by François ARMAND 11 months ago

A simple reload of the page make things work again.

#3 Updated by Nicolas CHARLES 11 months ago

the error about unsafePerformSync is on every page
see https://www.rudder-project.org/redmine/issues/11991

#4 Updated by Nicolas CHARLES 11 months ago

  • Related to Bug #11991: Javascript error on every pages, preventing usage of file explorer added

#5 Updated by Benoît PECCATTE 11 months ago

  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Getting started - demo | first install | level 1 Techniques
  • Priority changed from 0 to 50

#6 Updated by Nicolas CHARLES 11 months ago

Error now is

Content Security Policy: La directive « frame-src » est obsolète. Veuillez utiliser la directive « child-src » à la place.
Échec du chargement pour l’élément <script> dont la source est « https://192.168.44.2/rudder/lift/page/F256739716637QEWLDN.js ».
index.html:627
Erreur dans les liens source : request failed with status 404
URL de la ressource : https://192.168.44.2/rudder/cache-4.3.0~alpha1-SNAPSHOT/javascript/angular/angular.min.js
URL du lien source : angular.min.js.map

#7 Updated by Vincent MEMBRÉ 11 months ago

Last error has no impact, it's only when you open a js console, and it does not find .map file for angular.min.js file (a map files allow to deminify a file on demand)

Erreur dans les liens source : request failed with status 404
URL de la ressource : https://192.168.44.2/rudder/cache-4.3.0~alpha1-SNAPSHOT/javascript/angular/angular.min.js
URL du lien source : angular.min.js.map

I need to looke depper in the first line about the frame-src/child-src

#8 Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 4.3.0~beta1 to 4.3.0~rc1

#9 Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 4.3.0~rc1 to 4.3.0~rc2

#10 Updated by Nicolas CHARLES 9 months ago

This is still happening

#11 Updated by François ARMAND 9 months ago

  • Tags set to Blocking 4.3

We can't make a release with errors. It would lead to a lot of false positive when we find other errors.

#12 Updated by Benoît PECCATTE 9 months ago

  • Assignee set to Vincent MEMBRÉ

#13 Updated by Benoît PECCATTE 9 months ago

  • Has duplicate Bug #12159: In 4.3, right after logging in, the dashboard remains empty, with a JS error added

#14 Updated by Nicolas CHARLES 9 months ago

Apache logs at login are

192.168.42.1 - - [20/Mar/2018:12:59:37 -0500] "POST /rudder/j_spring_security_check HTTP/1.1" 302 - "https://192.168.42.2/rudder/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 
192.168.42.1 - - [20/Mar/2018:12:59:38 -0500] "GET /rudder/secure/index.html HTTP/1.1" 200 6901 "https://192.168.42.2/rudder/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 
192.168.42.1 - - [20/Mar/2018:12:59:38 -0500] "GET /rudder/lift/page/F229878065677F1DCXM.js HTTP/1.1" 404 17711 "https://192.168.42.2/rudder/secure/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 
192.168.42.1 - - [20/Mar/2018:12:58:40 -0500] "GET /rudder/lift/comet/54829882895/F229878025479Z03TWD/F229878025492TXRMZI?F2298780254933GF1EH=229878025496&F229878025497IP2KCX=229878033300&_=1521541447761 HTTP/1.1" 502 1277 "https://192.168.42.2/rudder/secure/utilities/techniqueEditor" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36" 
192.168.42.1 - - [20/Mar/2018:12:59:41 -0500] "GET /rudder/lift/page/F229878065677F1DCXM.js HTTP/1.1" 404 17711 "https://192.168.42.2/rudder/secure/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 

#15 Updated by Nicolas CHARLES 9 months ago

  • Status changed from New to In progress
  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
  • Priority changed from 50 to 49

I'm taking over this issue
My finding, the JS lift/page/F1122152738108JPO4HU.js is not found
references are in

<body data-lift-session-id="F1122152738107BYHAPJ" data-lift-gc="F1122152738108JPO4HU" class="skin-yellow sidebar-mini">

and at the bottom of the code
    <script type="text/javascript" src="/rudder-web/lift/page/F1122152738108JPO4HU.js"></script>

#16 Updated by Nicolas CHARLES 9 months ago

Trying with LiftRules.enableLiftGC = false in class Boot, it didn't change anything
It works with Jetty 6 & 7, but not 9

#17 Updated by Nicolas CHARLES 9 months ago

Adding in HomePage.scala

LiftRules.enableLiftGC = false
LiftRules.autoIncludeComet = _ => false

disables the data-lift-gc tag; however it still fails, so it's unrelated to gc

#18 Updated by Nicolas CHARLES 9 months ago

the failing JS contains the Lift configuration part:

var lift_settings = {};
window.lift.extend(lift_settings,window.liftJQuery);
window.lift.extend(lift_settings,{"liftPath": "/rudder-web/lift", "ajaxRetryCount": 1, "ajaxPostTimeout": 30000, "gcPollingInterval": 75000, "gcFailureRetryTimeout": 15000, "cometGetTimeout": 140000, "cometFailureRetryTimeout": 10000, "cometServer": null, "logError": function(msg) {lift.defaultLogError(msg);}, "ajaxOnFailure": function() {alert("The server cannot be contacted at this time");}, "ajaxOnStart": function() {jQuery('#'+"ajax-loader").show();}, "ajaxOnEnd": function() {jQuery('#'+"ajax-loader").hide();}});
window.lift.init(lift_settings);
var destroy_F896022439538OB51J3 = function() {}
var destroy_F896022439541S1NB1T = function() {}
jQuery(document).ready(function() {lift.registerComets({"F896022439538OB51J3": 896022439539, "F896022439541S1NB1T": 896022439542},true);});

#19 Updated by François ARMAND 9 months ago

  • Subject changed from JS error when starting Rudder 4.3 to JS error when starting Rudder 4.3 with jetty 9
  • Description updated (diff)

#20 Updated by François ARMAND 9 months ago

The problem is with the existing sessions created by jetty in login page. If I delete the session cookie before hiting submit, then the JS is correctly loaded.

There is a thread on Liftweb google talking about that here: https://groups.google.com/forum/#!topic/liftweb/lcn6U6_Igxk

#21 Updated by Nicolas CHARLES 9 months ago

  • Assignee changed from Nicolas CHARLES to François ARMAND

#22 Updated by François ARMAND 9 months ago

This is a Liftweb bug, reported here: https://github.com/lift/framework/issues/1947. Waiting for a workaround :(

#23 Updated by François ARMAND 9 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/1876

#24 Updated by François ARMAND 9 months ago

  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES

#25 Updated by François ARMAND 9 months ago

Between, we can workaround the problem by forcing spring security to not use "HttpServletRequest.changeSessionId". We would be able to migrate back towards the more efficient solution when when want.

#26 Updated by François ARMAND 9 months ago

  • Status changed from Pending technical review to Pending release

#27 Updated by Vincent MEMBRÉ 8 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.0~rc2 which was released today.

Also available in: Atom PDF