weixin_39637457
weixin_39637457
2020-11-27 13:38

Uncaught ReferenceError: THREE is not defined

What's your browser and operating system? (Copy/paste the output of https://www.whatismybrowser.com/)

Chrome 83 on macOS (Catalina)

What is the problem?

I am using WebODM with dockers, and using the 2D and 3D views iframes from an ReactJS page.

I activated SSL in WebODM, and when i open the ReactJS view, the 2D map view works ok, but the 3D view have rendering problems and in the browser console i can see this error message.

  
ModelView-a1845963214113052217.js:14 Uncaught ReferenceError: THREE is not defined
    at Object.9 (ModelView-a1845963214113052217.js:14)
    at s (ModelView-a1845963214113052217.js:1)
    at Module.156 (ModelView-a1845963214113052217.js:6)
    at s (ModelView-a1845963214113052217.js:1)
    at Object.155 (ModelView-a1845963214113052217.js:6)
    at s (ModelView-a1845963214113052217.js:1)
    at ModelView-a1845963214113052217.js:1
    at ModelView-a1845963214113052217.js:1

Everything works fine with out SLL but with SLL the 3D rendering crashes

What should be the expected behavior?

the 3D map rendering into an iframe in a ReactJS page using SSL

How can we reproduce this? (What steps did you do to trigger the problem? What parameters are you using for processing? Please include multiple screenshots of the problem! If possible please include a copy of your dataset uploaded on Google Drive or Dropbox. Be detailed)

Create a ReactJS APP with a 3D WebODM iframe, and both (ReactJS and WebODM docker version) working with SSL.

You can see that de 3D iframe crash but the 2D iframe works fine.

该提问来源于开源项目:OpenDroneMap/WebODM

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39960700 weixin_39960700 4月前

    Hey :hand: are you using the latest version (with this fix included? https://github.com/OpenDroneMap/WebODM/pull/875 )

    点赞 评论 复制链接分享
  • weixin_39637457 weixin_39637457 4月前

    Hi . Yes i am.

    点赞 评论 复制链接分享
  • weixin_39960700 weixin_39960700 4月前

    Do you have a public link we could check to reproduce this?

    点赞 评论 复制链接分享
  • weixin_39637457 weixin_39637457 4月前

    Sure, i created a reactjs web page for testing, with the 2D and 3D view iframes in the same page.

    Here you can see that the 2d view works, but the 3d view doesn't render.

    https://xxxx.azurewebsites.net/

    This is the source code of the page

    javascript
    import React from 'react';
    import logo from './logo.svg';
    import './App.css';
    
    function App() {
      return (
        <div classname="App">
          <div>2D iframe</div>
          <div>
          <iframe scrolling="no" title="WebODM" width="61.8033%" height="360" frameborder="0" src="https://xxxxxx.eastus2.cloudapp.azure.com/public/task/c2491ae2-dc9d-4279-9e1f-b688a6b8a99c/iframe/map/"></iframe>
          </div>
          <div>3D iframe</div>
          <div>
          <iframe scrolling="no" title="WebODM" width="61.8033%" height="360" frameborder="0" src="https://xxxxx.eastus2.cloudapp.azure.com/public/task/c2491ae2-dc9d-4279-9e1f-b688a6b8a99c/iframe/3d/"></iframe>
          </div>
    
        </div>
      );
    }
    
    export default App;
    
    点赞 评论 复制链接分享
  • weixin_39960700 weixin_39960700 4月前

    Thanks for the link!

    This was indeed a bug. Some tags were not being properly included due to recent changes we made to the 3D model display.

    Please update and verify if it works; if not, please re-open this. :+1:

    点赞 评论 复制链接分享
  • weixin_39637457 weixin_39637457 4月前

    , thank you for your help. I can't test it because i'm using the docker version, and the image is not updated in dockerhub, can U upload the new image?

    点赞 评论 复制链接分享
  • weixin_39960700 weixin_39960700 4月前

    It should be updated by now (builds are automatic, but take a few hours to show up).

    点赞 评论 复制链接分享
  • weixin_39637457 weixin_39637457 4月前

    It's woking, thank you

    点赞 评论 复制链接分享

为你推荐