"Malformed url" error when protocol is not defined in URL (OD-1457)
Kaye Gadberry opened 3 years ago

I've set up OneDev on a local machine using Docker and changed initial_url after it had already initialized. When visiting the server for the first time after updating the URL, I'm prompted to "Specify root URL to access this server". I've entered the URL dev.kaye.lol that points to the server (which I used to get to that page) and trying to submit it returns a "Malformed url" error.

Screenshot_20230709_103713.png

This is really vague, and after some more troubleshooting I discovered that it works fine if the server is created with the URL specified initially, but other things break like when attempting to enable 2FA, the QR code doesn't load.

Screenshot_20230709_110421.png

Going to the image URL gets an error page with the log here: https://gist.github.com/kgadberry/055283ae9f04807ad1b8f348080e46cb

Reading the log indicates that the protocol is not specified. Specifying the protocol (https://) in the URL fixes the issues, but it would be a lot easier if that was mentioned in the first place. The documentation doesn't indicate anywhere that I can see that the URL needs to include the protocol, and the first error message does not either.

I would propose making the error messages more clear, and updating the documentation accordingly. Possibly adjust the startup behavior to fail if the protocol is not specified in initial_url.

  • OneDev changed state to 'Closed' 3 years ago
    Previous Value Current Value
    Open
    Closed
  • OneDev commented 3 years ago

    State changed as code fixing the issue is committed (96d8fcc4)

  • OneDev changed state to 'Released' 3 years ago
    Previous Value Current Value
    Closed
    Released
  • OneDev commented 3 years ago

    State changed as build #3892 is successful

issue 1/1
Type
Improvement
Priority
Minor
Assignee
Issue Votes (0)
Watchers (4)
Reference
OD-1457
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover