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

throw new Error('A valid hashing function has to be specified in the configuration file <package.json>') (mijin-test-0.9.0.1) #38

Open
44uk opened this issue Feb 2, 2020 · 2 comments

Comments

@44uk
Copy link

44uk commented Feb 2, 2020

I met following error on rest-gateway. (using tag mijin-test-0.9.0.1)

rest-gateway_1            | > [email protected] start /app/rest
rest-gateway_1            | > node _build/index.js "resources/rest.json" "/userconfig/rest.json"
rest-gateway_1            |
rest-gateway_1            | /app/catapult-sdk/_build/crypto/sha3Hasher.js:40
rest-gateway_1            | 	throw new Error('A valid hashing function has to be specified in the configuration file <package.json>');
rest-gateway_1            | 	^
rest-gateway_1            |
rest-gateway_1            | Error: A valid hashing function has to be specified in the configuration file <package.json>
rest-gateway_1            |     at Object.<anonymous> (/app/catapult-sdk/_build/crypto/sha3Hasher.js:40:8)
rest-gateway_1            |     at Module._compile (internal/modules/cjs/loader.js:778:30)
rest-gateway_1            |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
rest-gateway_1            |     at Module.load (internal/modules/cjs/loader.js:653:32)
rest-gateway_1            |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
rest-gateway_1            |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
rest-gateway_1            |     at Module.require (internal/modules/cjs/loader.js:692:17)
rest-gateway_1            |     at require (internal/modules/cjs/helpers.js:25:18)
rest-gateway_1            |     at Object.<anonymous> (/app/catapult-sdk/_build/crypto/keyPair.js:22:20)
rest-gateway_1            |     at Module._compile (internal/modules/cjs/loader.js:778:30)
rest-gateway_1            | npm ERR! code ELIFECYCLE
rest-gateway_1            | npm ERR! errno 1
rest-gateway_1            | npm ERR! [email protected] start: `node _build/index.js "resources/rest.json" "/userconfig/rest.json"`
rest-gateway_1            | npm ERR! Exit status 1
rest-gateway_1            | npm ERR!
rest-gateway_1            | npm ERR! Failed at the [email protected] start script.
rest-gateway_1            | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
rest-gateway_1            |
rest-gateway_1            | npm ERR! A complete log of this run can be found in:
rest-gateway_1            | npm ERR!     /root/.npm/_logs/2020-02-02T08_08_35_415Z-debug.log
@CrackTheCode016
Copy link

I too am having trouble. Even with putting HASHING_FUNCTION=sha3, I get the following error:

rest-gateway_1            | 
rest-gateway_1            | > [email protected] start /app/rest
rest-gateway_1            | > node _build/index.js "resources/rest.json" "/userconfig/rest.json"
rest-gateway_1            | 
rest-gateway_1            | [winston] Attempt to write logs with no transports {"message":"loading config from resources/rest.json","level":"info"}
rest-gateway_1            | [winston] Attempt to write logs with no transports {"message":"loading config from /userconfig/rest.json","level":"info"}
rest-gateway_1            | /app/catapult-sdk/_build/utils/objects.js:59
rest-gateway_1            | 					throw new Error(`unknown '${key}' key in config`);
rest-gateway_1            | 					^
rest-gateway_1            | 
rest-gateway_1            | Error: unknown 'pageSizeStep' key in config
rest-gateway_1            |     at Object.keys.forEach.key (/app/catapult-sdk/_build/utils/objects.js:59:12)
rest-gateway_1            |     at Array.forEach (<anonymous>)
rest-gateway_1            |     at Object.checkSchemaAgainstTemplate (/app/catapult-sdk/_build/utils/objects.js:54:23)
rest-gateway_1            |     at Object.keys.forEach.key (/app/catapult-sdk/_build/utils/objects.js:56:13)
rest-gateway_1            |     at Array.forEach (<anonymous>)
rest-gateway_1            |     at Object.checkSchemaAgainstTemplate (/app/catapult-sdk/_build/utils/objects.js:54:23)
rest-gateway_1            |     at configFiles.forEach.configFile (/app/rest/_build/index.js:74:27)
rest-gateway_1            |     at Array.forEach (<anonymous>)
rest-gateway_1            |     at loadConfig (/app/rest/_build/index.js:68:14)
rest-gateway_1            |     at /app/rest/_build/index.js:148:17
rest-gateway_1            | npm ERR! code ELIFECYCLE
rest-gateway_1            | npm ERR! errno 1
rest-gateway_1            | npm ERR! [email protected] start: `node _build/index.js "resources/rest.json" "/userconfig/rest.json"`
rest-gateway_1            | npm ERR! Exit status 1
rest-gateway_1            | npm ERR! 
rest-gateway_1            | npm ERR! Failed at the [email protected] start script.
rest-gateway_1            | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
rest-gateway_1            | 
rest-gateway_1            | npm ERR! A complete log of this run can be found in:
rest-gateway_1            | npm ERR!     /root/.npm/_logs/2020-02-02T13_12_43_955Z-debug.log
docker_rest-gateway_1 exited with code 1

@jontey
Copy link

jontey commented Feb 3, 2020

I too am having trouble. Even with putting HASHING_FUNCTION=sha3, I get the following error:

rest-gateway_1            | 
rest-gateway_1            | > [email protected] start /app/rest
rest-gateway_1            | > node _build/index.js "resources/rest.json" "/userconfig/rest.json"
rest-gateway_1            | 
rest-gateway_1            | [winston] Attempt to write logs with no transports {"message":"loading config from resources/rest.json","level":"info"}
rest-gateway_1            | [winston] Attempt to write logs with no transports {"message":"loading config from /userconfig/rest.json","level":"info"}
rest-gateway_1            | /app/catapult-sdk/_build/utils/objects.js:59
rest-gateway_1            | 					throw new Error(`unknown '${key}' key in config`);
rest-gateway_1            | 					^
rest-gateway_1            | 
rest-gateway_1            | Error: unknown 'pageSizeStep' key in config
rest-gateway_1            |     at Object.keys.forEach.key (/app/catapult-sdk/_build/utils/objects.js:59:12)
rest-gateway_1            |     at Array.forEach (<anonymous>)
rest-gateway_1            |     at Object.checkSchemaAgainstTemplate (/app/catapult-sdk/_build/utils/objects.js:54:23)
rest-gateway_1            |     at Object.keys.forEach.key (/app/catapult-sdk/_build/utils/objects.js:56:13)
rest-gateway_1            |     at Array.forEach (<anonymous>)
rest-gateway_1            |     at Object.checkSchemaAgainstTemplate (/app/catapult-sdk/_build/utils/objects.js:54:23)
rest-gateway_1            |     at configFiles.forEach.configFile (/app/rest/_build/index.js:74:27)
rest-gateway_1            |     at Array.forEach (<anonymous>)
rest-gateway_1            |     at loadConfig (/app/rest/_build/index.js:68:14)
rest-gateway_1            |     at /app/rest/_build/index.js:148:17
rest-gateway_1            | npm ERR! code ELIFECYCLE
rest-gateway_1            | npm ERR! errno 1
rest-gateway_1            | npm ERR! [email protected] start: `node _build/index.js "resources/rest.json" "/userconfig/rest.json"`
rest-gateway_1            | npm ERR! Exit status 1
rest-gateway_1            | npm ERR! 
rest-gateway_1            | npm ERR! Failed at the [email protected] start script.
rest-gateway_1            | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
rest-gateway_1            | 
rest-gateway_1            | npm ERR! A complete log of this run can be found in:
rest-gateway_1            | npm ERR!     /root/.npm/_logs/2020-02-02T13_12_43_955Z-debug.log
docker_rest-gateway_1 exited with code 1

This is because the pageSizeStep option has been removed in the rest.json config.

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