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

--plugins.add analysisstorer triggers ERROR: TypeError: Cannot read property 'replace' of null #2305

Closed
donwalling opened this Issue Feb 12, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@donwalling
Copy link

donwalling commented Feb 12, 2019

create script.js to contain:

module.exports = async function(context, commands) {
    await commands.measure.start('https://www.sitespeed.io');
    await commands.measure.start('https://www.sitespeed.io/documentation/');
    return commands.measure.start('https://www.sitespeed.io/documentation/sitespeed.io/');
};

then the command

docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:8.3.0 --multi --spa --plugins.add analysisstorer script.js

will produce an exception

[2019-02-12 01:03:44] INFO: Versions OS: linux 4.9.125-linuxkit nodejs: v10.13.0 sitespeed.io: 8.3.0 browsertime: 4.3.0 coach: 3.2.1
[2019-02-12 01:03:44] ERROR: TypeError: Cannot read property 'replace' of null
    at /usr/src/app/lib/core/resultsStorage/pathToFolder.js:25:35
    at Array.forEach (<anonymous>)
    at pathFromRootToPageDir (/usr/src/app/lib/core/resultsStorage/pathToFolder.js:24:16)
    at Object.writeDataForUrl (/usr/src/app/lib/core/resultsStorage/storageManager.js:58:9)
    at Object.processMessage (/usr/src/app/lib/plugins/analysisstorer/index.js:49:34)
    at queue.process.message (/usr/src/app/lib/core/queueHandler.js:211:32)
    at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:96:21)
    at Immediate.drain [as _onImmediate] (/usr/src/app/node_modules/concurrent-queue/index.js:77:84)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

soulgalore added a commit that referenced this issue Feb 12, 2019

soulgalore added a commit that referenced this issue Feb 12, 2019

@soulgalore soulgalore added the bug label Feb 12, 2019

@soulgalore

This comment has been minimized.

Copy link
Member

soulgalore commented Feb 12, 2019

Thanks for filing the issue @donwalling and taking the time to create a reproducible test case! I just fixed this and released it in 8.4.0. I'm pretty sure it works now (I tested it) but please let me know if you still see the issue.

Best
Peter

@soulgalore soulgalore closed this Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.