passbolt / passbolt_browser_extension

Browser extensions (Firefox, Edge & Chrome) for Passbolt the open source password manager for teams
https://passbolt.com
GNU Affero General Public License v3.0
233 stars 72 forks source link

readme: grunt build triggers Icons not found, manifest not found #89

Closed thorleifjacobsen closed 4 years ago

thorleifjacobsen commented 4 years ago

Followed to install this on chrome to debug and code.

Wrote "grunt" and tried to add unpacked extension to chrome, got error "manifest.json" not found. Did a grunt for chrome and now it complains about icons. Is the readme outdated?

stripthis commented 4 years ago

Hi,

Yes it seems there is an issue with the readme, you can use instead

grunt build-chrome-debug
thorleifjacobsen commented 4 years ago

Hi Thanks

Tried that earlier got this error. Not sure what this is about, kinda new to extension dev :) hehe.

Warning: Command failed: ./node_modules/.bin/crx pack build/all/ -p key.pem -o dist/chrome/passbolt-2.12.0-debug.crx && rm -f dist/chrome/passbolt-latest@passbolt.com.crx && ln -fs passbolt-2.12.0-debug.crx dist/chrome/passbolt-latest@passbolt.com.crx
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open '/home/toffe/Projects/passbolt_browser_extension/dist/chrome/passbolt-2.12.0-debug.crx'
Emitted 'error' event at:
    at lazyFs.open (internal/fs/streams.js:272:12)
    at FSReqWrap.oncomplete (fs.js:141:20)
 Use --force to continue.
stripthis commented 4 years ago

Hello @thorleifjaocbsen i'm not sure about the second issue this seems to be related to your file system permissions. Maybe the task cannot write in dist or similar.

thorleifjacobsen commented 4 years ago

Hi, tried as SUDO same error. It says it could not find the "passbolt-2.12.0-debug.crx" not sure why it is not finding it.

The only place I could find "crx" referenced is in this grunt task:

      build_chrome_debug: {
        options: {
          stderr: false
        },
        command: [
          './node_modules/.bin/crx pack ' + path.build + ' -p key.pem -o ' + path.dist_chrome + 'passbolt-' + pkg.version + '-debug.crx',
          'rm -f '+ path.dist_chrome + 'passbolt-latest@passbolt.com.crx',
          'ln -fs passbolt-' + pkg.version + '-debug.crx ' + path.dist_chrome + 'passbolt-latest@passbolt.com.crx'
        ].join(' && ')
      },

So there must be something before it creating that crx first?

thorleifjacobsen commented 4 years ago

Ah, seems like it does not create the dist/chrome folder. I had to create the chrome folder manually.

mkdir -p build/chrome
mkdir -p dist/chrome 
grunt build-chrome-debug

then it worked.

stripthis commented 4 years ago

The dist/chrome folder is part of the code we ship, must have been deleted by another task you ran previously. Glad, you got it to work :)

thorleifjacobsen commented 4 years ago

Edit: Removing since it is not actual, had to remove and add extension to make it go away.