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

local setup incorrectly #13

Open
johnfelipe opened this issue Oct 24, 2017 · 3 comments
Open

local setup incorrectly #13

johnfelipe opened this issue Oct 24, 2017 · 3 comments

Comments

@johnfelipe
Copy link

This is my steps:

git clone https://github.com/Autodesk-Forge/viewer-react-express-headless.git
cd viewer-react-express-headless/
cd server
cp credentials_.js credentials.js

sudo nano /home/felipe/viewer-react-express-headless/server/credentials.js

##

		client_id: process.env.FORGE_CLIENT_ID || 'ccccc',
		client_secret: process.env.FORGE_CLIENT_SECRET || 'xxxxxxx',
##
cd ..
npm install

sudo nano /home/felipe/viewer-react-express-headless/server/server.js

##
app.set('port', (process.env.PORT || 3002));
##

npm run watch

show me this

Something is already running on port 3000.

Would you like to run the app on another port instead? [Y/n]

I put Y

Starting the development server...

Compiled successfully!

The app is running at:

http://localhost:3003/

Note that the development build is not optimized.
To create a production build, use npm run build.

If i put
app.set('port', (process.env.PORT || 3002));

Why run in 3003?

An run 3002 to, but with errors:

pantallazo-0395

In console show me this:

THREE.WebGLRenderer 71
viewer3D.min.js?v=v2.14:2175 GET https://developer.api.autodesk.com/viewingservice/v1/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmlld2VyLXJvY2tzLXJlYWN0L1JDJTIwQ2FyLmYzZA 401 (Unauthorized)
i.rawGet @ viewer3D.min.js?v=v2.14:2175
i.getManifest @ viewer3D.min.js?v=v2.14:2184
k @ viewer3D.min.js?v=v2.14:9539
d.load @ viewer3D.min.js?v=v2.14:9543
i @ Viewer-helpers.js:66
(anonymous) @ Viewer-helpers.js:59
XMLHttpRequest.send (async)
b.refreshCookie @ viewer3D.min.js?v=v2.14:18958
b.refreshToken @ viewer3D.min.js?v=v2.14:18971
b.initializeAuth @ viewer3D.min.js?v=v2.14:18982
e @ viewer3D.min.js?v=v2.14:19204
developer.api.autodesk.com/viewingservice/v1/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmlld2VyLXJvY2tzLXJlYWN0L1JDJTIwQ2FyLmYzZA:1 GET https://developer.api.autodesk.com/viewingservice/v1/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmlld2VyLXJvY2tzLXJlYWN0L1JDJTIwQ2FyLmYzZA 401 (Unauthorized)
Viewer-helpers.js:89 
@johnfelipe
Copy link
Author

credentials: {
	// Replace placeholder below by the Consumer Key and Consumer Secret you got from
	// http://developer.autodesk.com/ for the production server
	client_id: process.env.FORGE_CLIENT_ID || 'cccc',
	client_secret: process.env.FORGE_CLIENT_SECRET || 'vvvvv',
	grant_type: 'client_credentials',
	scope: 'viewables:read', // Setup the needed scopes for authorizing your Token
	callbackUrl: process.env.CALLBACK_URL || ''
},

pantallazo-0400

	callbackUrl: process.env.CALLBACK_URL || ''

i can put that void?

@jaimerosales
Copy link
Collaborator

I'm updating this sample to use latest version of the viewer. Give me a couple of minutes ok.

@jaimerosales
Copy link
Collaborator

updated to version 3.2, check that you are passing in the correct URN's to the viewer.

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

2 participants