471 views
in Platform Packages by
Hello,

We have been trying to re-generate an existing EW project with WebGL PP. But, in our generated html page, we only see the text and no graphics/images.

We see the error

"EmWi error: SecurityError: Failed to execute 'texSubImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.!"

in the browser console messages.

1 Answer

0 votes
by
Hi Shivam,

I assume that you have started the browser and opened the application directly from your local hard drive. Correct? If this is the case, then the browser's security rules that prevent the loading of local bitmaps and/or JS files are taking effect. The easiest way is to pack the generated sources into a web server environment and then open the application via HTTP(S). I like to use Python directly for this: 'python -m http.server -d <PATH-TO-GENERATED-SOURCES>' and then open the application via http://localhost:8000/EmWiApp.html

Hope this helps,
best regards,
Manuel
by
I installed latest python v3.13.

I tired

python -m http.server -d C:\GIT\GenCode

and

python -m http.server -d "C:\GIT\GenCode"

I get syntax errors, whats missing ?
by
Which kind of syntax errors do you receive?
by
Thank you. it works now.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...