JohnMcLear / draw

A real time collaborative drawing tool using nodejs, socket.io & paper.js
Apache License 2.0
482 stars 158 forks source link

Picture can't upload #227

Open chopinregis opened 8 years ago

chopinregis commented 8 years ago

When uploading more that one picture on a page, the screen etherdraw can't upload all the pictures on the other users link.

2016-02-02

etherdraw page issue

theoryshaw commented 8 years ago

This is what i see on this link:http://sketch.openingdesign.com/d/iBbsvRO52U

Regis, what do you see on your end with this link?

chrome_2016-02-03_09-43-55

chopinregis commented 8 years ago

this is what I see http://sketch.openingdesign.com/d/iBbsvRO52U

etherdraw page issue

theoryshaw commented 8 years ago

seems like it happens with just one image too: http://sketch.openingdesign.com/d/aiw9b4txCa

this is what i see... chrome_2016-02-03_10-18-49

Regis, what do you see on your end?

chopinregis commented 8 years ago

here is another example of this issue http://sketch.openingdesign.com/d/aiw9b4txCa

this is what I see modifications

bytesnz commented 8 years ago

Hey @theoryshaw. Have just had a little play around with images on my instance. You're not getting a 413 Request Entity Too Large error in your javascript console are you?

theoryshaw commented 8 years ago

let me know if i got the right info here:.... was on this one: http://sketch.openingdesign.com/d/iBbsvRO52U

chrome_2016-02-03_11-21-07

Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'drawingPNGiBbsvRO52U' exceeded the quota.
project:load
user:connect
Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'drawingPNGiBbsvRO52U' exceeded the quota.
Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'drawingPNGiBbsvRO52U' exceeded the quota.
project:load
user:connect
Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'drawingPNGiBbsvRO52U' exceeded the quota.
bytesnz commented 8 years ago

Do you want to just try with some smaller images and see if you get the same problem? I'm not somewhere I can test ATM

theoryshaw commented 8 years ago

yes, from what i can gather from other experiences, it looks like the problem might be related to larger images, as well as the number of images uploaded into a drawing instant. The threshold, however, from what i have seen, is pretty low.

I'll throw out some more examples... stand by

theoryshaw commented 8 years ago

a test on multiple smaller images: http://sketch.openingdesign.com/d/mYR6BrKkke

2016-02-03_12-13-29

chopinregis commented 8 years ago

this is what I see

issue

theoryshaw commented 8 years ago

image size tests:...

http://sketch.openingdesign.com/d/galaxy%20-%2011000 - didn't even upload http://sketch.openingdesign.com/d/galaxy%20-%209000 - didn't even upload http://sketch.openingdesign.com/d/galaxy%20-%207000 - loaded http://sketch.openingdesign.com/d/galaxy%20-%205000 - loaded http://sketch.openingdesign.com/d/galaxy%20-%203000 - loaded http://sketch.openingdesign.com/d/galaxy%20-%202000 - loaded http://sketch.openingdesign.com/d/galaxy%20-%201000 - loaded

source of images: https://dl.dropboxusercontent.com/u/7117445/temp/Galaxy%20-%20source%20images.zip

chopinregis commented 8 years ago

On my own testing of the seven links posted by Ryan above, the first 3 links do not load, while the remaining 4 links do load. so the only difference here from my end is that the 3rd link doesn't load as it did on Ryans tests. There is also no difference observed in terms of image dpi size uploaded.

bytesnz commented 8 years ago

What happens if you clear your session data in chrome (Settings -> Show Advanced Settings -> Content Settings... -> All cookies and site data -> find sketch.openingdesign.com -> Local Storage -> Remove). Would be interesting to find out how big your local storage is atm. The limit is between 5 and 10MB. The only limit I have hit so far is the 413 Request Entity Too Large error, which can be fixed (in theory [haven't tested]) (http://stackoverflow.com/questions/19917401/node-js-express-request-entity-too-large).

If you are bursting your Local Storage bank, the thing would be to look at why draw is storing stuff in Local storage and if/when it is clearing stuff from it.

theoryshaw commented 8 years ago

Removed....

chrome_2016-02-04_09-13-10

... not sure how to test though.

bytesnz commented 8 years ago

How do you go in uploading stuff now? Hopefully that should get rid of the error you were having.

theoryshaw commented 8 years ago

@kingregis cleared local storage as well and created the following new instances and uploaded these floor plan pngs, but i was unable to see them on my end.

http://sketch.openingdesign.com/d/AOx9mdSaJK http://sketch.openingdesign.com/d/1hnoss3qXC http://sketch.openingdesign.com/d/O4j714dzyR

chopinregis commented 8 years ago

Exactly, and to upload pictures, I simply drag them into the browser window of the new etherdraw instance.

bytesnz commented 8 years ago

Just had a look on your server. Tidied the processes - seemed to be two running. Managed to get two images uploaded onto http://sketch.openingdesign.com/d/AOx9mdSaJK (takes a while to load). When I try and load a third I get this on the server:

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''{\"project\":\"[[\\\"Layer\\\",{\\\"applyMatrix\\\":true,\\\"children\\\":[[\\\' at line 1
    at Function.Client._packetToUserObject (/home/ubuntu/draw/node_modules/ueberDB/node_modules/mysql/lib/client.js:387:11)
    at Query._handlePacket (/home/ubuntu/draw/node_modules/ueberDB/node_modules/mysql/lib/query.js:33:33)
    at Client._handlePacket (/home/ubuntu/draw/node_modules/ueberDB/node_modules/mysql/lib/client.js:312:14)
    at Parser.emit (events.js:95:17)
    at emitPacket (/home/ubuntu/draw/node_modules/ueberDB/node_modules/mysql/lib/parser.js:71:14)
    at Parser.write (/home/ubuntu/draw/node_modules/ueberDB/node_modules/mysql/lib/parser.js:576:7)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:764:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:426:10)