• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • Jenkins 1.609 invoked via OpenJava 1.7.0_75 (using java -jar jenkins.war [options]) running on Red Hat Enterprise Linux Server release 6.6

      When I navigate to the Update Center page on my Jenkins installation (Manage Jenkins -> Manage Plugins -> Advanced) and click the "Check Now" button, an error page appears with a stack trace saying "Unquotted (sic) string 'Arial'".

      I tried in both IE and Firefox and get the same error.

      Below is the full text of the error page:

      A problem occurred while processing the request. Please check our bug tracker to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. The users list might be also useful in understanding what has happened.
      Stack trace

      javax.servlet.ServletException: net.sf.json.JSONException: Unquotted string 'Arial'
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:183)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:123)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
      at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
      at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:99)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:120)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:114)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:168)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:370)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: net.sf.json.JSONException: Unquotted string 'Arial'
      at net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:432)
      at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:955)
      at net.sf.json.JSONObject._fromString(JSONObject.java:1145)
      at net.sf.json.JSONObject.fromObject(JSONObject.java:162)
      at net.sf.json.JSONObject.fromObject(JSONObject.java:132)
      at hudson.model.UpdateSite.updateData(UpdateSite.java:186)
      at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:170)
      at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:890)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:46)
      at org.kohsuke.stapler.Function$InterceptedFunction.invoke(Function.java:399)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      ... 71 more

          [JENKINS-27917] Stack Trace when Checking for Updates

          Daniel Beck added a comment -

          Is Jenkins behind a proxy and you did not configure it on the Advanced tab?

          Daniel Beck added a comment - Is Jenkins behind a proxy and you did not configure it on the Advanced tab?

          Mark Nejman added a comment -

          I see, that appears to be the issue. Thanks!

          Should there be an error check for this so that the error is more informative?

          Mark Nejman added a comment - I see, that appears to be the issue. Thanks! Should there be an error check for this so that the error is more informative?

          Daniel Beck added a comment -

          The error says that the JSON is invalid. What else should it tell you?

          How does a browser behave when you don't configure a proxy? Does it properly error out, or is your network configured to display a "user friendly" intranet web page instead? In the latter case, there's nothing Jenkins can do (except maybe show an excerpt of the returned page content, but given that these usually start with metadata gibberish, it wouldn't be any more helpful I think).

          Daniel Beck added a comment - The error says that the JSON is invalid. What else should it tell you? How does a browser behave when you don't configure a proxy? Does it properly error out, or is your network configured to display a "user friendly" intranet web page instead? In the latter case, there's nothing Jenkins can do (except maybe show an excerpt of the returned page content, but given that these usually start with metadata gibberish, it wouldn't be any more helpful I think).

          Daniel Beck added a comment -

          Proxy config missing, resulting in bogus UC data received, so resulting as Not A Defect.

          Daniel Beck added a comment - Proxy config missing, resulting in bogus UC data received, so resulting as Not A Defect.

          Mark Nejman added a comment -

          I do not agree that this is "not an issue". Error messages are meaningless unless they can indicate the cause of the issue. The (misspelled) error message "Unquotted string 'Arial'" does not in any way imply that the proxy configuration is missing. Please use this bug to fix the error message to display something meaningful to the user. Otherwise the next person who encounters this issue will be re-opening a new bug.

          Mark Nejman added a comment - I do not agree that this is "not an issue". Error messages are meaningless unless they can indicate the cause of the issue. The (misspelled) error message "Unquotted string 'Arial'" does not in any way imply that the proxy configuration is missing. Please use this bug to fix the error message to display something meaningful to the user. Otherwise the next person who encounters this issue will be re-opening a new bug.

          Daniel Beck added a comment -

          Please use this bug to fix the error message to display something meaningful to the user.

          Any improvements to the error message can be done while this issue is resolved/closed. The original issue turned out to not be a bug after all, therefore I closed it. In my experience many reporters don't follow up on discussions in comments, so I prefer to resolve an issue I plan to follow up on to leaving one open indefinitely.

          Otherwise the next person who encounters this issue will be re-opening a new bug.

          No, they'll fix their proxy setup and move on.

          Error messages are meaningless unless they can indicate the cause of the issue. The (misspelled) error message "Unquotted string 'Arial'" does not in any way imply that the proxy configuration is missing.

          Actually, it does. It means instead of update center metadata, Jenkins received something in a different text-based format that includes style data – like a web page.


          I'd still appreciate a response to my earlier comment on what specifically should be improved here, and what your network setup looks like.

          Daniel Beck added a comment - Please use this bug to fix the error message to display something meaningful to the user. Any improvements to the error message can be done while this issue is resolved/closed. The original issue turned out to not be a bug after all, therefore I closed it. In my experience many reporters don't follow up on discussions in comments, so I prefer to resolve an issue I plan to follow up on to leaving one open indefinitely. Otherwise the next person who encounters this issue will be re-opening a new bug. No, they'll fix their proxy setup and move on. Error messages are meaningless unless they can indicate the cause of the issue. The (misspelled) error message "Unquotted string 'Arial'" does not in any way imply that the proxy configuration is missing. Actually, it does. It means instead of update center metadata, Jenkins received something in a different text-based format that includes style data – like a web page. I'd still appreciate a response to my earlier comment on what specifically should be improved here, and what your network setup looks like.

          Mark Nejman added a comment -

          Otherwise the next person who encounters this issue will be re-opening a new bug.

          No, they'll fix their proxy setup and move on.

          And my point is, how do you expect a user to know the issue is their proxy setup when you have a vague, misspelled error message that doesn't in any way indicate this?

          Error messages are meaningless unless they can indicate the cause of the issue. The (misspelled) error message "Unquotted string 'Arial'" does not in any way imply that the proxy configuration is missing.

          Actually, it does. It means instead of update center metadata, Jenkins received something in a different text-based format that includes style data – like a web page.

          Yes I understand that is what is going on. But I don't see how you expect an everyday user to get that from "Unquotted string 'Arial'". Please change the error message to something along the lines of, "Jenkins received an unexpected response. Please check your proxy/network configuration."

          I'd still appreciate a response to my earlier comment on what specifically should be improved here, and what your network setup looks like.

          The network does indeed redirect to a page with a user-friendly response. What should be improved is the error message displayed to the end user. Instead of a vague misspelled JSON parsing error, it should contain a clear indication that Jenkins received an unexpected response from the update center request, and that the user should check their network configuration.

          Mark Nejman added a comment - Otherwise the next person who encounters this issue will be re-opening a new bug. No, they'll fix their proxy setup and move on. And my point is, how do you expect a user to know the issue is their proxy setup when you have a vague, misspelled error message that doesn't in any way indicate this? Error messages are meaningless unless they can indicate the cause of the issue. The (misspelled) error message "Unquotted string 'Arial'" does not in any way imply that the proxy configuration is missing. Actually, it does. It means instead of update center metadata, Jenkins received something in a different text-based format that includes style data – like a web page. Yes I understand that is what is going on. But I don't see how you expect an everyday user to get that from "Unquotted string 'Arial'". Please change the error message to something along the lines of, "Jenkins received an unexpected response. Please check your proxy/network configuration." I'd still appreciate a response to my earlier comment on what specifically should be improved here, and what your network setup looks like. The network does indeed redirect to a page with a user-friendly response. What should be improved is the error message displayed to the end user. Instead of a vague misspelled JSON parsing error, it should contain a clear indication that Jenkins received an unexpected response from the update center request, and that the user should check their network configuration.

          Daniel Beck added a comment -

          And my point is, how do you expect a user to know the issue is their proxy setup when you have a vague, misspelled error message that doesn't in any way indicate this?

          I read 're-opening' to mean reading and reopening this specific issue, which contains the solution in the comments.

          Please change the error message to something along the lines of, "Jenkins received an unexpected response. Please check your proxy/network configuration."

          The problem here is that this requires an assumption such as 'all invalid JSON responses are due to no proxy being set up', something I doubt is reasonably accurate. There can be any number of reasons. (In fact, the redirect seems to be fairly braindead to me, as it'll break all kinds of tools not used interactively. It should at least set some HTTP error code in the response so automated tools know to fail.)

          Do you think it would it help to wrap the error in a more generic 'failed to parse JSON update center metadata', and maybe show an excerpt of the data?

          Daniel Beck added a comment - And my point is, how do you expect a user to know the issue is their proxy setup when you have a vague, misspelled error message that doesn't in any way indicate this? I read 're-opening' to mean reading and reopening this specific issue, which contains the solution in the comments. Please change the error message to something along the lines of, "Jenkins received an unexpected response. Please check your proxy/network configuration." The problem here is that this requires an assumption such as 'all invalid JSON responses are due to no proxy being set up', something I doubt is reasonably accurate. There can be any number of reasons. (In fact, the redirect seems to be fairly braindead to me, as it'll break all kinds of tools not used interactively. It should at least set some HTTP error code in the response so automated tools know to fail.) Do you think it would it help to wrap the error in a more generic 'failed to parse JSON update center metadata', and maybe show an excerpt of the data?

          Daniel Beck added a comment -

          The best option would be to enforce a connection check similar to what the update center does before installing, IF that check is enhanced to include a check for the returned page contents, similar to what Windows does (http://www.msftncsi.com/ncsi.txt).

          Unfortunately, that will not work with self-hosted update centers and Jenkins instances not meant to access the internet, even breaking them.

          Daniel Beck added a comment - The best option would be to enforce a connection check similar to what the update center does before installing, IF that check is enhanced to include a check for the returned page contents, similar to what Windows does ( http://www.msftncsi.com/ncsi.txt ). Unfortunately, that will not work with self-hosted update centers and Jenkins instances not meant to access the internet, even breaking them.

          Mark Nejman added a comment -

          The problem here is that this requires an assumption such as 'all invalid JSON responses are due to no proxy being set up', something I doubt is reasonably accurate. There can be any number of reasons. (In fact, the redirect seems to be fairly braindead to me, as it'll break all kinds of tools not used interactively. It should at least set some HTTP error code in the response so automated tools know to fail.)

          Do you think it would it help to wrap the error in a more generic 'failed to parse JSON update center metadata', and maybe show an excerpt of the data?

          Yes, I understand, you don't want to write error messages that are guessing what the issue is. I do think your proposed error message would be clear though.

          Mark Nejman added a comment - The problem here is that this requires an assumption such as 'all invalid JSON responses are due to no proxy being set up', something I doubt is reasonably accurate. There can be any number of reasons. (In fact, the redirect seems to be fairly braindead to me, as it'll break all kinds of tools not used interactively. It should at least set some HTTP error code in the response so automated tools know to fail.) Do you think it would it help to wrap the error in a more generic 'failed to parse JSON update center metadata', and maybe show an excerpt of the data? Yes, I understand, you don't want to write error messages that are guessing what the issue is. I do think your proposed error message would be clear though.

            Unassigned Unassigned
            mnejman Mark Nejman
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: