Error running THREE.js/WebGL Project


#1

I’m trying to run a webGL project using THREE.js and I just get the error “Error creating WebGL context.”

Normally on my mac I just run python -m SimpleHTTPServer and it works

Here’s the repo https://github.com/bclark8923/Astray

Anyone able to help me figure out what’s different in the Cloud9 Environment?

I have it running at https://astray-test-bclark8923.c9users.io/index.html


#2

Hey @bclark8923 :slightly_smiling:,

Your three.js app is pretty fun! :smiley:

Is this an error showing in the browser console? I only saw warnings in Chrome Dev Tools.

I didn’t find anything online for Cloud 9 three.js errors. What command/server are you running? (looks like python)

IPs and Ports in C9 have to be C9’s so when running use $ python -m SimpleHTTPServer $PORT not sure the command supports an IP parameter as well like $ python -m SimpleHTTPServer $IP:$PORT but I’d say try that for fun as well!

Best of luck,
Mikeumus
:four_leaf_clover: :moneybag:


#3

Yeah I ran it like that and it comes up in the browser but I get console errors


#4

In the running app standalone link you provided initially I don’t get any browser wanrings myself, just these warnnings:

THREE.WebGLRenderer 49
Three.js:698 WebGL: INVALID_OPERATION: getAttribLocation: program not linked

Maybe try clearning your cache? :smiley:


#5

Oh thank you! Seems to be my Chrome all of a sudden broke on my game and it works fine on Safari, now for new debugging haha. Thanks a ton!!!