Project

General

Profile

Actions

Bug #12002

closed

JS error when starting Rudder 4.3 with jetty 9

Added by Nicolas CHARLES over 6 years ago. Updated over 6 years ago.

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

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 2 (0 open2 closed)

Related to Rudder - Bug #11991: Javascript error on every pages, preventing usage of file explorerReleasedFrançois ARMANDActions
Has duplicate Rudder - Bug #12159: In 4.3, right after logging in, the dashboard remains empty, with a JS errorRejectedActions
Actions #1

Updated by François ARMAND over 6 years 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.

Actions #2

Updated by François ARMAND over 6 years ago

A simple reload of the page make things work again.

Actions #3

Updated by Nicolas CHARLES over 6 years ago

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

Actions #4

Updated by Nicolas CHARLES over 6 years ago

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

Updated by Benoît PECCATTE over 6 years 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
Actions #6

Updated by Nicolas CHARLES over 6 years 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

Actions #7

Updated by Vincent MEMBRÉ over 6 years 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

Actions #8

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.3.0~beta1 to 4.3.0~rc1
Actions #9

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.3.0~rc1 to 4.3.0~rc2
Actions #10

Updated by Nicolas CHARLES over 6 years ago

This is still happening

Actions #11

Updated by François ARMAND over 6 years ago

  • Translation missing: en.field_tag_list 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.

Actions #12

Updated by Benoît PECCATTE over 6 years ago

  • Assignee set to Vincent MEMBRÉ
Actions #13

Updated by Benoît PECCATTE over 6 years ago

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

Updated by Nicolas CHARLES over 6 years 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" 

Actions #15

Updated by Nicolas CHARLES over 6 years 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>

Actions #16

Updated by Nicolas CHARLES over 6 years ago

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

Actions #17

Updated by Nicolas CHARLES over 6 years 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

Actions #18

Updated by Nicolas CHARLES over 6 years 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);});

Actions #19

Updated by François ARMAND over 6 years 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)
Actions #20

Updated by François ARMAND over 6 years 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

Actions #21

Updated by Nicolas CHARLES over 6 years ago

  • Assignee changed from Nicolas CHARLES to François ARMAND
Actions #22

Updated by François ARMAND over 6 years ago

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

Actions #23

Updated by François ARMAND over 6 years 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
Actions #24

Updated by François ARMAND over 6 years ago

  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
Actions #25

Updated by François ARMAND over 6 years 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.

Actions #26

Updated by François ARMAND over 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #27

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from Pending release to Released

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

Actions

Also available in: Atom PDF