Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7.1 RC: Cannot read property 'substr' of undefined #10165

Closed
KoenLav opened this issue Aug 18, 2018 · 7 comments
Closed

1.7.1 RC: Cannot read property 'substr' of undefined #10165

KoenLav opened this issue Aug 18, 2018 · 7 comments
Assignees
Milestone

Comments

@KoenLav
Copy link
Contributor

KoenLav commented Aug 18, 2018

TypeError: Cannot read property 'substr' of undefined
    at Function.<anonymous> (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\source-map\lib\source-node.js:115:29)
    at Array.forEach (<anonymous>)
    at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\source-map\lib\source-map-consumer.js:155:16)
    at Function.SourceNode_fromStringWithSourceMap [as fromStringWithSourceMap] (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\source-map\lib\source-node.js:80:26)
    at C:\tools\isobuild\linker.js:774:38
    at reallyRecompute (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\optimism\lib\entry.js:301:28)
    at recomputeIfDirty (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\optimism\lib\entry.js:259:12)
    at Entry.recompute (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\optimism\lib\entry.js:87:10)
    at optimistic (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\optimism\lib\index.js:82:23)
    at File.getPrelinkedOutput (C:\tools\isobuild\linker.js:715:12)
    at walk (C:\tools\isobuild\linker.js:350:23)
    at _.each (C:\tools\isobuild\linker.js:359:11)
    at Array.forEach (<anonymous>)
    at Function._.each._.forEach (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
    at walk (C:\tools\isobuild\linker.js:357:11)
    at _.each (C:\tools\isobuild\linker.js:359:11)
    at Array.forEach (<anonymous>)
    at Function._.each._.forEach (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
    at walk (C:\tools\isobuild\linker.js:357:11)
    at _.each (C:\tools\isobuild\linker.js:359:11)
    at Array.forEach (<anonymous>)
    at Function._.each._.forEach (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
    at walk (C:\tools\isobuild\linker.js:357:11)
    at _.each (C:\tools\isobuild\linker.js:359:11)
    at Array.forEach (<anonymous>)
    at Function._.each._.forEach (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
    at walk (C:\tools\isobuild\linker.js:357:11)
    at _.each (C:\tools\isobuild\linker.js:359:11)
    at Array.forEach (<anonymous>)
    at Function._.each._.forEach (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
    at walk (C:\tools\isobuild\linker.js:357:11)
    at _.each (C:\tools\isobuild\linker.js:359:11)
    at Array.forEach (<anonymous>)
    at Function._.each._.forEach (C:\Users\koenl\AppData\Local\.meteor\packages\meteor-tool\1.7.1-rc.2\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
    at walk (C:\tools\isobuild\linker.js:357:11)
    at trees.forEach (C:\tools\isobuild\linker.js:379:7)
    at Map.forEach (<anonymous>)
    at Module._chunkifyModuleTrees (C:\tools\isobuild\linker.js:377:11)
    at Module.getPrelinkedFiles (C:\tools\isobuild\linker.js:178:24)
    at Object.fullLink (C:\tools\isobuild\linker.js:1064:31)
    at buildmessage.enterJob (C:\tools\isobuild\compiler-plugin.js:1640:28)
    at C:\tools\utils\buildmessage.js:359:18
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:352:34
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:350:23
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
    at PackageSourceBatch._linkJS (C:\tools\isobuild\compiler-plugin.js:1639:18)
    at PackageSourceBatch.getResources (C:\tools\isobuild\compiler-plugin.js:1530:28)
    at sourceBatches.forEach.sourceBatch (C:\tools\isobuild\bundler.js:1138:37)
    at Array.forEach (<anonymous>)
    at ClientTarget._emitResources (C:\tools\isobuild\bundler.js:1120:19)
    at buildmessage.enterJob (C:\tools\isobuild\bundler.js:841:12)
    at C:\tools\utils\buildmessage.js:359:18
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:352:34
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:350:23
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
    at ClientTarget.make (C:\tools\isobuild\bundler.js:829:18)
    at C:\tools\isobuild\bundler.js:3073:14
    at webArchs.forEach.arch (C:\tools\isobuild\bundler.js:3222:25)
    at Array.forEach (<anonymous>)
    at C:\tools\isobuild\bundler.js:3178:14
    at C:\tools\utils\buildmessage.js:271:13
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:264:29
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:262:18
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:253:23
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.capture (C:\tools\utils\buildmessage.js:252:19)
    at bundle (C:\tools\isobuild\bundler.js:3054:31)
    at files.withCache (C:\tools\isobuild\bundler.js:2999:32)
    at Object.withCache (C:\tools\fs\files.js:1710:12)
    at Object.exports.bundle (C:\tools\isobuild\bundler.js:2999:16)
    at Profile.run (C:\tools\runners\run-app.js:569:24)
    at Function.run (C:\tools\tool-env\profile.js:490:12)
    at bundleApp (C:\tools\runners\run-app.js:568:34)
    at AppRunner._runOnce (C:\tools\runners\run-app.js:610:35)
    at AppRunner._fiber (C:\tools\runners\run-app.js:908:28)
    at C:\tools\runners\run-app.js:398:12
@KoenLav
Copy link
Contributor Author

KoenLav commented Aug 19, 2018

On Windows 10 x64

@benjamn
Copy link
Contributor

benjamn commented Aug 21, 2018

Any chance of a small reproduction? 🙏

@KoenLav
Copy link
Contributor Author

KoenLav commented Sep 4, 2018

@benjamn if I had any idea of the cause of this issue I could isolate it into a reproduction, but I literally have none.

It seems to error out on a meteor-tool command though, maybe you have some insights on what the build process is doing in this stage that could help me narrow down the issue?

@alexandesigner
Copy link

alexandesigner commented Sep 11, 2018

I'm having the same problem, I'll create a small reproduction.


@benjamn see reproduction: https://github.com/alexandesigner/meteor-issue-10165

Initial error log excerpt

/Users/alexandesigner/.meteor/packages/coffeescript/.1.0.17.rrtscr.ieami++os+web.browser+web.cordova/plugin.compileCoffeescript.os/npm/node_modules/meteor
/promise/node_modules/meteor-promise/promise_server.js:116
      throw error;
      ^
TypeError: Cannot read property 'substr' of undefined
...

@benjamn benjamn added this to the Release 1.7.1 milestone Sep 11, 2018
@benjamn benjamn self-assigned this Sep 11, 2018
@benjamn
Copy link
Contributor

benjamn commented Sep 11, 2018

This appears to be a bug in the source-map npm package that has (hopefully) been fixed by mozilla/source-map#288.

benjamn added a commit that referenced this issue Sep 11, 2018
@benjamn
Copy link
Contributor

benjamn commented Sep 11, 2018

This should be fixed if you update to the latest Meteor 1.7.1 release candidate:

meteor update --release 1.7.1-rc.11

I didn't end up updating the source-map library since newer versions had all sorts of new problems, but I was able to mitigate the root cause, which was accidentally using a CSS source map for a stub output file (containing just a comment) that had no meaningful mapping back to the source file: 08027c9

@benjamn benjamn closed this as completed Sep 11, 2018
@KoenLav
Copy link
Contributor Author

KoenLav commented Sep 11, 2018

FIxed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants