LemmyNet / lemmy-ui

The official web app for lemmy.
https://join-lemmy.org/
GNU Affero General Public License v3.0
886 stars 332 forks source link

New site setup keeps breaking #1635

Open Nutomic opened 1 year ago

Nutomic commented 1 year ago

Requirements

Summary

The dialog under /setup regularly keeps breaking in the development branch, and is again not working currently. This is a problem for testing and especially for making new releases, as it needs to be fixed manually every time. It would be good if there could be a test cases added for this which runs as part of CI and ensures that the setup keeps working with new changes.

Steps to Reproduce

  1. Run ./scripts/test.sh in Lemmy backend repo (you only need to wait for "CREATE DATABASE", not run the full script)
  2. Run Lemmy backend
  3. Run lemmy-ui frontend
  4. Open the website and attempt to perform setup

Technical Details

Browser console:

Uncaught SyntaxError: expected expression, got '<'
[vendors-node_modules_date-fns_esm_locale_es_index_js.client.js:2:4](http://0.0.0.0:1234/js/vendors-node_modules_date-fns_esm_locale_es_index_js.client.js)
Uncaught (in promise) ChunkLoadError: Loading chunk vendors-node_modules_date-fns_esm_locale_es_index_js failed.
(missing: http://0.0.0.0:1234/js/vendors-node_modules_date-fns_esm_locale_es_index_js.client.js)
    j http://0.0.0.0:1234/static/js/client.js:7153
    e http://0.0.0.0:1234/static/js/client.js:7014
    e http://0.0.0.0:1234/static/js/client.js:7013
    webpackAsyncContext webpack://lemmy-ui/./node_modules/date-fns/locale/_lazy_^\.\/.*$_exclude:_\.js\.flow$_namespace_object?:12407
    _callee$ webpack://lemmy-ui/./src/shared/utils/app/setup-date-fns.ts?:28
    Babel 7
    _ref webpack://lemmy-ui/./src/shared/utils/app/setup-date-fns.ts?:40
    __WEBPACK_DEFAULT_EXPORT__ webpack://lemmy-ui/./src/shared/utils/app/setup-date-fns.ts?:15
    _callee$ webpack://lemmy-ui/./src/client/index.tsx?:36
    Babel 7
    _startClient webpack://lemmy-ui/./src/client/index.tsx?:52
    startClient webpack://lemmy-ui/./src/client/index.tsx?:26
    <anonymous> webpack://lemmy-ui/./src/client/index.tsx?:54
    tsx http://0.0.0.0:1234/static/js/client.js:665
    __webpack_require__ http://0.0.0.0:1234/static/js/client.js:6940
    <anonymous> http://0.0.0.0:1234/static/js/client.js:7221
    <anonymous> http://0.0.0.0:1234/static/js/client.js:7223
[client.js:7153:29](http://0.0.0.0:1234/static/js/client.js)

Lemmy Instance Version

latest main branch

Lemmy Instance URL

No response

alectrocute commented 1 year ago

I just ran through this on my local environment and am unable to reproduce the bug. Is this specific to Docker? Are there any important steps that I'm missing here?

Nutomic commented 1 year ago

I tried again and its failing with the same error posted above. Both Firefox and Chromium.