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
Can't use a wger instance running on a sub-url #193
Comments
Hi! Yes, this is a use case that was never tested, so I'm not surprised it breaks stuff (does the regular web app work fine on a sub path?). I'll try to setup this these days |
I was able to login as admin and change password. Did not tested the app extensively, but suppose that everything is OK - at least, I've ensured that links point to correct URLs (including sub-url). The only issue that I have noticed - after login you are redirected to clear domain URL instead of sub-url.
Thanks! |
Closed with #192 |
hate to necro bump but I'm getting this same error but with a subdomain'd server. Web interface works great just can't login to the mobile app. Happy to create a separate issue but wanted to ping here first. |
hi @gregflynn , a subdomain should make even less problems. What error are you getting? |
oh wait, you can't login with the mobile app, I think I know what that is |
Same steps to reproduce as this issue with the difference being
Awesome, I looked at the PR for resolving this original issue and would have though it would have resolved this subdomain issue too |
so I think we broke the app login with the new brute force login detection (wger-project/wger#1163), but you can just disable that by setting |
Confirmed! Will take discussion there |
Steps to Reproduce
FormatException: Unexpected character (at character 1) <!DOCTYPE HTML PUBLIC ...
.Expected results:
Successful login.
Actual results:
A FormatException error message.
Investigation
I inspected my Apache 2 webserver logs and it turns out that the mobile app just removes sub-url (tries to access
server.name/api/v2/login
instead ofserver.name/wger/api/v2/login
) and that's why gets error 404 instead of a json with a response. To fix the problem, we need to altermakeUri
function (see https://github.com/wger-project/flutter/blob/master/lib/providers/helpers.dart#L20). I'm not a flutter developer, I don't know Dart and I don't have time to setup a development environment, but I suppose that the following fix should work:Created a PR #192. @rolandgeider Please consider reviewing and merging it. Thanks!
The text was updated successfully, but these errors were encountered: