aec-visual-reports icon indicating copy to clipboard operation
aec-visual-reports copied to clipboard

error in local enviroment

Open johnfelipe opened this issue 7 years ago • 10 comments

git clone https://github.com/Autodesk-Forge/aec-visual-reports.git

cd aec-visual-reports/

npm install

export FORGE_CLIENT_ID=xxxx
export FORGE_CLIENT_SECRET=ccccc

echo $FORGE_CLIENT_ID
echo $PORT

npm start

and show me this error

> [email protected] start /home/felipe/aec-visual-reports
> node bin/start.js

uncaughtException
{ Error: listen EADDRINUSE :::3000
	at Object.exports._errnoException (util.js:1020:11)
	at exports._exceptionWithHostPort (util.js:1043:20)
	at Server._listen2 (net.js:1262:14)
	at listen (net.js:1298:10)
	at Server.listen (net.js:1394:5)
	at EventEmitter.listen (/home/felipe/aec-visual-reports/node_modules/express/lib/application.js:618:24)
	at runServer (/home/felipe/aec-visual-reports/src/server/index.js:163:22)
	at Object.<anonymous> (/home/felipe/aec-visual-reports/src/server/index.js:189:1)
	at Module._compile (module.js:570:32)
	at loader (/home/felipe/aec-visual-reports/node_modules/babel-register/lib/node.js:144:5)
  code: 'EADDRINUSE',
  errno: 'EADDRINUSE',
  syscall: 'listen',
  address: '::',
  port: 3000 }
Error: listen EADDRINUSE :::3000
	at Object.exports._errnoException (util.js:1020:11)
	at exports._exceptionWithHostPort (util.js:1043:20)
	at Server._listen2 (net.js:1262:14)
	at listen (net.js:1298:10)
	at Server.listen (net.js:1394:5)
	at EventEmitter.listen (/home/felipe/aec-visual-reports/node_modules/express/lib/application.js:618:24)
	at runServer (/home/felipe/aec-visual-reports/src/server/index.js:163:22)
	at Object.<anonymous> (/home/felipe/aec-visual-reports/src/server/index.js:189:1)
	at Module._compile (module.js:570:32)
	at loader (/home/felipe/aec-visual-reports/node_modules/babel-register/lib/node.js:144:5)
dist/ directory not found, starting compiler ...
Starting compiler NODE_ENV=undefined
Unhandled Rejection at: Promise  Promise {
  <rejected> { Error: Cannot find module './undefined.webpack.config'
	at Function.Module._resolveFilename (module.js:469:15)
	at Function.Module._load (module.js:417:25)
	at Module.require (module.js:497:17)
	at require (internal/module.js:20:19)
	at build (/home/felipe/aec-visual-reports/webpack/index.js:42:25)
	at clean.then (/home/felipe/aec-visual-reports/webpack/index.js:61:3) code: 'MODULE_NOT_FOUND' } }  reason:  { Error: Cannot find module './undefined.webpack.config'
	at Function.Module._resolveFilename (module.js:469:15)
	at Function.Module._load (module.js:417:25)
	at Module.require (module.js:497:17)
	at require (internal/module.js:20:19)
	at build (/home/felipe/aec-visual-reports/webpack/index.js:42:25)
	at clean.then (/home/felipe/aec-visual-reports/webpack/index.js:61:3) code: 'MODULE_NOT_FOUND' }

How solved?

johnfelipe avatar Oct 24 '17 19:10 johnfelipe

Bro i do this:

export NODE_ENV=development
echo $NODE_ENV

sudo nano /home/felipe/aec-visual-reports/config/development.config.js

##
const PORT= 3020
##

sudo nano /home/felipe/aec-visual-reports/src/server/index.js

##
	  process.env.PORT || config.server_port || 3020, () => {
##

cp forge_auth.sh.example forge_auth.sh

sudo nano /home/felipe/aec-visual-reports/forge_auth.sh

##
# DEVELOPMENT SETUP
export FORGE_DEV_CLIENT_ID='cccc'
export FORGE_DEV_CLIENT_SECRET='vvvvv'
export NODE_ENV=development
export PORT=3020
##

npm start

and is working now, but show this

Unhandled Rejection at: Promise  Promise {
  <rejected> { developerMessage: 'The client_id specified does not have access to the api product',
  userMessage: '',
  errorCode: 'AUTH-001',
  'more info': 'http://developer.api.autodesk.com/documentation/v1/errors/AUTH-001' } }  reason:  { developerMessage: 'The client_id specified does not have access to the api product',
  userMessage: '',
  errorCode: 'AUTH-001',
  'more info': 'http://developer.api.autodesk.com/documentation/v1/errors/AUTH-001' }

How solve it?

johnfelipe avatar Oct 26 '17 13:10 johnfelipe

Hey John,

I just pushed an update to the version of the Viewer this sample is using. Now in regard to the ports you may want to check the Boiler plate we have for React with this same setup, once you make that work It will be ideal to move into this one to use the Visual Reports extension.

https://github.com/Autodesk-Forge/forge-react-boiler.nodejs

jaimerosales avatar Oct 26 '17 19:10 jaimerosales

I would make sure to check the URN's you are trying to load are connected to your own token. https://github.com/Autodesk-Forge/aec-visual-reports/blob/master/src/client/routes/Home/components/HomeView.js#L15

This URN's need to be swap with your own ones and use a valid token with it. Also I would say, check your callback URL.

jaimerosales avatar Oct 26 '17 19:10 jaimerosales

about forge-react-boiler.nodejs, is completed: http://200.122.209.133:3010/, but my question is in here, in this repo, why show me this:

Unhandled Rejection at: Promise  Promise {
  <rejected> { developerMessage: 'The client_id specified does not have access to the api product',
  userMessage: '',
  errorCode: 'AUTH-001',
  'more info': 'http://developer.api.autodesk.com/documentation/v1/errors/AUTH-001' } }  reason:  { developerMessage: 'The client_id specified does not have access to the api product',
  userMessage: '',
  errorCode: 'AUTH-001',
  'more info': 'http://developer.api.autodesk.com/documentation/v1/errors/AUTH-001' }

johnfelipe avatar Oct 26 '17 19:10 johnfelipe

i change ID and KEYSECRET with pantallazo-0400

Now is not show that error pantallazo-0401

But review with yourself

http://200.122.209.133:3020/

pantallazo-0402

johnfelipe avatar Oct 26 '17 19:10 johnfelipe

You are still trying to load my URN's. It will not work since your token does not have access to these URN's

You need to translate your models and swap the URN's in the location I mentioned before.

jaimerosales avatar Oct 26 '17 19:10 jaimerosales

Can u share me that rvt i translate with my ID?

johnfelipe avatar Oct 26 '17 20:10 johnfelipe

I don't have this man, Sorry.

jaimerosales avatar Oct 26 '17 20:10 jaimerosales

http://200.122.209.133:3020/viewer?urn=dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cGlzb3RpcGljb2xzeG51NGsyb3AybTM5OTRnanMwdGFib285ZWRwcDVyL0xhZ29zJTIwZGVsJTIwQ2FicmVyb19waXNvJTIwdGlwaWNvLnJ2dA

Is working now, but 2D is not showing, how fix it?

johnfelipe avatar Oct 26 '17 20:10 johnfelipe

Your model only contains 1 3D view. The viewer will not show a non existing 2D view. You can check what you have available in the ViewerView.js line 99 which will assign the value of what is available per model to items.

screen shot 2017-10-26 at 4 44 38 pm

jaimerosales avatar Oct 26 '17 20:10 jaimerosales