question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

symbolicateMiddleware fails when platform is set to all

See original GitHub issue

Current Behavior

When running haul start --platform all, symbolicateMiddleware throws whenever a log message is inspected.

TypeError: Cannot read property 'output' of undefined
    at createSourceMapConsumer (<redacted>/node_modules/haul-cli/src/server/middleware/symbolicateMiddleware.js:41:30)
    at symbolicateMiddleware (<redacted>/node_modules/haul-cli/src/server/middleware/symbolicateMiddleware.js:97:22)
    at Layer.handle [as handle_request] (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:317:13)
    at <redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:335:12)
    at next (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:275:10)
    at statusPageMiddleware (<redacted>/node_modules/haul-cli/src/server/middleware/statusPageMiddleware.js:16:3)
    at Layer.handle [as handle_request] (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:317:13)

Expected Behavior

No errors in the console. Either fail gracefully or (ideally) understand which compiler the source map should be loaded from.

The issue appears to be that when platform is all, the compiler passed to the middleware function is a MultiCompiler and contains an array of compilers: one for each platform. This may also be a problem with the other middleware components; I didn’t check.

Haul Configuration (webpack.haul.js)

webpack.haul.js

const path = require('path');

module.exports = ({ platform }, defaults) => ({
  entry: `./src/index.${platform}.js`,
  module: {
    ...defaults.module,
    rules: [
      ...defaults.module.rules,
      {
        test: /\.(css|less)$/,
        loaders: [path.join(__dirname, "native-css-loader.js"), 'less-loader', '<redacted>=' + __dirname + '/less-preamble.json'],
      }
    ],
  },
  resolve: {
    ...defaults.resolve,
    modules: [
      "node_modules",
      path.resolve(__dirname, "../../node_modules")
    ]
  },
});

Your Environment

software version
Haul 0.6.0-rf
react-native 0.44.0
node 6.9.1
npm or yarn 3.10.8

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
skellockcommented, Aug 4, 2017

Holy shit it worked!

1reaction
skellockcommented, Jun 27, 2017

Hey, i haven’t had time just yet. But it’s been weighing-in on my guilt-o-meter tho.

You’re welcome to steal it from me, but I can find time this week for sure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expo CLI (0.3.2) depends on incompatible version of ... - GitHub
Error : Cannot find module '@expo/dev-server/build/webpack/symbolicateMiddleware'. Normal case that modules installed via Yarn 1.x.
Read more >
Bundling with webpack - Expo Documentation
Learn about different webpack bundler configurations that can be customized.
Read more >
no such file or directory, open '/opt/build/repo/assets/favicon.png'
Hello everyone, Since I upgraded the Expo SKD from version 45 to version 46, I can't get a build. I have the following...
Read more >
haul - Faltan mapas de origen en las compilaciones de desarrollo ...
lineNumber}:${frame.column} symbolicate failed: no source map`); console.warn(' valid files:', ...sourceMapConsumers.keys()); return; } const position = ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found