Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

viewer-and-data-test.html won't work #1

Open
naugtur opened this issue Oct 31, 2014 · 3 comments
Open

viewer-and-data-test.html won't work #1

naugtur opened this issue Oct 31, 2014 · 3 comments

Comments

@naugtur
Copy link

naugtur commented Oct 31, 2014

viewer-and-data-test.html throws errors when opened.

Replacing old references to viewer with

    <link rel="stylesheet" href="https://developer.api.autodesk.com/viewingservice/v1/viewers/style.css" type="text/css">
    <script src="https://developer.api.autodesk.com/viewingservice/v1/viewers/viewer3D.min.js"></script>

makes it run, but I keep getting Error loading document: 9 when the file is already converted and the script tries to view it.

view-data-wrapper-test.html seems to work, but the IMG tags for files are empty, no visual output there.

Tested using latest chrome, with the files loaded from http://localhost:8080/

@leefsmp
Copy link
Contributor

leefsmp commented Oct 31, 2014

Thanks for the feedback, I've updated the reference. Indeed viewer3D.js does not work anymore, need to use the min version.

Chrome has some more security restriction when the page is open locally. Try with a different browser, ex Firefox. Both example work fine on my side.

You can try the online version on the blog as well if you don't want to drop Chrome away:
http://adndevblog.typepad.com/cloud_and_mobile/2014/09/a-handy-wrapper-for-the-javascript-viewer-api.html

http://adndevblog.typepad.com/cloud_and_mobile/2014/08/autodesk-view-data-api-javascript-wrapper.html

Hope that helps.

Regards,
Philippe.

@naugtur
Copy link
Author

naugtur commented Oct 31, 2014

Great response time! Thanks.
Additional restrictions are introduced when you use a file:// protocol, and I'm running a local server. I also disabled same-origin-policy to be sure. Same tests performed on Firefox with the same result.

The problem was that I tested it with a .pdf file (thought why not, if it's supported).
I switched to a .dwf file and view-data-wrapper-test.html worked as expected.

viewer-and-data-test.html throws Uncaught TypeError: Cannot read property 'toggleProgressive' of undefined when run in Chromium (no webgl)
and fails to render with tens of webgl warnings in Chrome and Firefox (all on linux)

Firefox on win7 virtual machine:

Error: WebGL: Can't get a usable WebGL context
TypeError: this.impl is undefined

@naugtur naugtur changed the title Both examples don't work viewer-and-data-test.html won't work Oct 31, 2014
@leefsmp
Copy link
Contributor

leefsmp commented Nov 2, 2014

Is your browser WebGL compatible? Are you able to run any other WebGL demo for example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants