problem with app-bom-master and app-stl-viewer-master samples
matthias_gubsch641
Member, Developers Posts: 6 ✭✭
in General
hallo,
i'm trying to understand the samples of node.js applications. i tried app-bom-master and app-stl-viewer-master.
the readme explains very well how to install the applications, so i was successfull in adding these applications to my onshape session.
if i try to use them i run in both cases in the same problem within the first "$.ajax" call:
Cannot read property 'accessToken of undefined
something i did was wrong, but i have no idea what. i didn't also no information in the documentation ...
does anybody has the same problem? any solutions idea?
thanks
matthias
i'm trying to understand the samples of node.js applications. i tried app-bom-master and app-stl-viewer-master.
the readme explains very well how to install the applications, so i was successfull in adding these applications to my onshape session.
if i try to use them i run in both cases in the same problem within the first "$.ajax" call:
Cannot read property 'accessToken of undefined
something i did was wrong, but i have no idea what. i didn't also no information in the documentation ...
does anybody has the same problem? any solutions idea?
thanks
matthias
Tagged:
0
Best Answer
-
thanks mbattistello!
but clientID/clientSecret was correct, this piece of code is well documented.
in the meantime we figured out the problem, and if i read all the hints more carefully, i could have known ...
the problem was, i have defined the wrong iframe URL. i followed the gray sample text und didn't not add /oathSignin on the end of this definition. that's i never reached the login part of the sample code
i think it may be a good idea to add this as a comment to the REDME.md
kind regards
Matthias0
Answers
-
I dont think the OAuth token is working. Did you setup the clientID and clientSecret fields in the authentication.js files?
Can you post more of the error trace?0 -
thanks mbattistello!
but clientID/clientSecret was correct, this piece of code is well documented.
in the meantime we figured out the problem, and if i read all the hints more carefully, i could have known ...
the problem was, i have defined the wrong iframe URL. i followed the gray sample text und didn't not add /oathSignin on the end of this definition. that's i never reached the login part of the sample code
i think it may be a good idea to add this as a comment to the REDME.md
kind regards
Matthias0 -
Aha, thanks for posting this. I had the exact same problem trying out those 2 demos and was unsure what was going on. I too just followed the grey default text in the iframe input field ("https://example.com") and simply pasted the herokuapp url, not realizing "/oauthSignin" was supposed to be appended at the end. In hindsight, the sample instructions do mention that as a "URL for sign-in". I guess it could be a little more clear that that goes in the iframe field.
Anyway, works now thanks to your tip.Clara.io Developer0
Categories
- All Categories
- 10.2K Community Support
- 4.6K General
- 194 Account and subscriptions
- 353 Data management
- 1.6K Product Feedback
- 215 New in Onshape
- 14 Onshape Labs
- 75 CAM Studio
- 35 PCB Studio
- 107 Simulation
- 209 Onshape Mobile
- 315 App Store & Partners Apps
- 8.2K Using Onshape
- 1.8K Drawings
- 2.3K FeatureScript
- 324 Learning Center
- 253 Education Community
