anandbn / mdata-docker

8 stars 9 forks source link

running on mac Cannot GET / issue #2

Open BenBozou opened 4 years ago

BenBozou commented 4 years ago

Hi

When running on mac, I managed to run the ./run_mdata.sh up command successfully, and then I'm getting the following issue when getting to http://localhost:3000/:

Cannot GET /

Any idea why? Thanks

carchiere commented 4 years ago

Hi,

Myself and another PA have this same issue.

rtanikella commented 4 years ago

@carchiere @BenBozou Try editing the web.js file, line 69 from

app.use(express.static('./app/public'));

to

app.use(express.static('./public'));

I will try to send a pull request to reflect this change

ctalbotSFDC commented 4 years ago

I've done this & now when I authenticate to a sandbox, I get to a page for Authorization successful !!! I've also gone into config.js and made all of the items true, but that didn't get me past the authorization successful - other ideas?

Oh - also side note, the readme shows to run mdata_run, but it's actually run_mdata :)

BenBozou commented 4 years ago

this is OK

This means that you had passed the authorization and the worker has been triggered for indexing. You should see in your console log that the worker is getting all the metadata indexed and if you access the neo4j interface you should see available entities to build your queries and graphs

rtanikella commented 4 years ago

@ctalbotSFDC At present that "Authorization successful!!" is the dead end. You'll note the mdata worker's log begins capturing the indexing activity, but at present there is no GUI beyond this.

Options:

Obviously, wait for indexing to complete for best results.

ctalbotSFDC commented 4 years ago

Mine dies with this message:

2020-06-08T14:59:57.285Z [mdata-indexer] info: [00D0r0000008cvQEAQ] Completed indexing PublicGroups mdata-worker_1 | logFileName:logs/reporttypes.log mdata-worker_1 | 2020-06-08T14:59:57.985Z [reporttypes] debug: [00D0r0000008cvQEAQ] Fetched report type categories 13 mdata-worker_1 | (node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined mdata-worker_1 | at ReportTypes.createReportTypes (/app/metadata/ReportTypes.js:46:39) mdata-worker_1 | at runMicrotasks () mdata-worker_1 | at processTicksAndRejections (internal/process/task_queues.js:97:5) mdata-worker_1 | at async ReportTypes.process (/app/metadata/ReportTypes.js:101:9) mdata-worker_1 | at async MdataIndexer.startIndexing (/app/MdataIndexer.js:111:17) mdata-worker_1 | at async handleMdataIndexRequest (/app/mdata-worker.js:45:5) mdata-worker_1 | at async Command.callback (/app/mdata-worker.js:27:13) mdata-worker_1 | (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) mdata-worker_1 | (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

BenBozou commented 4 years ago

@ctalbotSFDC same here. For now I’ve removed report type, report and list view from the config file

I’ll try to debug it to understand what is going on later

ctalbotSFDC commented 4 years ago

Fixed by updating the reporttypes.js file to have an if(results.records) { } around the for loop on line 46

rtanikella commented 4 years ago

@ctalbotSFDC My not-so-thoroughly-tested solution (which, once I clean up my branch I can submit) is as follows:

Edit ReportTypes.js, method createReportTypes() to replace results.records with results.

Try that and let me know how it works.

What you may find thereafter is a different issue (it occurred to me on ListViews.js, but I expect is not limited to that metadata type) when a query from EntityDefinition returns over 2000 results. This requires a more involved treatment with testing. This stems, from what I've gathered so far, from the SOQL limitation on EntityDefinition that it does not support queryMore().

ctalbotSFDC commented 4 years ago

@rtanikella your fix for reporttypes doesn't work, but mine does with the check on results.records existing

also - the listviews.js gets stuck on extracting the .zip file -- still researching how to fix