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

Getting "Error 500" with no error message when logging in #17

Open
elgiad007 opened this issue May 29, 2021 · 0 comments
Open

Getting "Error 500" with no error message when logging in #17

elgiad007 opened this issue May 29, 2021 · 0 comments

Comments

@elgiad007
Copy link

Hello,

I installed the plugin, generated a hash, and added the user information to my metadata.json file. Whenever I enter my account information and click the "Log In" button I am taken to the standard "Error 500" page with no information in the red box to indicate what the error is. In the Datasette output, all I see is this:

INFO: 192.168.1.1:4240 - "POST /-/login HTTP/1.1" 500 Internal Server Error

I am running Datasette on a Windows 10 desktop. Here is the script that launches Datasette (some things replaced to avoid exposure):

@echo off
set PASSWORD_HASH_replacedusername="<hash generated by plugin and surrounded by double quotes>"
datasette <path to db file> --metadata metadata.json -h 0.0.0.0 --ssl-keyfile <path to key file> --ssl-certfile <path to cert file> >> datasette.log 2>&1

I did try surrounding the hash value in the above script with single-quotes instead of double-quotes, to no effect.

Here is the output of "/-/plugins":

[
    {
        "name": "datasette-permissions-sql",
        "static": false,
        "templates": false,
        "version": "0.3a0",
        "hooks": [
            "permission_allowed"
        ]
    },
    {
        "name": "datasette-backup",
        "static": false,
        "templates": false,
        "version": "0.1",
        "hooks": [
            "register_routes"
        ]
    },
    {
        "name": "datasette-vega",
        "static": true,
        "templates": false,
        "version": "0.6.2",
        "hooks": [
            "extra_css_urls",
            "extra_js_urls"
        ]
    },
    {
        "name": "datasette-json-html",
        "static": false,
        "templates": false,
        "version": "0.6.1",
        "hooks": [
            "prepare_connection",
            "render_cell"
        ]
    },
    {
        "name": "datasette-auth-passwords",
        "static": false,
        "templates": true,
        "version": "0.4",
        "hooks": [
            "actor_from_request",
            "asgi_wrapper",
            "register_routes"
        ]
    },
    {
        "name": "datasette-saved-queries",
        "static": false,
        "templates": false,
        "version": "0.2.1",
        "hooks": [
            "canned_queries",
            "register_magic_parameters",
            "startup"
        ]
    },
    {
        "name": "datasette-search-all",
        "static": false,
        "templates": true,
        "version": "1.0.1",
        "hooks": [
            "extra_template_vars",
            "menu_links",
            "register_routes"
        ]
    }
]

Here is the output of "/-/metadata" (replaced a few values that I didn't want exposed):

{
    "title": "Dokuwiki Struct Database",
    "description": "Browse the contents of the struct.sqlite3 database file on the personal wiki.",
    "plugins": {
        "datasette-auth-existing-cookies": {
            "api_url": "...",
            "auth_redirect_url": "...",
            "original_cookies": [
                "DokuWiki"
            ]
        },
        "datasette-auth-passwords": {
            "replacedusername_password_hash": {
                "$env": "PASSWORD_HASH_replacedusername"
            },
            "actors": {
                "replacedusername": {
                    "id": "replacedusername",
                    "name": "Luc Daigle"
                }
            }
        }
    }
}

Here is the output of "/-/versions":

{
    "python": {
        "version": "3.8.3",
        "full": "3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)]"
    },
    "datasette": {
        "version": "0.56"
    },
    "asgi": "3.0",
    "uvicorn": "0.13.4",
    "sqlite": {
        "version": "3.31.1",
        "fts_versions": [
            "FTS5",
            "FTS4",
            "FTS3"
        ],
        "extensions": {},
        "compile_options": [
            "COMPILER=msvc-1925",
            "ENABLE_FTS4",
            "ENABLE_FTS5",
            "THREADSAFE=1"
        ]
    }
}

Any help/insight you can offer would be appreciated. Thanks!

Luc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant