LivelyKernel / lively.next

lively.next is a personal programming kit. It emphasizes liveness, directness, and interactivity.
https://lively-next.org
MIT License
65 stars 16 forks source link

Freezer should retry when freezing fails due to jspm timeout #731

Closed rickmcgeer closed 1 year ago

rickmcgeer commented 1 year ago

To be on the safe side, I'm compiling in the Docker container, and I'm seeing this:

TypeError: Could not load https://jspm.dev/bowser@1.4.1: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11404:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async WebDAVResource.read (file:///home/rick/lively.next/lively.resources/src/http-resource.js:231:17)
    at async Object.load (/home/rick/lively.next/lively.freezer/src/resolvers/node.cjs:123:16)
    at async LivelyRollup.load (file:///home/rick/lively.next/lively.freezer/src/bundler.js:563:13)
    at async /home/rick/lively.next/lively.next-node_modules/rollup/2.70.2/dist/shared/rollup.js:22224:83
    at async Queue.work (/home/rick/lively.next/lively.next-node_modules/rollup/2.70.2/dist/shared/rollup.js:21808:32) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (node:internal/deps/undici/undici:8377:28)
      at node:internal/deps/undici/undici:8335:50
      at Immediate._onImmediate (node:internal/deps/undici/undici:8366:13)
      at process.processImmediate (node:internal/timers:476:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  },
  code: 'PLUGIN_ERROR',
  plugin: 'commonjs--resolver',
  hook: 'resolveId',
  watchFiles: [
    '__rootModule__',
    '__rootModule__?commonjs-entry',
    '/home/rick/lively.next/lively.morphic/index.js',
    '/home/rick/lively.next/lively.graphics/index.js',
    '/home/rick/lively.next/galyleo-dashboard/publication/index.js',
    '/home/rick/lively.next/lively.graphics/color.js',
    '/home/rick/lively.next/lively.graphics/geometry-2d.js',
    '/home/rick/lively.next/lively.classes/runtime.js',
    '/home/rick/lively.next/lively.morphic/config.js',
    '/home/rick/lively.next/lively.morphic/morph.js',
    '/home/rick/lively.next/lively.morphic/world.js',
    '/home/rick/lively.next/lively.morphic/text/morph.js',
    '/home/rick/lively.next/lively.morphic/text/label.js',
    '/home/rick/lively.next/lively.morphic/text/anchors.js',
    '/home/rick/lively.next/lively.morphic/text/range.js',
    '/home/rick/lively.next/lively.morphic/html-morph.js',
    '/home/rick/lively.next/lively.morphic/env.js',
    '/home/rick/lively.next/lively.morphic/layout.js',
    '/home/rick/lively.next/lively.morphic/components/core.js',
    '/home/rick/lively.next/lively.morphic/style-sheets.js',
    '/home/rick/lively.next/lively.morphic/rendering/morphic-default.js',
    '/home/rick/lively.next/lively.morphic/rendering/dom-helper.js',
    '/home/rick/lively.next/lively.morphic/rendering/animations.js',
    '/home/rick/lively.next/lively.morphic/text/icons.js',
    '/home/rick/lively.next/lively.morphic/serialization.js',
    '/home/rick/lively.next/lively.morphic/morphicdb/index.js',
    '/home/rick/lively.next/lively.morphic/text/input-line.js',
    '/home/rick/lively.next/lively.morphic/helpers.js',
    '/home/rick/lively.next/lively.lang/index.js',
    '/home/rick/lively.next/lively.lang/function.js',
    '/home/rick/lively.next/lively.graphics/color-parser.js',
    '\x00rollupPluginBabelHelpers.js',
    '/home/rick/lively.next/lively.graphics/convert-css-length.js',
    '/home/rick/lively.next/lively.lang/string.js',
    '/home/rick/lively.next/lively.user/morphic/user-ui.js',
    'https://jspm.dev/bowser@1.4.1',
    '/home/rick/lively.next/lively.bindings/index.js',
    '/home/rick/lively.next/lively.user/index.js',
    '/home/rick/lively.next/lively.resources/index.js',
    '/home/rick/lively.next/lively.morphic/tooltip-viewer.js',
    '/home/rick/lively.next/lively.morphic/world-loading.js',
    '/home/rick/lively.next/lively.morphic/text/position.js',
    'https://jspm.dev/css@3.0.0',
    '/home/rick/lively.next/lively.notifications/index.js',
    '/home/rick/lively.next/lively.lang/promise.js',
    '/home/rick/lively.next/lively.morphic/rendering/renderer.js',
    '/home/rick/lively.next/lively.morphic/rendering/font-metric.js',
    '/home/rick/lively.next/lively.morphic/changes.js',
    '/home/rick/lively.next/lively.morphic/undo.js',
    '/home/rick/lively.next/lively.morphic/events/EventDispatcher.js',
    '/home/rick/lively.next/lively.serializer2/index.js',
    '/home/rick/lively.next/lively.morphic/components/policy.js',
    '/home/rick/lively.next/lively.morphic/rendering/property-dom-mapping.js',
    'https://jspm.dev/flubber',
    'https://jspm.dev/bezier-easing',
    'https://jspm.dev/web-animations-js',
    '/home/rick/lively.next/lively.ide/shell/shell-interface.js',
    '/home/rick/lively.next/lively.morphic/CommandHandler.js',
    '/home/rick/lively.next/lively.morphic/events/KeyHandler.js',
    '/home/rick/lively.next/lively.morphic/ticking.js',
    '/home/rick/lively.next/galyleo-dashboard/publication/int/en/index.js',
    '/home/rick/lively.next/lively.ide/world.js',
    '/home/rick/lively.next/lively.classes/object-classes.js',
    '/home/rick/lively.next/lively.classes/util.js',
    '/home/rick/lively.next/lively.morphic/rendering/morph-to-image.js',
    '/home/rick/lively.next/lively.components/loading-indicator.cp.js',
    '/home/rick/lively.next/lively.morphic/object-migration.js',
    '/home/rick/lively.next/lively.ide/text/map.js',
    '/home/rick/lively.next/lively.ide/diff/editor-plugin.js',
    '/home/rick/lively.next/lively.ide/text/rich-text-commands.js',
    '/home/rick/lively.next/lively.morphic/text/selection.js',
    '/home/rick/lively.next/lively.morphic/text/document.js',
    '/home/rick/lively.next/lively.morphic/text/layout.js',
    '/home/rick/lively.next/lively.morphic/text/commands.js',
    '/home/rick/lively.next/lively.morphic/text/attributes.js',
    '/home/rick/lively.next/lively.morphic/morphicdb/db.js',
    '/home/rick/lively.next/lively.lang/object.js',
    '/home/rick/lively.next/lively.classes/properties.js',
    '/home/rick/lively.next/lively.ide/js/inspector/ui.cp.js',
    '/home/rick/lively.next/lively.resources/src/helpers.js',
    '/home/rick/lively.next/lively.morphic/tooltips.cp.js',
    '/home/rick/lively.next/lively.2lively/client.js',
    '/home/rick/lively.next/lively.shell/client-command.js',
    '/home/rick/lively.next/lively.shell/client-resource.js',
    '/home/rick/lively.next/lively.ide/studio/dialogs.cp.js',
    '/home/rick/lively.next/lively.modules/index.js'
  ]
}

Node.js v18.14.1
node@096a0ccc0e9d:/home/rick/lively.next/galyleo-dashboard$
linusha commented 1 year ago

Does this happen reliably, i.e. reproducible? From the trace you posted, it could just be jspm timing out. This happens sometimes and in that case just building again should already fix it?

merryman commented 1 year ago

I think I will add a retry logic into the freezer so that it wont brick the entire build once it fails to fetch a dependency once.