oppia: Webpack hangs the first time it's run on a branch, but starts OK the second time

Describe the bug

(I’ve run into this issue a couple of times, but I don’t think it’s related to #6765.)

In general, webpack works for me (Ubuntu Linux). However, the first time I run start.sh, it does a lot of stuff and prints to the terminal logs that end with the following:

core/templates/dev/head/pages/landing/TopicLandingPage.ts] 4.51 KiB {landing} [built]
    + 476 hidden modules
Child HtmlWebpackCompiler:
     38 assets
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_1 = __child-HtmlWebpackPlugin_1
    Entrypoint HtmlWebpackPlugin_2 = __child-HtmlWebpackPlugin_2
    Entrypoint HtmlWebpackPlugin_3 = __child-HtmlWebpackPlugin_3
    Entrypoint HtmlWebpackPlugin_4 = __child-HtmlWebpackPlugin_4
    Entrypoint HtmlWebpackPlugin_5 = __child-HtmlWebpackPlugin_5
    Entrypoint HtmlWebpackPlugin_6 = __child-HtmlWebpackPlugin_6
    Entrypoint HtmlWebpackPlugin_7 = __child-HtmlWebpackPlugin_7
    Entrypoint HtmlWebpackPlugin_8 = __child-HtmlWebpackPlugin_8
    Entrypoint HtmlWebpackPlugin_9 = __child-HtmlWebpackPlugin_9
    Entrypoint HtmlWebpackPlugin_10 = __child-HtmlWebpackPlugin_10
    Entrypoint HtmlWebpackPlugin_11 = __child-HtmlWebpackPlugin_11
    Entrypoint HtmlWebpackPlugin_12 = __child-HtmlWebpackPlugin_12
    Entrypoint HtmlWebpackPlugin_13 = __child-HtmlWebpackPlugin_13
    Entrypoint HtmlWebpackPlugin_14 = __child-HtmlWebpackPlugin_14
    Entrypoint HtmlWebpackPlugin_15 = __child-HtmlWebpackPlugin_15
    Entrypoint HtmlWebpackPlugin_16 = __child-HtmlWebpackPlugin_16
    Entrypoint HtmlWebpackPlugin_17 = __child-HtmlWebpackPlugin_17
    Entrypoint HtmlWebpackPlugin_18 = __child-HtmlWebpackPlugin_18
    Entrypoint HtmlWebpackPlugin_19 = __child-HtmlWebpackPlugin_19
    Entrypoint HtmlWebpackPlugin_20 = __child-HtmlWebpackPlugin_20
    Entrypoint HtmlWebpackPlugin_21 = __child-HtmlWebpackPlugin_21
    Entrypoint HtmlWebpackPlugin_22 = __child-HtmlWebpackPlugin_22
    Entrypoint HtmlWebpackPlugin_23 = __child-HtmlWebpackPlugin_23
    Entrypoint HtmlWebpackPlugin_24 = __child-HtmlWebpackPlugin_24
    Entrypoint HtmlWebpackPlugin_25 = __child-HtmlWebpackPlugin_25
    Entrypoint HtmlWebpackPlugin_26 = __child-HtmlWebpackPlugin_26
    Entrypoint HtmlWebpackPlugin_27 = __child-HtmlWebpackPlugin_27
    Entrypoint HtmlWebpackPlugin_28 = __child-HtmlWebpackPlugin_28
    Entrypoint HtmlWebpackPlugin_29 = __child-HtmlWebpackPlugin_29
    Entrypoint HtmlWebpackPlugin_30 = __child-HtmlWebpackPlugin_30
    Entrypoint HtmlWebpackPlugin_31 = __child-HtmlWebpackPlugin_31
    Entrypoint HtmlWebpackPlugin_32 = __child-HtmlWebpackPlugin_32
    Entrypoint HtmlWebpackPlugin_33 = __child-HtmlWebpackPlugin_33
    Entrypoint HtmlWebpackPlugin_34 = __child-HtmlWebpackPlugin_34
    Entrypoint HtmlWebpackPlugin_35 = __child-HtmlWebpackPlugin_35
    Entrypoint HtmlWebpackPlugin_36 = __child-HtmlWebpackPlugin_36
    Entrypoint HtmlWebpackPlugin_37 = __child-HtmlWebpackPlugin_37
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/about/about.html] 23.6 KiB {HtmlWebpackPlugin_2} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/admin/admin.html] 3.88 KiB {HtmlWebpackPlugin_0} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/base.html] 8.57 KiB {HtmlWebpackPlugin_1} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/collection_editor/collection_editor.html] 2.32 KiB {HtmlWebpackPlugin_3} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/collection_player/collection_player.html] 17.2 KiB {HtmlWebpackPlugin_4} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/contact/contact.html] 3.73 KiB {HtmlWebpackPlugin_6} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/creator_dashboard/creator_dashboard.html] 37.7 KiB {HtmlWebpackPlugin_7} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/donate/donate.html] 6.29 KiB {HtmlWebpackPlugin_8} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/email_dashboard/email_dashboard.html] 3.78 KiB {HtmlWebpackPlugin_9} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/email_dashboard/email_dashboard_result.html] 3.78 KiB {HtmlWebpackPlugin_10} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/error/error.html] 3.02 KiB {HtmlWebpackPlugin_11} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/exploration_editor/exploration_editor.html] 9.38 KiB {HtmlWebpackPlugin_12} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/exploration_player/exploration_player.html] 4.15 KiB {HtmlWebpackPlugin_13} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/get_started/get_started.html] 3.6 KiB {HtmlWebpackPlugin_14} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/landing/stewards/landing_page_stewards.html] 29.1 KiB {HtmlWebpackPlugin_30} [built]
        + 26 hidden modules

And then it just hangs. When I go to localhost:8181 the server can’t be found.

However, when I then do Ctrl-C (to kill the process) and run start.sh again, everything works and I can start the server. The last few lines then become:

    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/get_started/get_started.html] 3.6 KiB {HtmlWebpackPlugin_14} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/landing/stewards/landing_page_stewards.html] 29.1 KiB {HtmlWebpackPlugin_30} [built]
        + 26 hidden modules
Starting GAE development server
INFO     2019-05-19 19:26:17,786 devappserver2.py:105] Skipping SDK update check.
INFO     2019-05-19 19:26:17,857 api_server.py:265] Starting API server at: http://localhost:45469
Starting type checking service...
Using 1 worker with 2048MB memory limit

webpack is watching the files…

INFO     2019-05-19 19:26:18,349 dispatcher.py:255] Starting module "default" running at: http://0.0.0.0:8181
INFO     2019-05-19 19:26:18,350 admin_server.py:152] Starting admin server at: http://0.0.0.0:8000

Presumably this behaviour isn’t expected, so I’m filing it as a bug.

To Reproduce Checkout a new branch and run start.sh.

Observed behavior Webpack hangs the first time, and the start.sh process needs to be killed and restarted before a local server is set up.

Expected behavior The local server should launch correctly the first time.

Desktop (please complete the following information; delete this section if the issue does not arise on desktop):

  • OS: Ubuntu
  • Browser: N/A
  • Version: N/A

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Note: @vojtechjelinek will be making a fix for this today.