Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Unable to activate extension: Cannot read property 'major' of null #2200

Closed
droopygit opened this issue Apr 17, 2020 · 4 comments
Closed

Unable to activate extension: Cannot read property 'major' of null #2200

droopygit opened this issue Apr 17, 2020 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@droopygit
Copy link

When trying to activate extension I get the following error: Cannot read property 'major' of null".

Description

I tried the "Retry activation" button and also uninstall/reinstall the extension but I got the same error.

Steps to Reproduce

  1. Install IBM Blockchain Platform extension from VS Code
  2. Go to IBM Blockchain Platform in the VS Code Side Bar

Log File

[17/04/2020 à 18:18:10] [INFO] Starting IBM Blockchain Platform Extension
[17/04/2020 à 18:18:10] [INFO] Attempting to require dependency: grpc
[17/04/2020 à 18:18:10] [INFO] Restoring command registry
[17/04/2020 à 18:18:11] [INFO] Registering commands
[17/04/2020 à 18:18:12] [INFO] Execute stored commands in the registry
[17/04/2020 à 18:18:12] [INFO] IBM Blockchain Platform Extension activated
[17/04/2020 à 18:18:12] [ERROR] Failed to activate extension: TypeError: Cannot read property 'major' of null
[17/04/2020 à 18:18:12] [ERROR] TypeError: Cannot read property 'major' of null
at Function. (c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\build\extension\util\ExtensionUtil.js:596:54)
at Generator.next ()
at fulfilled (c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\build\extension\util\ExtensionUtil.js:18:58)

Your Environment

  • IBM Blockchain Platform Extension Version: 1.0.26
  • Visual Studio Code version: 1.44.2
  • Environment name and version (e.g. Node.js v8.12.0, npm v6.4.1): Node.js 10.20.1, npm 6.14.4
  • Operating System and version: Windows 10.0.18363
@Jakeeyturner Jakeeyturner added the bug Something isn't working label Apr 20, 2020
@droopygit
Copy link
Author

droopygit commented Apr 20, 2020

When I install the extension I got also this error:

[20/04/2020 à 12:16:51] [INFO] Error requiring dependency: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: electron-v7.1-win32-x64-unknown
Found: [node-v64-linux-x64-glibc]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module 'c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\node_modules\grpc\src\node\extension_binary\electron-v7.1-win32-x64-unknown\grpc_node.node'
Require stack:

  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\node_modules\grpc\src\grpc_extension.js
  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\node_modules\grpc\src\client_interceptors.js
  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\node_modules\grpc\src\client.js
  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\node_modules\grpc\index.js
  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\build\extension\dependencies\DependencyManager.js
  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\build\extension\webview\PreReqView.js
  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\build\extension\util\ExtensionUtil.js
  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\build\extension\util\Reporter.js
  • c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\build\extension\extension.js
  • c:\Users\xxx\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js
  • c:\Users\xxx\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js
  • c:\Users\xxx\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js
    [20/04/2020 à 12:16:51] [INFO] Updating native node modules
    [20/04/2020 à 12:16:51] [INFO] Rebuilding native node modules
    [20/04/2020 à 12:16:54] [INFO] > grpc@1.24.2 install c:\Users\xxx.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.26\node_modules\grpc
    [20/04/2020 à 12:16:54] [INFO] > node-pre-gyp install --fallback-to-build --library=static_library
    [20/04/2020 à 12:16:54] [INFO] node-pre-gyp
    [20/04/2020 à 12:16:54] [INFO]
    [20/04/2020 à 12:16:54] [INFO] WARN Using request for node-pre-gyp https download
    [20/04/2020 à 12:16:55] [INFO] node-pre-gyp WARN
    [20/04/2020 à 12:16:55] [INFO] Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/electron-v7.1-win32-x64-unknown.tar.gz
    [20/04/2020 à 12:16:55] [INFO] node-pre-gyp WARN Pre-built binaries not found for grpc@1.24.2 and electron@7.1.11 (electron-v7.1 ABI, unknown) (falling back to source compile with node-gyp)

Perhaps is it related? I don't know how to fix this.

Jakeeyturner added a commit to Jakeeyturner/blockchain-vscode-extension that referenced this issue Apr 20, 2020
Signed-off-by: Jake Turner <jaketurner25@live.com>
Jakeeyturner added a commit to Jakeeyturner/blockchain-vscode-extension that referenced this issue Apr 20, 2020
Signed-off-by: Jake Turner <jaketurner25@live.com>
@cazfletch cazfletch added this to the Sprint 29 milestone Apr 20, 2020
@cazfletch cazfletch added the next label Apr 20, 2020
@droopygit
Copy link
Author

When I apply your fix, I can activate the extension. Thanks.
But, after when I try to create a new project in the "smart contracts" area, the project is created but not displayed in this area. When I try the "Package Open Project" action I got an error: "TypeError: Cannot read property 'fsPath' of undefined".

@cazfletch
Copy link
Contributor

The project will only appear in the "smart contracts" area once it has been packaged. Did you do an npm install before you tried to package the open project?

@droopygit
Copy link
Author

Yes, I do an "npm install" then "Packages Open Project". I get the error

[ERROR] TypeError: Cannot read property 'fsPath' of undefined

I do this because when I "Create New Project" (Default Contract, TypeScript, MyAsset, Add to workspace), files are generated and the log indicates no error but the smart contract doesn't appear in the panel "smart contacts".

I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.
[21/04/2020 à 11:31:02] [SUCCESS] Successfully generated Smart Contract Project

I try to npm install manually. No error.

When I try npm start build I get the following error:

Project@0.0.1 start C:\Sources\Projects\Project
fabric-chaincode-node start "build"
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
fabric-chaincode-node start --peer.address localhost:7051 --chaincode-id-name mycc
Options:
--help Affiche de l'aide [booléen]
-v, --version Affiche le numéro de version [booléen]
--peer.address [chaine de caractère] [requis]
--grpc.max_send_message_length [nombre] [défaut: -1]
--grpc.max_receive_message_length [nombre] [défaut: -1]
--grpc.keepalive_time_ms [nombre] [défaut: 110000]
--grpc.http2.min_time_between_pings_ms [nombre] [défaut: 110000]
--grpc.keepalive_timeout_ms [nombre] [défaut: 20000]
--grpc.http2.max_pings_without_data [nombre] [défaut: 0]
--grpc.keepalive_permit_without_calls [nombre] [défaut: 1]
--ssl-target-name-override [chaine de caractère]
--chaincode-id-name [chaine de caractère] [requis]
--module-path [chaine de caractère] [défaut: "C:\Sources\Projects\Project"]
Arguments requis manquants: peer.address, chaincode-id-name

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants