Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog error messages #2813

Closed
bmw opened this issue Apr 11, 2016 · 8 comments
Closed

Dialog error messages #2813

bmw opened this issue Apr 11, 2016 · 8 comments

Comments

@bmw
Copy link
Member

bmw commented Apr 11, 2016

I haven't taken the time to dig into this, but letsencrypt loses the content of dialog error messages. I caused an error by making my terminal too small to display the dialog widget (see #2812). When doing this, the output to my terminal was:

An unexpected error occurred:
DialogError

The contents of my logfile were:

2016-04-11 18:31:36,104:DEBUG:letsencrypt.main:Root logging level set at 30
2016-04-11 18:31:36,105:INFO:letsencrypt.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2016-04-11 18:31:36,105:DEBUG:letsencrypt.main:letsencrypt version: 0.6.0.dev0
2016-04-11 18:31:36,105:DEBUG:letsencrypt.main:Arguments: []
2016-04-11 18:31:36,106:DEBUG:letsencrypt.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#nginx,PluginEntryPoint#standalone,PluginEntryPoint#manual,PluginEntryPoint#webroot,PluginEntryPoint#apache,PluginEntryPoint#null)
2016-04-11 18:31:36,109:DEBUG:letsencrypt.plugins.selection:Requested authenticator None and installer None
2016-04-11 18:31:36,430:DEBUG:letsencrypt.plugins.disco:No installation (PluginEntryPoint#nginx): 
Traceback (most recent call last):
  File "/root/letsencrypt/letsencrypt/plugins/disco.py", line 104, in prepare
    self._initialized.prepare()
  File "/root/letsencrypt/letsencrypt-nginx/letsencrypt_nginx/configurator.py", line 115, in prepare
    raise errors.NoInstallationError
NoInstallationError
2016-04-11 18:31:36,430:DEBUG:letsencrypt.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server - Alpha
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: apache = letsencrypt_apache.configurator:ApacheConfigurator
Initialized: <letsencrypt_apache.configurator.ApacheConfigurator object at 0x7fc63206bc10>
Prep: True
2016-04-11 18:31:36,431:DEBUG:letsencrypt.plugins.selection:Selected authenticator <letsencrypt_apache.configurator.ApacheConfigurator object at 0x7fc63206bc10> and installer <letsencrypt_apache.configurator.ApacheConfigurator object at 0x7fc63206bc10>
2016-04-11 18:31:38,909:DEBUG:letsencrypt.main:Exiting abnormally:
Traceback (most recent call last):
  File "/root/letsencrypt/venv/bin/letsencrypt", line 9, in <module>
    load_entry_point('letsencrypt', 'console_scripts', 'letsencrypt')()
  File "/root/letsencrypt/letsencrypt/main.py", line 692, in main
    return config.func(config, plugins)
  File "/root/letsencrypt/letsencrypt/main.py", line 452, in run
    domains = _find_domains(config, installer)
  File "/root/letsencrypt/letsencrypt/main.py", line 261, in _find_domains
    domains = display_ops.choose_names(installer)
  File "/root/letsencrypt/letsencrypt/display/ops.py", line 100, in choose_names
    return _choose_names_manually()
  File "/root/letsencrypt/letsencrypt/display/ops.py", line 150, in _choose_names_manually
    cli_flag="--domains")
  File "/root/letsencrypt/letsencrypt/display/util.py", line 146, in input
    return self.dialog.inputbox(message, width=self.width, height=height)
  File "/root/letsencrypt/venv/local/lib/python2.7/site-packages/dialog.py", line 2715, in inputbox
    kwargs, strip_xdialog_newline=True, raw_help=True)
  File "/root/letsencrypt/venv/local/lib/python2.7/site-packages/dialog.py", line 1746, in _widget_with_string_output
    code, output = self._perform(args, **kwargs)
  File "/root/letsencrypt/venv/local/lib/python2.7/site-packages/dialog.py", line 1541, in _perform
    args_file)
  File "/root/letsencrypt/venv/local/lib/python2.7/site-packages/dialog.py", line 1502, in _handle_program_exit
    child_output_rfd)
  File "/root/letsencrypt/venv/local/lib/python2.7/site-packages/dialog.py", line 1454, in _wait_for_program_termination
    child_output.strip()))
DialogError
@TheNavigat
Copy link
Contributor

TheNavigat commented May 25, 2016

18:23 <+bmw> For #2813, look at _handle_exception in main.py
18:23 <+bmw> It's an ugly function, but the idea is basically to get the information out of an exception and log it, instead of letting every
exception propogate and be shown to the user.
18:24 <+bmw> Dialog does something weird with their exceptions and we lose the message attached to them for some reason.

@pangolingo
Copy link

I experienced this DialogError also when by terminal window was not tall enough. Instead of failing with an error, it should either ask the user to resize their terminal window, or it should work with a shorter window.

@bmw
Copy link
Member Author

bmw commented Jun 3, 2016

See #2812.

@jsachs
Copy link
Contributor

jsachs commented Jul 9, 2016

@pangolingo are you still running into this issue? If so, can you list the details of your shell/terminal setup?

@pangolingo
Copy link

@jsachs I haven't had a chance to test. You can leave it closed and I'll add a comment whenever I do end up testing it.

@bmw
Copy link
Member Author

bmw commented Jul 19, 2016

This was fixed in #3068, however, the fix hasn't been released yet. It'll be included in our 0.9.0 release.

@jsachs
Copy link
Contributor

jsachs commented Jul 19, 2016

@bmw looks like the error text problem was fixed in #3068, but that's not what removed the error from happening in the first place, is it?

@bmw
Copy link
Member Author

bmw commented Jul 19, 2016

Right. I made this issue to track the losing DialogError contents and #2812 to address the terminal size issue.

@pde pde removed the has pr label Aug 13, 2016
@pde pde removed the has pr label Oct 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants