You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2021/03/12 12:12:00 UTC

[jira] [Resolved] (FELIX-6392) Webconsole configadmin javascript error: Uncaught TypeError: parsers is undefined

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

Carsten Ziegeler resolved FELIX-6392.
-------------------------------------
    Resolution: Fixed

The mentioned javascript error only occurs if there are no configurations and if there is no metatype service (or data) available.
I fixed that error by not invoking the table sorter if no configurations are available.

If no configurations are available and no metatype service (data) is available, the table will be empty - this is expected. I've now enhanced the statusline to also mention whether a metatype service is available and if configurations are available.

https://github.com/apache/felix-dev/commit/90eee7459c45994b7513c02f995438aa8f6430e8

> Webconsole configadmin javascript error: Uncaught TypeError: parsers is undefined
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-6392
>                 URL: https://issues.apache.org/jira/browse/FELIX-6392
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>            Reporter: Jorrit Nutma
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: webconsole-4.6.2
>
>         Attachments: Screenshot_20210303_170011.png, image-2021-03-11-19-37-00-425.png
>
>
> We've been using the Felix Webconsole a lot, in particular because it provides a nice UI for Felix Configadmin. Now we're upgrading our software and running into a problem that occurs in (although it might not originate from) the webconsole.
>   
>  We started out with the example workspace of bndtools ([https://github.com/bndtools/workspace]). Added a very simple API project and an implementation project. In the implementation project we define a declarative service component using the OSGi 7.0 annotations.
>   
>   But when going to the Configuration page ([http://localhost:8080/system/console/configMgr]), the configuration list stays empty and the webbrowser console shows a Javascript error:
> {noformat}
> jquery-3.5.1.js:2 Uncaught TypeError: Cannot read property '1' of undefined
>  at getCachedSortType (jquery.tablesorter-2.0.3.js:2)
>  at multisort (jquery.tablesorter-2.0.3.js:2)
>  at HTMLTableElement.<anonymous> (jquery.tablesorter-2.0.3.js:2)
>  at HTMLTableElement.dispatch (jquery-3.5.1.js:2)
>  at HTMLTableElement.v.handle (jquery-3.5.1.js:2)
>  at Object.trigger (jquery-3.5.1.js:2)
>  at HTMLTableElement.<anonymous> (jquery-3.5.1.js:2)
>  at Function.each (jquery-3.5.1.js:2)
>  at s.fn.init.each (jquery-3.5.1.js:2)
>  at s.fn.init.trigger (jquery-3.5.1.js:2){noformat}
> The weird thing is... even if I downgrade the webconsole bundles to the versions that I have been using without problems for years, I get the same error. It also appears with the latest versions of the webconsole and configadmin from [https://repo.maven.apache.org/maven2/] The cause of the problem somehow doesn't seem to be in the web console implementation itself.
>   
>  Here follows the content of my bndrun file:
>   
> {noformat}
> -runfw: org.eclipse.osgi;version=3.13
> -runprovidedcapabilities: ${native_capability}
> -resolve.effective: active
> -runproperties: \
>  org.osgi.service.http.port=8080
> -runbundles: \
>  org.apache.commons.io;version='[2.6.0,2.6.1)',\
>  org.apache.felix.http.jetty;version='[4.0.6,4.0.7)',\
>  org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
>  org.apache.felix.scr;version='[2.1.10,2.1.11)',\
>  org.example.api;version=snapshot,\
>  org.example.impl;version=snapshot,\
>  org.apache.commons.commons-fileupload;version='[1.4.0,1.4.1)',\
>  org.apache.felix.inventory;version='[1.0.4,1.0.5)',\
>  org.osgi.util.function;version='[1.1.0,1.1.1)',\
>  org.apache.felix.configadmin;version='[1.9.8,1.9.9)',\
>  org.apache.felix.webconsole;version='[4.3.4,4.3.5)',\
>  org.apache.felix.webconsole.plugins.ds;version='[2.0.8,2.0.9)'
> -runrequires: \
>  bnd.identity;version='latest';id='org.example.impl',\
>  bnd.identity;id='org.apache.felix.http.jetty',\
>  bnd.identity;id='org.apache.felix.configadmin',\
>  bnd.identity;id='org.apache.felix.webconsole',\
>  bnd.identity;id='org.apache.felix.webconsole.plugins.ds'
> -runee: JavaSE-11
> -resolve: manual
> {noformat}
> And I've also tried it with the latest bundles from [https://repo.maven.apache.org/maven2/]
>  
> {noformat}
> bnd.identity;version='4.6.0';id='org.apache.felix.webconsole',\
> bnd.identity;version='2.0.8';id='org.apache.felix.webconsole.plugins.ds',\
> bnd.identity;version='1.9.20';id='org.apache.felix.configadmin'
> {noformat}
> The javascript error occurs both in Firefox and Chromium and it looks to be the same error as reported https://issues.apache.org/jira/browse/FELIX-2715
> We would really appreciate some help with this. Can you replicate the issue and do you have a clue what it causes? And how it can be fixed?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)