Skip to content

Source-maps missing in dev builds #338

@ScottPierce

Description

@ScottPierce

Current Behavior

I'm testing out building an app with Kotlin, and compiling sources to JS. Everything seems to be working really well with haul, except for stack-traces. I can debug kotlin sources, and everything. I just see this "can't symbolocate error" every time I see a crash:

GET /index.android.bundle 200 11019287 - 12.494 ms
POST /symbolicate 404 151 - 0.214 ms
POST /symbolicate 404 151 - 0.141 ms

If I watch the logs, I see the following:

01-20 22:31:23.555  1925 15179 E ReactNativeJS: TypeError: Object.freeze can only be called on Objects.
01-20 22:31:23.555  1925 15179 E ReactNativeJS: 
01-20 22:31:23.555  1925 15179 E ReactNativeJS: This error is located at:
01-20 22:31:23.555  1925 15179 E ReactNativeJS:     in HelloWorld (at renderApplication.js:35)
01-20 22:31:23.555  1925 15179 E ReactNativeJS:     in RCTView (at View.js:71)
01-20 22:31:23.555  1925 15179 E ReactNativeJS:     in View (at AppContainer.js:102)
01-20 22:31:23.555  1925 15179 E ReactNativeJS:     in RCTView (at View.js:71)
01-20 22:31:23.555  1925 15179 E ReactNativeJS:     in View (at AppContainer.js:122)
01-20 22:31:23.555  1925 15179 E ReactNativeJS:     in AppContainer (at renderApplication.js:34)
01-20 22:31:23.567  1925 15179 E ReactNativeJS: TypeError: Object.freeze can only be called on Objects.
01-20 22:31:23.567  1925 15179 E ReactNativeJS: 
01-20 22:31:23.567  1925 15179 E ReactNativeJS: This error is located at:
01-20 22:31:23.567  1925 15179 E ReactNativeJS:     in HelloWorld (at renderApplication.js:35)
01-20 22:31:23.567  1925 15179 E ReactNativeJS:     in RCTView (at View.js:71)
01-20 22:31:23.567  1925 15179 E ReactNativeJS:     in View (at AppContainer.js:102)
01-20 22:31:23.567  1925 15179 E ReactNativeJS:     in RCTView (at View.js:71)
01-20 22:31:23.567  1925 15179 E ReactNativeJS:     in View (at AppContainer.js:122)
01-20 22:31:23.567  1925 15179 E ReactNativeJS:     in AppContainer (at renderApplication.js:34)
01-20 22:31:23.575  1925 15179 W ReactNativeJS: Unable to symbolicate stack trace: JSON Parse error: Unrecognized token '<'
01-20 22:31:23.577  1925 15179 W ReactNativeJS: Unable to symbolicate stack trace: JSON Parse error: Unrecognized token '<'

Expected Behavior

My stack-traces would be able to be symbolicated just fine.

Haul Configuration (webpack.haul.js)

module.exports = ({ platform }, defaults) => ({
  entry: `./index.js`,
  module: {
    ...defaults.module,
    rules: [
      ...defaults.module.rules,
      {
        test: /\.js$/,
        use: ["source-map-loader"],
        enforce: "pre"
      }
    ]
  }
});

Your Environment

software version
Haul 1.0.0-beta.12
react-native 0.52
node 9.4.0
npm or yarn yarn 1.3.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions