简体   繁体   English

在autodesk forge数据可视化中上传model的问题

[英]Problems uploading a model in autodesk forge data visualization

  forge-dataviz-iot-reference-app@0.3.3 dev
    > concurrently --kill-others "npm run watch" "npm run start" "nodemon 
server/localserver.js -- 
  delay 300ms --ext js,jsx"

[2] [nodemon] 2.0.7
[2] [nodemon] to restart at any time, enter `rs`
[2] [nodemon] watching path(s): *.*
[2] [nodemon] watching extensions: js,jsx
[2] [nodemon] starting `node server/localserver.js`
[2] http://localhost:9000
[0] 
[0] > forge-dataviz-iot-reference-app@0.3.3 watch
[0] > webpack --watch --config webpack.config.js
[0]
[1]
[1] > forge-dataviz-iot-reference-app@0.3.3 start
[1] > ws -p 9081
[1]
[1] Listening on http://DESKTOP-9P38L3U:9081, http://192.168.1.100:9081, http://127.0.0.1:9081
[0] asset bundle.js 23.4 MiB [emitted] (name: main)
[0] asset main.bundle.css 59.4 KiB [emitted] (name: main)
[0] Entrypoint main 23.5 MiB = main.bundle.css 59.4 KiB bundle.js 23.4 MiB
[0] orphan modules 80.9 KiB [orphan] 106 modules
[0] runtime modules 1.25 KiB 6 modules
[0] modules by path ./node_modules/ 8.37 MiB (javascript) 58.8 KiB (css/mini-extract) 1023 
  modules
[0] modules by path ./client/ 124 KiB 14 modules
[0] modules by path ./assets/images/*.svg 28.3 KiB
[0]   ./assets/images/fan-00.svg 2.66 KiB [built] [code generated]
[0]   + 11 modules
[0] modules by path ./scss/*.scss 50 bytes (javascript) 592 bytes (css/mini-extract)
[0]   ./scss/main.scss 50 bytes [built] [code generated]
[0]   css ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js?? 
ruleSet[1].rules[2].use[2]!./scss/main.scss 592 bytes [built] [code generated]
[0] modules by path ./shared/config/*.js 1.64 KiB
[0]   ./shared/config/SiteConfig.js 1.18 KiB [built] [code generated]
[0]   ./shared/config/ApplicationContext.js 474 bytes [built] [code generated]
[0] ./util.inspect (ignored) 15 bytes [built] [code generated]
[0] webpack 5.72.0 compiled successfully in 16688 ms
[2] [nodemon] restarting due to changes...
[2] [nodemon] starting `node server/localserver.js`
[2] http://localhost:9000    

this is the code i'm getting i followed this tutorial https://forge.autodesk.com/en/docs/dataviz/v1/developers_guide/quickstart/replace_model/ I'm trying to upload my own mode in autodesk forge but it doesn't work because when i go to localhost:9000/upload it reminds me to the default model of the reference app这是我得到的代码我遵循了本教程https://forge.autodesk.com/en/docs/dataviz/v1/developers_guide/quickstart/replace_model/不起作用,因为当我 go 到 localhost:9000/upload 时,它提醒我参考应用程序的默认 model

EDIT: this are the errors in my browser console: Failed to load resource: the server responded with a status of 500 (Internal Server Error) upload:1 Uncaught (in promise) SyntaxError: Unexpected token E in JSON at position 0 DevTools failed to load source map: Could not load content for https://autodeskviewer.com/viewers/latest/viewer3D.js.map : Load canceled due to load timeout this are the issues: Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute also this appears:编辑:这是我的浏览器控制台中的错误:加载资源失败:服务器响应状态为 500(内部服务器错误)上传:1 未捕获(承诺)语法错误:JSON 中的意外令牌 E,地址为 position 0 DevTools 未能加载源 map:无法加载 https 的内容://autodeskviewer.com/viewers/latest/viewer3D.js.map :加载因加载超时而取消 这是问题:审核 navigator.userAgent、navigator.appVersion 和navigator.platform Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute Indicate whether to send a cookie in a cross-site request by specifiing its SameSite attribute also this appears:

{
"developerMessage": "Token is not provided in the request.",
"moreInfo":"https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling 
   /",
 "errorCode": "AUTH-010"
}

As I mentioned in your other question, make sure to follow the steps listed in the tutorial, specifically the creation of the .env file, and running the npm run dev command with the ENV=local env.正如我在您的其他问题中提到的,请确保按照教程中列出的步骤进行操作,特别是创建.env文件,并使用ENV=local env 运行npm run dev命令。 variable.多变的。

Also, I've been working on a demo application similar to https://hyperion.autodesk.io that is much "leaner", using fewer dependencies, etc.: https://github.com/petrbroz/forge-iot-extensions-demo .此外,我一直在研究类似于https://hyperion.autodesk.io的演示应用程序,它更“精简”,使用更少的依赖项等: https://github.com/petrbroz/forge-iot-扩展演示 Feel free to give it a try.随时尝试一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AutoDesk Forge 数据可视化应用程序 - AutoDesk Forge Data Viz Application 锻造Autodesk模型的变换矩阵 - Forge Autodesk model's transform matrix Autodesk Forge - 如何使用新的Model Derivative IFC管道? - Autodesk Forge - how to use the new Model Derivative IFC pipeline? SVF 模型衍生物下载为(几乎)空的 ZIP 文件(Autodesk Forge) - SVF model derivative downloaded as an (almost) empty ZIP file (Autodesk Forge) 将模型加载到2D / 3D查看器中-Autodesk Forge - Loading a model into the 2D/3D viewer - Autodesk Forge Autodesk Forge - 将文件作为块上传到 Node JS 中的 BIM 360 存储时出现 504 网关超时 - Autodesk Forge - 504 Gateway Timeout when uploading file as chunks to BIM 360 storage in Node JS 使用 C# .NET HTTPClient 在 Node JS 服务器上通过 Multer 将 Revit 文件上传到 Autodesk Forge OSS - Uploading a Revit file to Autodesk Forge OSS by Multer on a Node JS server with C# .NET HTTPClient 在Forge Autodesk Viewer中获取节点的属性 - Get properties of node inside Forge Autodesk viewer 将文件上传到Autodesk Forge-ESOCKETTIMEDOUT错误 - Upload a file to Autodesk Forge - ESOCKETTIMEDOUT error 调用Autodesk Forge的DerivativeApi时出现403错误 - 403 error in calling DerivativeApi of Autodesk Forge
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM