YunoHost-Apps / lychee_ynh

Lychee package for YunoHost
https://lycheeorg.github.io/
GNU General Public License v3.0
10 stars 3 forks source link

[lychee] 400 Bad Request Header Exception Invalid token #59

Closed DavidLep0le closed 1 year ago

DavidLep0le commented 1 year ago

Hello I got these issue for several weeks. I don’t find solution and it happen on a fresh install. I receive a answer from notifications@github.com / lychee main github He gives us a track:

My instincts tells me this is because you have a Bearer Token that is used by Yuno.

Lychee/SessionOrTokenGuard.php at master · LycheeOrg/Lychee · GitHub](https://github.com/LycheeOrg/Lychee/blob/master/app/Services/Auth/SessionOrTokenGuard.php#L307) See here.

I would suggest to edit your .env and set
ENABLE_TOKEN_AUTH to false

see here: [Lychee/auth.php at master · LycheeOrg/Lychee · GitHub](https://github.com/LycheeOrg/Lychee/blob/master/config/auth.php)

This will disable the token authentication and skip this problem.

I find the .env in var

Preformatted text : nano /var/www/lychee/.env

But it don’t work, nano said .env couldn’t be edit… So several questions

Where is the .env file to modify it …?
does Yunohost got a token service to modify ?

Thanks for helping

Capture du 2023-03-02 16-24-55 Capture du 2023-03-02 16-21-50 Capture du 2023-03-02 16-19-50

=================================== inital post on yunohost forum :

My YunoHost server

Hardware: computer at home / Linux 5.10.0-21-amd64 x86_64 CPU : AMD Ryzen 7 3700X 8-Core Processor (16 cores) Ram : 31.34 GB YunoHost version: YunoHost 11.1.11.2 (stable) I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | ALL 3 Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes If yes, please explain: it’s a machine with several HD

sda ├─sda1 1,1T /media/AAA └─sda2 6,1T /media/VIDZ sdb 9,1T └─sdb1 9,1T /media/10TERABYTES sdc 9,1T ├─sdc1 8,1T /media/10_Tera_V2 └─sdc2 1005,9G /media/BBB sdd 3,6T └─sdd1 3,6T /media/3T—BK-up *nvme0n1 931,5G ├─nvme0n1p1 /boot ├─nvme0n1p5 [SWAP] └─nvme0n1p6 / If your request is related to an app, specify its name and version: lychee Version : 4.7.0~ynh1 Description of my issue

provide detailed error messages and logs if you can:log for a new install : https://paste.yunohost.org/raw/ajidigemaw

There is these line into logs :

2023-02-28 22:35:24,661: INFO - [##################…] > Configuring permissions… 2023-02-28 22:35:24,661: DEBUG - + ynh_permission_update --permission=main --add=visitors 2023-02-28 22:35:24,711: DEBUG - + add=visitors & 2023-02-28 22:35:24,995: INFO - [##################+.] > Reloading NGINX web server… *2023-02-28 22:35:24,995: DEBUG - + ynh_systemd_action --service_name=nginx --action=reload

At the end we got: 2023-02-28 22:35:25,093: INFO - [####################] > Installation of lychee completed 2023-02-28 22:35:25,093: DEBUG - + ynh_exit_properly 2023-02-28 22:35:26,095: DEBUG - Checking that required services are up and running… 2023-02-28 22:35:26,734: SUCCESS - Installation terminée

I perform a fresh install on a new yunohost instance. I just type the user/pass same as the user for nextcloud. and i got the error : [lychee] 400 Bad Request Header Exception Invalid token

ericgaspar commented 1 year ago

62 should fix the issue

DavidLep0le commented 1 year ago

Hello, it don't work...! Sorry, what i done :+1: uninstall lychee from admin and re-install. i got the page "set-up admin" and after that : Capture du 2023-03-07 11-46-54

I try to make :+1: [](sudo yunohost app upgrade lychee -u https://github.com/YunoHost-Apps/lychee_ynh/tree/testing) error : Erreur : Command '['git', 'ls-remote', '--symref', 'https://github.com/YunoHost-Apps/lychee_ynh', 'HEAD']' returned non-zero exit status 128. Erreur : Impossible de récupérer les fichiers sources, l'URL est-elle correcte ?

after i try the solution of Axac on yunohost forum, Capture du 2023-03-07 11-59-13

same error: 400 Bad Request Header Exception Invalid token sorry... More i change debug mode to true in .env file and now no more debug page...

so... Yesterday it worked you have a copie in this post :+1: https://forum.yunohost.org/t/lychee-400-bad-request-header-exception-invalid-token/23909/7

DavidLep0le commented 1 year ago

Hello, it's a pity yunohost put an alert and ask to delete lychee... What happen ...? thanks

alexAubin commented 1 year ago

Idk, the whole discussion seems to be a mess spread accross 3 differents topics ... Apparently the issue regarding the invalid token was fixed, and one of your previous comment with all the screenshots just showed that you were trying to reach the install page when the app was already installed, so it was legitimately complaining that the install was already completed ...

It would be nice to have a clear explanation of what is the remaining issue if there is any ... And if the issue is not about an "invalid token", close the old threads and start a new one to prevent confusion ...

ericgaspar commented 1 year ago

Closing. This seems to be solve.