Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Fatal error: Cannot read property 'length' of null #56

Closed
demoive opened this issue May 14, 2015 · 5 comments
Closed

Fatal error: Cannot read property 'length' of null #56

demoive opened this issue May 14, 2015 · 5 comments

Comments

@demoive
Copy link

demoive commented May 14, 2015

I encounter a Fatal error: Cannot read property 'length' of null message when executing this task. It's unclear to me if the error originates within grunt-crx (possibly inside lib/crx.js?) or the crx node project or even within Grunt itself (doubtful, I suppose) so filing here for starters.

I've noticed that this has been logged before in #35 which references thom4parisot/crx#18 which then mentions being solved by thom4parisot/crx#20, but these were a year ago and the problem seems to persist.

My environment: Node v0.12.2, Grunt CLI v0.1.13, and Grunt v0.4.5.

Config settings followed by its verbose output:

    crx: {
      "public": {
        src: "src/crx-app/",
        dest: "./",
        zipDest: "./",
        privateKey: "../key.pem",
         options: {
          maxBuffer: (3000 * 1024)
         }
      }
    }
Running "crx:public" (crx) task
Verifying property crx.public exists in config...OK
Files: src/crx-app/ -> ./
Reading /Users/me/Projects/Chrome/test/node_modules/grunt-crx/lib/../data/config-default.json...OK
Parsing /Users/me/Projects/Chrome/test/node_modules/grunt-crx/lib/../data/config-default.json...OK
Reading ../key.pem...OK
Reading src/crx-app/manifest.json...OK
Parsing src/crx-app/manifest.json...OK
Reading package.json...OK
Parsing package.json...OK
Fatal error: Cannot read property 'length' of null
@yfr
Copy link

yfr commented May 20, 2015

Same for me here. Any news?

@chrisirhc
Copy link

Which version of grunt-crx are you using? I had this when I was on grunt-crx 0.3.2 but it was resolved after upgrading to grunt-crx 1.0.3 . Note that privateKey needs to move into options.privateKey, and you need to use a file glob for the src.

@yfr
Copy link

yfr commented Jun 8, 2015

I did the update but it did not work for me. Maybe i forgot to update the config too. I just switched to using the bare crx tool with a script in grunt.

@thom4parisot
Copy link
Owner

Sorry you all, is it related to #44 and #58. I kind of need your help on #44 if you have time for it :-)

@x1024
Copy link

x1024 commented Jul 11, 2015

I can confirm that the problem still exists, but updating to grunt-crx 1.0.3 fixes it.

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

No branches or pull requests

5 participants