Project

General

Profile

Actions

Bug #14573

closed

JS error in rule pages, and Directives don't show in the list of directives

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

Status:
Released
Priority:
N/A
Category:
Web - UI & UX
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
First impressions of Rudder
Effort required:
Priority:
124
Name check:
Fix check:
Regression:

Description

JS error is

Error: [$parse:syntax] http://errors.angularjs.org/1.5.8/$parse/syntax?p0=.&p1=is%20unexpected%2C%20expecting%20%5B%7D%5D&p2=6&p3=%7Bvars.my_company.machine_info.datacenter&p4=.my_company.machine_info.datacenter
N/<@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:6:412
throwError@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:230:78
consume@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:230:246
object@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:229:486
primary@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:225:498
unary@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:225:337
multiplicative@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:225:83
additive@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:224:425
relational@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:224:260
equality@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:224:85
logicalAND@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:223:440
logicalOR@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:223:287
ternary@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:223:82
assignment@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:222:442
expression@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:222:395
filterChain@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:222:303
expressionStatement@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:222:249
program@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:222:96
ast@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:221:398
compile@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:231:313
parse@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:260:78
g@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:125:383
k@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:105:251
ia@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:79:102
$b@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:61:107
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:78
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
s@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:59:253
aa@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:57:108
c/</<@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:21:4
$eval@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:145:343
$apply@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:146:47
c/<@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:20:486
invoke@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:41:454
c@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:20:407
Bc@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js:21:179
@https://192.168.41.2/rudder/secure/configurationManager/ruleManagement#%7B%22ruleId%22:%2232377fd7-02fd-43d0-aab7-28460a91347b%22%7D:118:13
j@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/jquery/jquery-3.1.0.min.js:2:29566
g/</k<@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/jquery/jquery-3.1.0.min.js:2:29882
angular.min.js:118:8
jQuery.Deferred exception: ruleDirectiveScope is undefined @https://192.168.41.2/rudder/secure/configurationManager/ruleManagement#%7B%22ruleId%22:%2232377fd7-02fd-43d0-aab7-28460a91347b%22%7D:121:11
j@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/jquery/jquery-3.1.0.min.js:2:29566
g/</k<@https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/jquery/jquery-3.1.0.min.js:2:29882
 undefined jquery-3.1.0.min.js:2:31135
Erreur dans les liens source : request failed with status 404
URL de la ressource : https://192.168.41.2/rudder/cache-5.0.9-SNAPSHOT/javascript/angular/angular.min.js
URL du lien source : angular.min.js.map[En savoir plus]
TypeError: ruleDirectiveScope is undefined[En savoir plus]


Files

Capture du 2019-04-02 15-30-57.png (32.2 KB) Capture du 2019-04-02 15-30-57.png Nicolas CHARLES, 2019-04-02 15:31

Related issues 1 (0 open1 closed)

Related to Rudder - User story #14536: New display of Directives and Groups in Rule detailsReleasedVincent MEMBRÉActions
Actions #1

Updated by François ARMAND over 5 years ago

The message tells that the problem is with:

[{vars.my_company.machine_info.datacenter] starting at [.my_company.machine_info.datacenter].

It looks like a node property, and in that case a not correctly escapped one.

Actions #2

Updated by Raphael GAUTHIER over 5 years ago

  • Status changed from New to In progress
  • Assignee set to Raphael GAUTHIER
Actions #3

Updated by Raphael GAUTHIER over 5 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Raphael GAUTHIER to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/2173
Actions #4

Updated by François ARMAND over 5 years ago

Actually the proble is in the documentation of some generic method: for example, in variableFromJsonFile generic method description, there is:

For example a JSON containing { "datacenter": "paris" } read into the variable "machine_info" with prefix
"my_company" can be used as ${my_company.machine_info[datacenter]}. Note that the syntax will differ in
a mustache template: {{{vars.my_company.machine_info.datacenter}}}
Actions #5

Updated by Raphael GAUTHIER over 5 years ago

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

Updated by François ARMAND over 5 years ago

  • Related to User story #14536: New display of Directives and Groups in Rule details added
Actions #7

Updated by Vincent MEMBRÉ over 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.9 which was released today.

Actions

Also available in: Atom PDF