[ 
https://issues.apache.org/jira/browse/AMBARI-26561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Prabhjyot Singh updated AMBARI-26561:
-------------------------------------
    Description: 
After upgrading *jQuery to 3.7.1* and updating {{{}jquery-migrate.js{}}}, the 
Ambari UI fails to render the *Hosts* page.
The failure occurs because {*}{{$.browser}} was removed from jQuery starting 
from version 1.9{*}, and the legacy plugin code in {{jquery.typeahead.js}} 
still depends on browser detection logic like {{{}$.browser.chrome{}}}.

This results in a runtime error and breaks initialization of the Typeahead 
component.
----
h2. *Error Trace:*
{code:java}
Uncaught TypeError: Cannot read properties of undefined (reading 'chrome')
    at Typeahead.listen (vendor.js:71966:21)
    at new Typeahead (vendor.js:71828:10)
    at HTMLInputElement.<anonymous> (vendor.js:72061:50)
    at ce.each (vendor.js:316:26)
    at obj.<computed>.each (vendor.js:205:19)
    at $.fn.typeahead (vendor.js:72057:17)
    at Class.didInsertElement (app.js:211853:30)
    at Class.newFunc [as didInsertElement] (vendor.js:9028:16)
    at Class.trigger (vendor.js:21579:21)
    at Class.newFunc [as trigger] (vendor.js:9028:16){code}
----
h2. *Root Cause:*
 * The plugin located at:
*{{ambari-web/vendor/scripts/jquery.typeahead.js}}*
uses {*}deprecated browser sniffing{*}:

{code:java}
if ($.browser.chrome) { ... }{code}

 
 * {{$.browser}} does *not exist* in jQuery ≥ 1.9 and is *fully removed* by 3.x.

 * The jQuery Migrate plugin no longer restores {{$.browser}} as of modern 
versions.

  was:
After upgrading *jQuery to 3.7.1* and updating {{{}jquery-migrate.js{}}}, the 
Ambari UI fails to render the *Hosts* page.
The failure occurs because {*}{{$.browser}} was removed from jQuery starting 
from version 1.9{*}, and the legacy plugin code in {{jquery.typeahead.js}} 
still depends on browser detection logic like {{{}$.browser.chrome{}}}.

This results in a runtime error and breaks initialization of the Typeahead 
component.
----
h2. *Error Trace:*

```

Uncaught TypeError: Cannot read properties of undefined (reading 'chrome')
    at Typeahead.listen (vendor.js:71966:21)
    at new Typeahead (vendor.js:71828:10)
    at HTMLInputElement.<anonymous> (vendor.js:72061:50)
    at ce.each (vendor.js:316:26)
    at obj.<computed>.each (vendor.js:205:19)
    at $.fn.typeahead (vendor.js:72057:17)
    at Class.didInsertElement (app.js:211853:30)
    at Class.newFunc [as didInsertElement] (vendor.js:9028:16)
    at Class.trigger (vendor.js:21579:21)
    at Class.newFunc [as trigger] (vendor.js:9028:16)
```
----
h2. *Root Cause:*
 * The plugin located at:
*{{ambari-web/vendor/scripts/jquery.typeahead.js}}*
uses {*}deprecated browser sniffing{*}:
if ($.browser.chrome) \{ ... }
 
 
 * {{$.browser}} does *not exist* in jQuery ≥ 1.9 and is *fully removed* by 3.x.

 * The jQuery Migrate plugin no longer restores {{$.browser}} as of modern 
versions.


> Ambari UI Fails to Display Hosts
> --------------------------------
>
>                 Key: AMBARI-26561
>                 URL: https://issues.apache.org/jira/browse/AMBARI-26561
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-web
>    Affects Versions: 2.7.9
>            Reporter: Prabhjyot Singh
>            Assignee: Prabhjyot Singh
>            Priority: Major
>
> After upgrading *jQuery to 3.7.1* and updating {{{}jquery-migrate.js{}}}, the 
> Ambari UI fails to render the *Hosts* page.
> The failure occurs because {*}{{$.browser}} was removed from jQuery starting 
> from version 1.9{*}, and the legacy plugin code in {{jquery.typeahead.js}} 
> still depends on browser detection logic like {{{}$.browser.chrome{}}}.
> This results in a runtime error and breaks initialization of the Typeahead 
> component.
> ----
> h2. *Error Trace:*
> {code:java}
> Uncaught TypeError: Cannot read properties of undefined (reading 'chrome')
>     at Typeahead.listen (vendor.js:71966:21)
>     at new Typeahead (vendor.js:71828:10)
>     at HTMLInputElement.<anonymous> (vendor.js:72061:50)
>     at ce.each (vendor.js:316:26)
>     at obj.<computed>.each (vendor.js:205:19)
>     at $.fn.typeahead (vendor.js:72057:17)
>     at Class.didInsertElement (app.js:211853:30)
>     at Class.newFunc [as didInsertElement] (vendor.js:9028:16)
>     at Class.trigger (vendor.js:21579:21)
>     at Class.newFunc [as trigger] (vendor.js:9028:16){code}
> ----
> h2. *Root Cause:*
>  * The plugin located at:
> *{{ambari-web/vendor/scripts/jquery.typeahead.js}}*
> uses {*}deprecated browser sniffing{*}:
> {code:java}
> if ($.browser.chrome) { ... }{code}
>  
>  * {{$.browser}} does *not exist* in jQuery ≥ 1.9 and is *fully removed* by 
> 3.x.
>  * The jQuery Migrate plugin no longer restores {{$.browser}} as of modern 
> versions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to