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

Authentication failure is obscured by HTML parsing error. #24

Closed
wgnoehring opened this issue Jul 27, 2021 · 4 comments
Closed

Authentication failure is obscured by HTML parsing error. #24

wgnoehring opened this issue Jul 27, 2021 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@wgnoehring
Copy link
Contributor

I have a problem where dtool_lookup_gui is able to connect to the lookup server, but then authentication fails in a second step.
The following message is displayed in the top bar:
0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf8', url=URL( <loopup server url>)

The problem seems to be server_config in MainApplication.py. There is some kind of authentication failure. Instead of a
valid configuration, the variable is set to the following HTML code string:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>401 Unauthorized</title> <h1>Unauthorized</h1> <p>The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.</p>

It seems that failure to parse this HTML code leads to the aforementioned message in the top bar, which obscures the problem.

Note that if I simply set a wrong username or password, dtool_lookup_gui shows Authentication failed in the info bar at the top.

@wgnoehring
Copy link
Contributor Author

The authentication problem is likely just a problem with my account, but the parsing error obscures the problem. The HTML error message is never shown on the terminal or in the UI.

@wgnoehring
Copy link
Contributor Author

wgnoehring commented Jul 27, 2021

The following error message is printed on the terminal:

Task exception was never retrieved
future: <Task finished name='Task-1' coro=<SignalHandler.connect() done, defined at /home/wnoehring/.local/lib/python3.9/site-packages/dtool_lookup_gui/MainApplication.py:343> exception=TypeError('string indices must be integers')>
Traceback (most recent call last):
  File "/home/<user>/.local/lib/python3.9/site-packages/dtool_lookup_gui/MainApplication.py", line 362, in connect
    self._refresh_results()
  File "/home/<user>/.local/lib/python3.9/site-packages/dtool_lookup_gui/MainApplication.py", line 240, in _refresh_results
    f"{self.server_config['version']}")
TypeError: string indices must be integers

@pastewka pastewka added this to the 0.5.0 milestone Dec 16, 2021
@pastewka
Copy link
Contributor

Is this still an issue. @jotelha added a log window that may show more information.

@pastewka pastewka added the bug Something isn't working label Feb 21, 2022
@jotelha jotelha modified the milestones: 0.6.0, 0.7.0 Jul 3, 2023
@jotelha
Copy link
Member

jotelha commented Sep 4, 2023

This should not be an issue anymore. On authentication failure, login window pops up now, #256

@jotelha jotelha closed this as completed Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants