Error Request failed with status code 400 missing or malformed jwt #139
Labels
No Label
dependencies
duplicate
help wanted
invalid
kind/bug
kind/feature
needs reproduction
question
security
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/vikunja#139
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When finnaly install Vikunja with binary file, and correctly set the frontend nginx.
I still keep getting this error message.
It directly caused me cannot register and when I viewing my own Vikunja/login it displays 404.
Please help me, thank you so much in advance.
When I open the port which the backend binded, it just displays not found too.
Why this happened?
Really wanna have a try on Vikunja but this thing holds me back.
Can you show me your nginx configuration?
Am I assuming correctly you mean this message which appears when you acces the frontend for the first time:
That is a bug, it always appears when you're not logged in.
It does not prevent you from logging in though, have you tried registering/logging in despite the error message?
No, it is not 401, it is 400 and the error message is displaying just like the title of this issue. I just delete all the Vikunja files cause I have been working on it for almost whole day and it drives me crazy.
From the shell it displays that the backend api has already worked well. But when I open the backend panel it displays just one sentence:"Not found". And when I type the front end url, although it can redirect to /login automatically, but it still displays error code 400 which means there is something wrong with jwt. I tried jwt code in two versions, one is just leave it without any customization, one is your config example in your offical doc site, neither of them works.
If you need to see the nginx configuration I can reproduce all of this. Please allow me a few minutes.
Is there anything wrong on your MinIO server? Cause now the download speed from my end is extremely slow which is just 10KB/s
What do you get with
?
Download speeds are fine on my end, what speeds do you get normally?
Before install it again, I need to ask you that what should I input in this option?
I tried not to change it and change it as your official doc site config example file and it seems both of them do not working
Just finished downloading it, lets forget this thing first
The
JWTSecret
option is used to sign jwt tokens which the api gives to the user after logging in. You can leave the value empty and Vikunja will randomly generate a new secret every time it is started, that means your users would need to login again each time you restart Vikunja. For testing, it is fine to leave it empty.If you want to use the mailer, you need to change this part
to
Can you reach the instance from the same host with
Also, can you show me your nginx config?
Just finish install the backend and this means it works well right?
This means it is running, yes. But if you still can't reach it from the outside, there's likely something wrong with you nginx config.
https://todo.fanyangmeng.com/
Please have a look on my website, this issue still happens
Sorry I did not see this message last moment, I can get it. Here is the screenshot in the attachment
You need to add
after the
root
keyword to prevent the 404s from happening.Also, you can remove the php-related config, that is not needed.
Take a look at the docs for a minimal example.
I took a look at your instance, it seems to be working correctly apart from the 404s.
However, I got an error 500 when trying to register which could indicate a misconfigured smtp connection. There should be additional output in the Vikunja logs about that.
Hi, thanks for your advice but I have already added the
index index.html index.htm;
to my nginx config, did you miss that? It is on the 6th line。Just tried to make index as what you advice in docs which is
index index.html index.htm;
But nothing changed, still got this error... really weird
Whoops, looks I overlooked it. I meant
try_files $uri $uri/ /;
, sorry.OMG! Sorry that I overlooked this line in the doc and now I finally can log in!!!
Just got error 500 and error 502 too, I think maybe it is the smtp's port misconfiguration. I will change it to 465 and skip verify and try again. Thank you so much!!
I know, I mistakely set the timezone as GMT+8, But if I wanna set timezone as Shanghai Timezone, what should I input? GMT+8:00?
Yes, set
enableregistration
under theservice
section tofalse
.If you did not change the config since posting it, you need to change the log files from
stdout
tofile
, otherwise all the logs will be logged tostdout
by default. You can view them in that case withsystemctl status vikunja
.You should be able to put
Asia/Shanghai
in there, if it is available on your system. You can check the available time zones on your system withls /usr/share/zoneinfo
(assuming a debian-based distro).There should be something in the logs, can you check that?
Thank you for your fast response and efficient support. Now all things are solved and finally I can use it normally.
I am so appreciate your reply, it really helps me a lot.
Also this is really a excellent project. Thank you for opening source of it. I will keep using it definately!
I wanna also report some feature request at the same time actually.
Add Admin panel
Admin can use this panel to manage users, and set other things maybe. But the most important feature is to manage users.
BTW, if you need translate it into other language which will be good for popularize Vikunja, I would like to help you translate it into Chinese.
Just found out that I cannot creat any lists or tasks in Chinese.
If you can make Vikunja support Chinese it will be so much appreciated
Thank you, I really appreciate it!
Thanks, I've noted it on our roadmap.
That would actually be great, I'll ping you once we're ready for translations (That's a feature which would need quite some changes in the frontend, so it's not something happening soon).
You should be able to do that, what database are you using? And in which collation?
Of course. Thank you so much mate and I totally understand you. No rush and just take your time. I will be here immediately whenever you ping me because finally I found such a perfect self-hosted tool and I would be so much hornored to make some contribution.
I am using MySQL in Ubuntu 18.04 LTS. Actually I am not understand "collation", is it meaning the system of my server?
And when I tried to use the Android APP, after I logged in, it just keeps displaying like this. I do not know where the problem is... really weird
The collation is the charset of the mysql server. If you want to store chinese symbols in your database, it should be set to
utf8mb
. The default islatin1
which only supports asccii characters.Take a look at this: https://dba.stackexchange.com/a/104866
The app does not really work at the moment because there were breaking api changes latetly and I did not have the time yet to make the app work with the new version.
Try using the pwa instead (Just visit the frontend with either chrome or Firefox on your phone and it should give you an option to install it to your home screen.
Thank you for your demonstration. But I found that I have already set the database's collation as utf8mb. Please have a look of this screenshot in phpmyadmin.
Yes of course. I know how to use pwa actually but still thank for your explanation.
Actually when using mobile phone's browser, it has some UI problem. Some components are displaying disorderly. Hope you can fix it some day.
It would be better if the avatar can display as gravatar.
Which ones do you mean?
That's actually the case, the avatar you're getting means that there is no gravatar for the email you used to register.
Can you send a screenshot in english? Unfortunatly, I don't speak chinese.
Can you run these on your db: https://stackoverflow.com/a/1049958/10924593 and send me the output?
I sent you this screenshot last night, maybe you overlooked it?
I can assure you that my email definitely has its own gravatar. As you can see of my avatar on this page. It is the same email.
Actually that screenshot means that the collation of my database is utf8mb
Please allow me few minutes and I will do it right now.
To be honest, I can definitely tell you that the collation is utf8mb.
Every table of the database is that.
I know why frontend cannot get gravatar.
I see that you set getgravatarUrl in app.d04972e7.js, and the Url is totally wrong.
You can see how to set it on this page: https://en.gravatar.com/site/implement/
https://en.gravatar.com/site/implement/images/
Now the frontend avatar Url is just : src="https://www.gravatar.com/avatar/?s=50&d=mp"
I got the screenshot, it is just not clear to me how the components are broken. The ones you marked seem fine to me, apart from the llama.
Telling from the screenshot, it seems the collation is actually
utf8mb4_general_ci
and notutf8mb
. Take a lookt at this stackoverflow answer which explains the differences and why you should switch it.Try running this to convert everything to
utf8mb
(Make a backup first!).That is the minified version, the "real" implementation is here: https://kolaente.dev/vikunja/frontend/src/branch/master/src/models/user.js#L21
However, this seems like a bug I'm able to reproduce. I'll try to up a fix later.
I've put up a fix, it'll take a few minutes until a build is available:
683012f468
Just see the screenshot please.
Thank you so much for your hardworking mate. I will try it now
But the screenshots you sent me from the tables show that they are still in
utf8mb4_general_ci
.Can you try to insert or modify an entry from within phpmyadmin and insert a chinese letter or so to see if the database is working correctly?
I was able to create a task with some chinese letters on my instance:
My databse is all
utf8mb4
encoded:Just test it and the gravatar is normal now! Bravo!
To the mobile UI problem.
What I mean is that the vikunja which I mark in the mobile page obsecure the username. Maybe you can make it expose less just like the PC version which will be better?
Just an advice. If you think that is not so important. It does not effect so much.
Yes, I'll put that in the roadmap. I kind of like the gimmick, but you're not the first to notice it's not ideal.
LOL OK sounds great. Now I am trying to figure out what is the real problem in my database although all collations are unicode
Just change the username to 孟繁阳 and the frontend just display like this
This means the collation is correct, right?
I am really confused now.
It seems your collation is still
utf8mb4_unicode_ci
and notutf8mb4
(orutf8mb4_general_ci
for that matter).Take a look at this answer from stackoverflow to learn the differences between the two and why you should use
utf8mb4
orutf8mb4_general_ci
instead.Closing this as it seems the original issue has been resolved.