【发布时间】:2019-02-12 09:39:05
【问题描述】:
我完成了http://learnforge.autodesk.io 教程,并且应用程序在本地运行良好。但是当我尝试将forge.tutorial.viewhubmodels.nodejs 应用程序部署到 Heroku 时,我在尝试登录时收到以下错误:
GET https://forgebcsample.herokuapp.com/api/forge/oauth/token 401 (Unauthorized)
Heroku 仪表板中的配置变量是正确的,我更新了 Forge 开发人员门户中的值,正如部署教程中所述。我什至尝试将 FORGE_CLIENT_ID、FORGE_CLIENT_SECRET 和 FORGE_CALLBACK_URL 硬编码到应用程序中,但错误仍然存在。
Heroku 日志:
- 2018-09-07T06:59:41.950470+00:00 heroku[router]: at=info method=GET path="/" host=forgebcsample.herokuapp.com request_id=6ef8e0d2-d814-478a-bbe2-e624789aceee fwd="202.148.226.254" dyno=web.1 connect=1ms service=2ms status=304 bytes=237 protocol=https
- 2018-09-07T06:59:42.215849+00:00 heroku[路由器]: at=info method=GET path="/js/ForgeTree.js" host=forgebcsample.herokuapp.com request_id=6d58c9c0-afce- 4c44-b1e0-f9d40326c607 fwd="202.148.226.254" dyno=web.1 connect=1ms service=2ms status=304 bytes=238 protocol=https
- 2018-09-07T06:59:42.214891+00:00 heroku[router]: at=info method=GET path="/css/main.css" host=forgebcsample.herokuapp.com request_id=66be297d-0707- 4e5d-8c6a-c4fb269c11f0 fwd="202.148.226.254" dyno=web.1 connect=1ms service=2ms status=304 bytes=237 protocol=https
- 2018-09-07T06:59:42.453624+00:00 heroku[路由器]: at=info method=GET path="/js/ForgeViewer.js" host=forgebcsample.herokuapp.com request_id=bc8f0050-1ca2- 46b9-84be-d1e36c8afcf4 fwd="202.148.226.254" dyno=web.1 connect=1ms service=4ms status=304 bytes=237 protocol=https
- 2018-09-07T06:59:43.486820+00:00 heroku[路由器]: at=info method=GET path="/api/forge/oauth/token" host=forgebcsample.herokuapp.com request_id=d6acdca3- 1424-48b9-9480-d0497af58179 fwd="202.148.226.254" dyno=web.1 connect=1ms service=2ms status=401 bytes=127 protocol=https
- 2018-09-07T07:00:51.391643+00:00 heroku[路由器]: at=info method=GET path="/api/forge/oauth/url" host=forgebcsample.herokuapp.com request_id=ab185f67- 7288-43ce-bdf7-9551b8771bba fwd="202.148.226.254" dyno=web.1 connect=1ms service=2ms status=200 bytes=382 protocol=https
- 2018-09-07T07:00:58.551942+00:00 heroku[router]: at=info method=GET path="/api/forge/callback/oauth?code=46TAvefGUSv_xZ6cTJKzyx-t-HT6Y2FzvDyzZQIS" host=forgebcsample .herokuapp.com request_id=b67abc9f-419e-47d3-892a-3fcc6fbf7f7d fwd="202.148.226.254" dyno=web.1 connect=1ms service=227ms status=302 bytes=234 protocol=https
- 2018-09-07T07:00:58.808686+00:00 heroku[路由器]: at=info method=GET path="/" host=forgebcsample.herokuapp.com request_id=1a2ff1de-513e-40e2-a73a-0b48781a06bc fwd="202.148.226.254" dyno=web.1 connect=1ms service=17ms status=304 bytes=237 protocol=https
- 2018-09-07T07:00:59.082869+00:00 heroku[router]: at=info method=GET path="/css/main.css" host=forgebcsample.herokuapp.com request_id=428a5759-895f- 45e5-a9db-48d8721889c0 fwd="202.148.226.254" dyno=web.1 connect=1ms service=5ms status=304 bytes=237 protocol=https
- 2018-09-07T07:00:59.325093+00:00 heroku[路由器]: at=info method=GET path="/js/ForgeTree.js" host=forgebcsample.herokuapp.com request_id=04a300dc-8697- 4097-8c06-1788e21db69d fwd="202.148.226.254" dyno=web.1 connect=1ms service=3ms status=304 bytes=238 protocol=https
- 2018-09-07T07:00:59.822084+00:00 heroku[路由器]: at=info method=GET path="/js/ForgeViewer.js" host=forgebcsample.herokuapp.com request_id=c601f61e-cfea- 4738-8837-540941adaf96 fwd="202.148.226.254" dyno=web.1 connect=1ms service=11ms status=304 bytes=237 protocol=https
- 2018-09-07T07:01:00.157419+00:00 heroku[路由器]: at=info method=GET path="/api/forge/oauth/token" host=forgebcsample.herokuapp.com request_id=77b86dc0- 50c7-429e-ade9-82e1b8fa56db fwd="202.148.226.254" dyno=web.1 connect=1ms service=2ms status=401 bytes=127 protocol=https
【问题讨论】:
标签: node.js heroku autodesk-forge autodesk-viewer