hitobito / development

Setup your local machine for hitobito development
GNU Affero General Public License v3.0
19 stars 15 forks source link

Setup broken #36

Closed Michael-Schaer closed 2 years ago

Michael-Schaer commented 2 years ago

Hallo zusammen

Nach dem Herunterziehen der neusten Code-Basis hat mein Setup nicht mehr geklappt. Ich habe dann einiges probiert (Docker Images gelöscht, usw.), jedoch alles ohne Erfolg. Am Schluss habe ich das ganze Setup neu "nach Anleitung" gemacht. Doch auch so lande ich wieder beim gleichen Fehler von Webpacker.

Sind die Instructions vielleicht nicht mehr aktuell? Oder habe ich etwas verpasst?

Merci für die Hilfe!

Screenshot from 2022-01-04 12-10-02

Rails.root: /usr/src/app/hitobito

Application Trace | Framework Trace | Full Trace
webpacker (5.2.1) lib/webpacker/manifest.rb:79:in `handle_missing_entry'
webpacker (5.2.1) lib/webpacker/manifest.rb:49:in `lookup!'
webpacker (5.2.1) lib/webpacker/helper.rb:193:in `rescue in resolve_path_to_image'
webpacker (5.2.1) lib/webpacker/helper.rb:189:in `resolve_path_to_image'
app/helpers/webpack_helper.rb:19:in `wagon_image_pack_path'
app/helpers/webpack_helper.rb:38:in `wagon_favicon_pack_tag'
app/views/layouts/application.html.haml:16
actionview (6.1.4.1) lib/action_view/base.rb:247:in `public_send'
actionview (6.1.4.1) lib/action_view/base.rb:247:in `_run'
actionview (6.1.4.1) lib/action_view/template.rb:154:in `block in render'
activesupport (6.1.4.1) lib/active_support/notifications.rb:205:in `instrument'
actionview (6.1.4.1) lib/action_view/template.rb:345:in `instrument_render_template'
actionview (6.1.4.1) lib/action_view/template.rb:152:in `render'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:72:in `block in render_with_layout'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:70:in `render_with_layout'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:55:in `render_template'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:11:in `render'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:29:in `render_to_object'
actionview (6.1.4.1) lib/action_view/rendering.rb:117:in `block in _render_template'
actionview (6.1.4.1) lib/action_view/base.rb:273:in `in_rendering_context'
actionview (6.1.4.1) lib/action_view/rendering.rb:116:in `_render_template'
actionpack (6.1.4.1) lib/action_controller/metal/streaming.rb:218:in `_render_template'
actionview (6.1.4.1) lib/action_view/rendering.rb:103:in `render_to_body'
actionpack (6.1.4.1) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (6.1.4.1) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
actionpack (6.1.4.1) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (6.1.4.1) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
/usr/local/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
activesupport (6.1.4.1) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:86:in `cleanup_view_runtime'
activerecord (6.1.4.1) lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:45:in `render'
remotipart (1.3.1) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart'
app/controllers/concerns/decorates_before_rendering.rb:35:in `render'
responders (3.0.0) lib/action_controller/responder.rb:240:in `default_render'
responders (3.0.0) lib/action_controller/responder.rb:172:in `to_html'
responders (3.0.0) lib/action_controller/responder.rb:165:in `respond'
responders (3.0.0) lib/action_controller/responder.rb:158:in `call'
responders (3.0.0) lib/action_controller/respond_with.rb:213:in `respond_with'
devise (4.7.1) app/controllers/devise/sessions_controller.rb:14:in `new'
actionpack (6.1.4.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (6.1.4.1) lib/abstract_controller/base.rb:228:in `process_action'
actionpack (6.1.4.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (6.1.4.1) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
actiontext (6.1.4.1) lib/action_text/rendering.rb:20:in `with_renderer'
actiontext (6.1.4.1) lib/action_text/engine.rb:59:in `block (4 levels) in <class:Engine>'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:126:in `instance_exec'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
sentry-raven (2.11.0) lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:126:in `instance_exec'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:137:in `run_callbacks'
actionpack (6.1.4.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.1.4.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `instrument'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
actionpack (6.1.4.1) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
activerecord (6.1.4.1) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.1.4.1) lib/abstract_controller/base.rb:165:in `process'
actionview (6.1.4.1) lib/action_view/rendering.rb:39:in `process'
actionpack (6.1.4.1) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.1.4.1) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.1.4.1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.1.4.1) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.1.4.1) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
actionpack (6.1.4.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.4.1) lib/action_dispatch/routing/route_set.rb:842:in `call'
bullet (6.1.5) lib/bullet/rack.rb:15:in `call'
http_accept_language (2.1.0) lib/http_accept_language/middleware.rb:14:in `call'
remotipart (1.3.1) lib/remotipart/middleware.rb:32:in `call'
warden (1.2.8) lib/warden/manager.rb:36:in `block in call'
warden (1.2.8) lib/warden/manager.rb:34:in `catch'
warden (1.2.8) lib/warden/manager.rb:34:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack (2.2.3) lib/rack/deflater.rb:44:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
actionpack (6.1.4.1) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
actionpack (6.1.4.1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/cookies.rb:689:in `call'
activerecord (6.1.4.1) lib/active_record/migration.rb:601:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (6.1.4.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
airbrake (12.0.0) lib/airbrake/rack/middleware.rb:34:in `call!'
airbrake (12.0.0) lib/airbrake/rack/middleware.rb:23:in `call'
better_errors (2.8.0) lib/better_errors/middleware.rb:62:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.1.4.1) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.1.4.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.1.4.1) lib/active_support/tagged_logging.rb:99:in `block in tagged'
activesupport (6.1.4.1) lib/active_support/tagged_logging.rb:37:in `tagged'
activesupport (6.1.4.1) lib/active_support/tagged_logging.rb:99:in `tagged'
railties (6.1.4.1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.0) lib/request_store/middleware.rb:19:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (6.1.4.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/static.rb:24:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/host_authorization.rb:92:in `call'
sentry-raven (2.11.0) lib/raven/integrations/rack.rb:51:in `call'
rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
webpacker (5.2.1) lib/webpacker/dev_server_proxy.rb:25:in `perform_request'
rack-proxy (0.6.5) lib/rack/proxy.rb:57:in `call'
railties (6.1.4.1) lib/rails/engine.rb:539:in `call'
railties (6.1.4.1) lib/rails/railtie.rb:207:in `public_send'
railties (6.1.4.1) lib/rails/railtie.rb:207:in `method_missing'
puma (4.3.9) lib/puma/configuration.rb:228:in `call'
puma (4.3.9) lib/puma/server.rb:718:in `handle_request'
puma (4.3.9) lib/puma/server.rb:472:in `process_client'
puma (4.3.9) lib/puma/server.rb:328:in `block in run'
puma (4.3.9) lib/puma/thread_pool.rb:134:in `block in spawn_thread'
Toggle env dump
GATEWAY_INTERFACE: "CGI/1.2"
HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
HTTP_ACCEPT_ENCODING: "gzip, deflate, br"
HTTP_ACCEPT_LANGUAGE: "en-US,en;q=0.9"
HTTP_VERSION: "HTTP/1.1"
ORIGINAL_SCRIPT_NAME: ""
REMOTE_ADDR: "172.19.0.1"
SERVER_NAME: "localhost"
SERVER_PROTOCOL: "HTTP/1.1"
carlobeltrame commented 2 years ago

Der Fehler ist ein generischer Fehler wenn Webpacker gar nicht erst starten kann. Was ist der Output von docker-compose logs webpack? Falls dort etwas steht von wegen "Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 14.x", dann musst du einmalig den empfohlenen Fix ausführen: docker-compose run --entrypoint "npm rebuild node-sass" webpack. Wir haben kürzlich die Node-Version geupdatet, und vielleicht ist noch eine alte inkompatible Version von node-sass bei dir in den Volumes.

Michael-Schaer commented 2 years ago

Hallo Cosinus

Im log sehe ich einen Fehler zum "webpack-dev-server", der fehlt. Sonst nur warnings.

webpack_1          | Running yarn install
webpack_1          | yarn install v1.13.0
webpack_1          | (node:14) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
webpack_1          | (Use `node --trace-deprecation ...` to show where the warning was created)
webpack_1          | warning package.json: License should be a valid SPDX license expression
webpack_1          | warning Skipping preferred cache folder "/home/developer/.cache/yarn" because it is not writable.
webpack_1          | warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
webpack_1          | warning hitobito: License should be a valid SPDX license expression
webpack_1          | [1/4] Resolving packages...
webpack_1          | [2/4] Fetching packages...
webpack_1          | ⚙️  Testing DB connection
webpack_1          | ✅ DB server is ready
webpack_1          | ➡️ Handing control over to '/usr/src/app/hitobito/bin/webpack-dev-server''
webpack_1          | ⚙️  Executing: /usr/src/app/hitobito/bin/webpack-dev-server
webpack_1          | (node:30) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
webpack_1          | (Use `node --trace-deprecation ...` to show where the warning was created)
webpack_1          | warning package.json: License should be a valid SPDX license expression
webpack_1          | warning Skipping preferred cache folder "/home/developer/.cache/yarn" because it is not writable.
webpack_1          | warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
webpack_1          | yarn run v1.13.0
webpack_1          | (node:1) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
webpack_1          | (Use `node --trace-deprecation ...` to show where the warning was created)
webpack_1          | warning package.json: License should be a valid SPDX license expression
webpack_1          | warning Skipping preferred cache folder "/home/developer/.cache/yarn" because it is not writable.
webpack_1          | warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
webpack_1          | error Command "webpack-dev-server" not found.
carlobeltrame commented 2 years ago

Ah, das hatte ich aber in 53ea9c14dcb37ee7e1f302e340554aa402fc5a3d gefixt... Du musst vermutlich noch das development-Repo pullen und die Container nochmals neu builden.

Michael-Schaer commented 2 years ago

Ich hatte alle Containers, Volumes und Images entfernt und die Repos sind alle original und ungeforked. Ich bin also recht sicher, dass ich auf dem aktuellen Stand von heute bin. Was kann es noch sein?

carlobeltrame commented 2 years ago

Was kommt raus wenn du folgendes machst: docker-compose run --entrypoint "yarn --version" webpack

Wenn 1.12 oder 1.14 oder so ähnlich dann hats nicht geklappt mit dem builden, vielleicht ohne cache versuchen: docker-compose build --no-cache webpack? Oder sicherstellen dass das development-repo (nicht nur hitobito, hitobito_youth und hitobito_pbs) aktuell ist, danach down, dann erst build webpack und up.

Wenn 1.22 dann ist alles wie es soll, dann wäre ich am Output von docker-compose run --entrypoint "yarn install" webpack interessiert.

Michael-Schaer commented 2 years ago

docker-compose build --no-cache webpack

Der wars! Merci fürs Durchlotsen!