rajivjc / mortgage-blockchain-demo

A demo DApp on Ethereum to process mortgage loans and payments
44 stars 24 forks source link

Mortage js object is not defined? #3

Closed robert07ravikumar closed 6 years ago

robert07ravikumar commented 6 years ago

I am running the application on windows 7 machine . I am able to bring up the application . When i click "Initiate loan contract " or any other button . I get the below error .

Javascript error below

Uncaught ReferenceError: Mortgage is not defined at deployLoanContract (app.js:22238) at HTMLButtonElement. (app.js:22532) at HTMLButtonElement.dispatch (jquery.min.js:3) at HTMLButtonElement.r.handle (jquery.min.js:3)

# Please find the testrpc terminal logs below .

E:\blockchain\truffle\demo\mortgage-blockchain-demo>testrpc EthereumJS TestRPC v 3.0.3 EthereumJS TestRPC v6.0.3 (ganache-core: 2.0.2)

Available Accounts (0) 0x98921a28221d17199122174ff593281dc987c7e4 (1) 0xa21415a48b9bebf57f7602df006ab637160b3836 (2) 0x1556a064ccb06a4abfc7a1b1b3cf4aa05e475ce9 (3) 0xfd95111e80c8f0b1bdcbc50d2dd1fc96732a07b6 (4) 0xd53363c7a2f325e3cfc317ebfc6b665dfa38fa7d (5) 0x67ecaf010dc64029813661da148a1d86340010e6 (6) 0x6fbf875fcf833cb93e8bfe0fbd7c539594916a7a (7) 0x27745a94f9af1127a710b2d7e0524eb24e013770 (8) 0xe5ee38c6eedafe82ed67f3d607ba6f5102a4ce0a (9) 0xdafde31a46988783cc4cf3aa63c343c228c86cc5

Private Keys (0) 327f9caa05c4d17f5a7bdbadcf4bfae260a346f0a64277c4d80fe10644cc297b (1) c185c50d582657bcfb3cade4857b04096cd4470b9bba5ce1b47ffb944b0e6754 (2) 5adb9af9673e148a6b93729fdb00cf67e09453caa43cc3fc03c184a08dbf4c5d (3) 7989bd05b19e36b6e26c1d4aca654c0dc322388f6c22da33ecf8fc9344f9fa54 (4) cccf203f31e0633d14ddb16639bd86d85e11bbc8ef8cec290ddb0959093265de (5) d756adf78c63cd264f63f4bc25ebdf25c6ecb3dc3ec18298707dbdca1535f547 (6) 899ee31a2d613f597bd55bbdfe0624b2f08520f40a9b4be98866c81f1658717f (7) 816ed584b3de80e60d3e7b7013b0ae77a955b42d158d11d3b28b9f00b5cb60f5 (8) 93f3cf87b812dd7553796265e2f8d86665fdff9bf6a1b5f0cb3c47a63a33d9d8 (9) 326a34089b24915afde7d67fcda240836c8461ac398b6ba60daa4884aaef6dae

HD Wallet Mnemonic: camera renew range shell imitate switch steel feed elite bargain lecture burst Base HD Path: m/44'/60'/0'/0/{account_index}

Listening on localhost:8545 eth_accounts net_version eth_accounts eth_accounts net_version net_version eth_sendTransaction

Transaction: 0x92b3334cb91885e7625845a60122c4d0a1cfa71c4b2122289214b3d08f98e42 1 Contract created: 0x662ec09dca6e08f6a088e53a8e3b9ca47f98b155 Gas usage: 269607 Block Number: 1 Block Time: Fri Jan 26 2018 00:21:42 GMT+0400 (Arabian Standard Time)

eth_newBlockFilter eth_getFilterChanges eth_getTransactionReceipt eth_getCode eth_uninstallFilter eth_sendTransaction

Transaction: 0x91a5157cdb013756f8c4358a1db6a8dbd9f0103c60d3b9e8e612903867018b5 9 Gas usage: 41981 Block Number: 2 Block Time: Fri Jan 26 2018 00:21:42 GMT+0400 (Arabian Standard Time)

eth_getTransactionReceipt eth_accounts net_version net_version eth_sendTransaction

Transaction: 0x5bcdd09e6bb21b713db3fb22f472a47280066c52d43e0ae47b62d4c8ae27ab7 5 Contract created: 0xa5034b953a720d062f6dbc0b14fc60c669db8a1f Gas usage: 1016403 Block Number: 3 Block Time: Fri Jan 26 2018 00:21:42 GMT+0400 (Arabian Standard Time)

eth_newBlockFilter eth_getFilterChanges eth_getTransactionReceipt eth_getCode eth_uninstallFilter eth_accounts

rajivjc commented 6 years ago

Can you send me the app.js that was generated after the build ?

robert07ravikumar commented 6 years ago

I deleted the build folder and built the project again .. resolved the issue .

ylcnky commented 6 years ago

Hi, I have the same error, I deleted the build folder and built again as @robert07ravikumar mentioned, but problem is still there. I attached the app.js file after the build. Can you please check whether I am missing sth? Thanks for the good work. app_js.zip

aaqib90 commented 5 years ago

@ylcnky Did you get the solution?