HTML5-Viewer with CMS - Error-Message

This topic has been viewed 7738 times and has 5 replies
Thread status: Active
Still a problem with your graphic card? [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
User avatar
Pixelwizard
Posts: 31
Joined: Mon Sep 10, 2012 7:54 pm
Contact:

HTML5-Viewer with CMS - Error-Message

Post by Pixelwizard »

hello,

after a long time...jaust a question, maybe juast for better understanding. i created a small model, did an excport to html5. i got a zip-file. as i understand, i have to extract this zip ONCE, then put the folder to a folder on a webserver, becaus i have to access the lib and the html-pages directly. inside the folder ther is again the model as zip. i put a content-element to my pages for pure html, stripped the code of one of the html-files and pasted it to the editor. to be sure to hit all the JS, i put absolute, no relative paths to the code. works to this point. the canvas is displayed, and it starts loading the model, using the "xxxmodelxxx.zip". but then i get an error:
"Error: Error End of data reached (data length = 0, asked index =4). Corrupted zip?"

Do i miss something important to edit? could be i'm to tired actually to see it ;)
WIN10 Pro 64bit * 16 GB RAM * AMD FX 6100 * Geforce GTX 660
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: HTML5-Viewer with CMS - Error-Message

Post by Puybaret »

Could it simply because you tried in a local file system without a web server?
Many browsers don't allow to access to local files anymore for security reasons. Try with Firefox, it's generally more tolerant.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
Pixelwizard
Posts: 31
Joined: Mon Sep 10, 2012 7:54 pm
Contact:

Re: HTML5-Viewer with CMS - Error-Message

Post by Pixelwizard »

it works now. for explanation, it's inside a typo3-cms. the absolute path was of course the wrong way. the realtive solved the problem. i just have to edit some more things, but it's running now on all available devices. only thing to solve will be to make the canvas dynamically responsive. but not today ;) if you like to have a short look, it's a not released page of my new pages: https://factor118.de/index.php?id=87
i'll keep you updated if i found the adjustments for responsive pages. guess ther might be also some changes needed for touch-navigation, but not that important at this moment. doin such things when tired - stange thing, need to sleep...ah, but just let me check the last edit ... ,)
WIN10 Pro 64bit * 16 GB RAM * AMD FX 6100 * Geforce GTX 660
User avatar
Gildaniel
Posts: 135
Joined: Fri Aug 11, 2017 10:57 am
Country: Russia

Re: HTML5-Viewer with CMS - Error-Message

Post by Gildaniel »

Dear Puybaret, could you please help me?
I try to put the script on landing page constructor platform, but get the same error - "Error: Error End of data reached (data length = 0, asked index =4). Corrupted zip?"

Support team cannot help to solve this, said to ask you what's wrong with the script

The test page on LP platform with script is http://opl5d19z.plp7.ru/

The same script locally works great - http://regard-house.ru/3dplan/ya/ya1.html
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: HTML5-Viewer with CMS - Error-Message

Post by Puybaret »

By default, the security of modern browsers forbids a script to access multiple domains from a page (here opl5d19z.plp7.ru and regard-house.ru). The easiest way to fix this issue is to host Sweet Home 3D JS Viewer scripts and SH3D file on opl5d19z.plp7.ru.
Maybe this page will give you some help too.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
Gildaniel
Posts: 135
Joined: Fri Aug 11, 2017 10:57 am
Country: Russia

Re: HTML5-Viewer with CMS - Error-Message

Post by Gildaniel »

Thank you for your answer!

Unfortunatelly, the Landing Page Constructor platform doesn't allow to host any user files; just constructing pages and put own HTML code into head and body if needed.

I tried to get how CORS works and what should I write in html to get regard-house resources as own, but haven't succeed.

There is no some other way to get it work?

Yours, Daniel
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 2 guests