stonith404 / pingvin-share

A self-hosted file sharing platform that combines lightness and beauty, perfect for seamless and efficient file sharing.
https://stonith404.github.io/pingvin-share/
BSD 2-Clause "Simplified" License
2.79k stars 205 forks source link

🐛 Bug Report: #271

Closed Trilis29 closed 11 months ago

Trilis29 commented 11 months ago

👟 Reproduction steps

Docker instalation got error:

[Nest] 33 - 09/27/2023, 5:33:18 PM LOG [RouterExplorer] Mapped {/api/users/:id, DELETE} route +0ms at Function.supportedLocalesOf (<anonymous>) RangeError: Incorrect locale information provided at new IntlProvider (/opt/app/frontend/node_modules/react-intl/src/components/provider.js:92:42) at Zc (/opt/app/frontend/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:481) at Z (/opt/app/frontend/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89) at Zc (/opt/app/frontend/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:141) at createIntl (/opt/app/frontend/node_modules/react-intl/src/components/provider.js:66:42) at createIntl (/opt/app/frontend/node_modules/@formatjs/intl/src/create-intl.js:45:33)

👍 Expected behavior

Work

👎 Actual Behavior

Not opening web "Internal server error"

🌐 Browser

Chrome

stonith404 commented 11 months ago

Do you run Pingvin Share in Docker? And which is your system locale on the client machine (e.g EN-US)?

stonith404 commented 11 months ago

Closing this due to inactivity. Feel free to reopen it if the issue still persists.

nilsherzig commented 2 months ago

Hi, i have the same issue while using firefox (works in chrome). Running the latest container inside kubernetes.

Client locale:

> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

Browser locale:

Left is firefox, right is chrome.

image

Edit: Works in firefox anon mode / clean installation. I only have ublock installed as an extension and even with ublock uninstalled I still get the error. I assume some firefox privacy setting is causing this.

stonith404 commented 2 months ago

Thanks for sharing this information. Could you please share the request headers that are sent to Pingvin Share? You can find them in the developer tools like this: image

nilsherzig commented 2 months ago

Sure thing :) thanks for your project.

Running the webinterface behind ciliums envoy proxy solves the problem for me. I wasnt going to run the container without an reverse proxy anyway.

Network request when accessing the container directly (only request, besides the favicon one):

image

nilsherzig commented 2 months ago

Damn I should do something about the cookie situation on my localhost hahah, I'm out there leaking Argo tokens

nilsherzig commented 2 months ago

Well fuck, cleaning my localhost cookies solved the problem. It's always a user error, isn't it haha? You might still want to check your cookie handling, something might be weird

nilsherzig commented 2 months ago

Looks like my "locale: auto" cookie crashed this line

https://github.com/stonith404/pingvin-share/blob/3773432eb5cff3784d36918ab1883413d6adf766/frontend/src/hooks/useTranslate.hook.ts#L20

stonith404 commented 2 months ago

Sorry for my late response. Thanks for debugging this further, I'll look into it.

nilsherzig commented 2 months ago

No problem, enjoying your project otherwise :)