简体   繁体   中英

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

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:

{
"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. 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 . Feel free to give it a try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM