Project

General

Profile

Bug #30669

New GUI system/support fixes

Added by Eric Loewenthal over 2 years ago. Updated over 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Vaibhav Chauhan
Category:
GUI (new)
Severity:
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

While trying stuff out for ticket #28140, I came across the following issues:

  1. Trying to send an invalid ticket (e.g. the category field is unset) still establishes a connection to support-proxy.ixsystems.com, which seems rather nonsensical
  2. The error message telling me to fill out the missing fields looks weird (see image). It's very empty, the error message is poorly-formatted and tending slightly towards the cryptic side of things. Changing it to "The following fields must be filled out:" followed by the list of missing fields might be better.
  3. The category field does not even seem to work at all. I don't get a drop-down list.
  4. Trying to send a ticket (at least an invalid one as above) results in a traceback:
    Error: Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket
        cnx.do_handshake()
      File "/usr/local/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1426, in do_handshake
        self._raise_ssl_error(self._ssl, result)
      File "/usr/local/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1174, in _raise_ssl_error
        _raise_current_error()
      File "/usr/local/lib/python3.6/site-packages/OpenSSL/_util.py", line 48, in exception_from_error_queue
        raise exception_type(errors)
    OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
        chunked=chunked)
      File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
        self._validate_conn(conn)
      File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
        conn.connect()
      File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 326, in connect
        ssl_context=context)
      File "/usr/local/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
        return context.wrap_socket(sock, server_hostname=server_hostname)
      File "/usr/local/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 448, in wrap_socket
        raise ssl.SSLError('bad handshake: %r' % e)
    ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
        timeout=timeout
      File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
        _stacktrace=sys.exc_info()[2])
      File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='support-proxy.ixsystems.com', port=443): Max retries exceeded with url: /freenas/api/v1.0/categories (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/support.py", line 54, in fetch_categories
        timeout=10,
      File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 112, in post
        return request('post', url, data=data, json=json, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
        return session.request(method=method, url=url, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 502, in request
        resp = self.send(prep, **send_kwargs)
      File "/usr/local/lib/python3.6/site-packages/raven/breadcrumbs.py", line 294, in send
        resp = real_send(self, request, *args, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 612, in send
        r = adapter.send(request, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 504, in send
        raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: HTTPSConnectionPool(host='support-proxy.ixsystems.com', port=443): Max retries exceeded with url: /freenas/api/v1.0/categories (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 151, in call_method
        result = await self.middleware.call_method(self, message)
      File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
        return self.gen.throw(type, value, traceback)
      File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 941, in call_method
        return await self._call(message['method'], serviceobj, methodobj, params, app=app)
      File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
        return self.gen.throw(type, value, traceback)
      File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 908, in _call
        return await self.run_in_thread(methodobj, *args)
      File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
        return self.gen.throw(type, value, traceback)
      File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 850, in run_in_thread
        return await self.run_in_executor(self.__threadpool, method, *args, **kwargs)
      File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
        return self.gen.throw(type, value, traceback)
      File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 847, in run_in_executor
        return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
      File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 506, in nf
        return f(*args, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/support.py", line 61, in fetch_categories
        raise CallError(f'Connection error {e}', errno.EBADF)
    middlewared.service_exception.CallError: [EBADF] Connection error HTTPSConnectionPool(host='support-proxy.ixsystems.com', port=443): Max retries exceeded with url: /freenas/api/v1.0/categories (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))
    
    

This is on FreeNAS-11-MASTER-201803220838 with Firefox 59.0.1 64-bit on Windows x64

newgui.PNG (121 KB) newgui.PNG Error message - looks weird Eric Loewenthal, 03/24/2018 05:50 PM
15621

History

#1 Updated by Eric Loewenthal over 2 years ago

Forgot something:

5. The text in the header doesn't explicitly tell users where to sign up. Making that sentence "... please register at http://bugs.freenas.org" fixes that.

Also, fixing point 1. effectively turns #28140 into a minor nuisance, instead of a password leak, as nothing can be sent before the whole form is filled out.

#2 Updated by Dru Lavigne over 2 years ago

  • Assignee changed from Release Council to Erin Clark
  • Target version set to 11.2-RC2

#3 Updated by Erin Clark over 2 years ago

  • Assignee changed from Erin Clark to Vaibhav Chauhan

#4 Updated by Vaibhav Chauhan over 2 years ago

  • Status changed from Unscreened to In Progress
  • Assignee changed from Vaibhav Chauhan to Erin Clark

please review: https://github.com/freenas/webui/pull/536

Hi Eric.
for pt3: for populating category field, end user need to be registered at bugs.freenas.org to fetch categories.

#5 Updated by Eric Loewenthal over 2 years ago

I did get a credentials error just now while inputting the bug tracker username and password, so it seems to be doing that. Or rather, trying, because it doesn't actually give me any options, even with correct credentials. The error was also in the form of a traceback, so it really needs to be handled better by the GUI.

I also have to point out that requiring credentials just to grab the categories seems silly and enables password leaks via the autocomplete mechanism.

#6 Updated by Vaibhav Chauhan over 2 years ago

Eric Loewenthal wrote:

I did get a credentials error just now while inputting the bug tracker username and password, so it seems to be doing that. Or rather, trying, because it doesn't actually give me any options, even with correct credentials. The error was also in the form of a traceback, so it really needs to be handled better by the GUI.

can we have the screenshot of error or at least the content of the traceback?

I also have to point out that requiring credentials just to grab the categories seems silly and enables password leaks via the autocomplete mechanism.

it may seem silly but this is how it works and if you feel like this needs to be addressed W/O credentials please open up a middleware ticket.

#7 Updated by Eric Loewenthal over 2 years ago

The error is as follows:

Error 22:[EINVAL] Incorrect username or password
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 151, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 941, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 908, in _call
    return await self.run_in_thread(methodobj, *args)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 850, in run_in_thread
    return await self.run_in_executor(self.__threadpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 847, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 506, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/support.py", line 66, in fetch_categories
    raise CallError(data['message'], errno.EINVAL)
middlewared.service_exception.CallError: [EINVAL] Incorrect username or password

#8 Updated by Dru Lavigne over 2 years ago

  • Assignee changed from Erin Clark to Vaibhav Chauhan
  • Target version changed from 11.2-RC2 to Master - FreeNAS Nightlies
  • Needs Merging changed from Yes to No

Eric: please let us know if the next nightly (tomorrow's) still results in a traceback.

#9 Updated by Vaibhav Chauhan over 2 years ago

  • Status changed from In Progress to Done

traceback is generated really early during the response from middleware call, we would like to devise a way where we could suppress traceback when needed. but as of right now we do not have that yet.

Also available in: Atom PDF