Scratch 2 project with no code just with uploaded backdrop and sprite should be successfully loaded into scratch 3.
Trying to load a scratch 2 project with no code just with uploaded backdrop and sprite returns an error, and project is no loaded.
load this project into scratch 2.
https://scratch.mit.edu/projects/252810337/#editor
Download the project to the PC
Load the Project into Scratch 3.
Error occurs
Windows 10 Education version 1709
Chrome 69.0.3497.100
@ktbee Can you also prioritize this issue?
/cc @kchadha @fsih
raven.js:55 vm Error: Document does not appear to be SVG.
at e.value (lib.min.js:135)
at lib.min.js:53
at r (lib.min.js:53)
at lib.min.js:53
a.(anonymous function) @ raven.js:55
a.write @ lib.min.js:122
A @ lib.min.js:41
emit @ lib.min.js:122
o.write @ lib.min.js:122
A @ lib.min.js:41
emit @ lib.min.js:122
n.write @ lib.min.js:41
A.error @ lib.min.js:122
(anonymous) @ lib.min.js:53
raven.js:55 Error: Error in Scratch GUI [location=https://llk.github.io/scratch-gui/develop/#252810337]: TypeError: Cannot read property 'bitmapResolution' of undefined
at t.value (lib.min.js:41)
at r (lib.min.js:122)
at beginWork (lib.min.js:122)
at n (lib.min.js:122)
at i (lib.min.js:122)
at a (lib.min.js:122)
at w (lib.min.js:122)
at I (lib.min.js:122)
at p (lib.min.js:122)
at h (lib.min.js:122)
at Object.enqueueSetState (lib.min.js:122)
at a.p.setState (lib.min.js:114)
at a.onStateChange (lib.min.js:12)
at Object.notify (lib.min.js:12)
at e.notifyNestedSubs (lib.min.js:12)
at a.onStateChange (lib.min.js:12)
at Object.notify (lib.min.js:12)
at e.notifyNestedSubs (lib.min.js:12)
at a.onStateChange (lib.min.js:12)
at Object.notify (lib.min.js:12)
at e.notifyNestedSubs (lib.min.js:12)
at a.onStateChange (lib.min.js:12)
at Object.notify (lib.min.js:12)
at e.notifyNestedSubs (lib.min.js:12)
at a.onStateChange (lib.min.js:12)
at Object.notify (lib.min.js:12)
at e.notifyNestedSubs (lib.min.js:12)
at a.onStateChange (lib.min.js:12)
at m (lib.min.js:23)
at lib.min.js:106
at Object.onError (lib.min.js:41)
at lib.min.js:41
a.(anonymous function) @ raven.js:55
r @ lib.min.js:122
a @ lib.min.js:122
w @ lib.min.js:122
I @ lib.min.js:122
p @ lib.min.js:122
h @ lib.min.js:122
enqueueSetState @ lib.min.js:122
p.setState @ lib.min.js:114
a.onStateChange @ lib.min.js:12
notify @ lib.min.js:12
e.notifyNestedSubs @ lib.min.js:12
a.onStateChange @ lib.min.js:12
notify @ lib.min.js:12
e.notifyNestedSubs @ lib.min.js:12
a.onStateChange @ lib.min.js:12
notify @ lib.min.js:12
e.notifyNestedSubs @ lib.min.js:12
a.onStateChange @ lib.min.js:12
notify @ lib.min.js:12
e.notifyNestedSubs @ lib.min.js:12
a.onStateChange @ lib.min.js:12
notify @ lib.min.js:12
e.notifyNestedSubs @ lib.min.js:12
a.onStateChange @ lib.min.js:12
m @ lib.min.js:23
(anonymous) @ lib.min.js:106
onError @ lib.min.js:41
(anonymous) @ lib.min.js:41
raven.js:55 gui Unhandled Error: Error: Error in Scratch GUI [location=https://llk.github.io/scratch-gui/develop/#252810337]: TypeError: Cannot read property 'bitmapResolution' of undefined at t.value (https://llk.github.io/scratch-gui/develop/lib.min.js:41:633060) at r (https://llk.github.io/scratch-gui/develop/lib.min.js:122:44076) at beginWork (https://llk.github.io/scratch-gui/develop/lib.min.js:122:48473) at n (https://llk.github.io/scratch-gui/develop/lib.min.js:122:52441) at i (https://llk.github.io/scratch-gui/develop/lib.min.js:122:52762) at a (https://llk.github.io/scratch-gui/develop/lib.min.js:122:52998) at w (https://llk.github.io/scratch-gui/develop/lib.min.js:122:56521) at I (https://llk.github.io/scratch-gui/develop/lib.min.js:122:56258) at p (https://llk.github.io/scratch-gui/develop/lib.min.js:122:55390) at h (https://llk.github.io/scratch-gui/develop/lib.min.js:122:54794) at Object.enqueueSetState (https://llk.github.io/scratch-gui/develop/lib.min.js:122:45232) at a.p.setState (https://llk.github.io/scratch-gui/develop/lib.min.js:114:1131) at a.onStateChange (https://llk.github.io/scratch-gui/develop/lib.min.js:12:14355) at Object.notify (https://llk.github.io/scratch-gui/develop/lib.min.js:12:10144) at e.notifyNestedSubs (https://llk.github.io/scratch-gui/develop/lib.min.js:12:9760) at a.onStateChange (https://llk.github.io/scratch-gui/develop/lib.min.js:12:14373) at Object.notify (https://llk.github.io/scratch-gui/develop/lib.min.js:12:10144) at e.notifyNestedSubs (https://llk.github.io/scratch-gui/develop/lib.min.js:12:9760) at a.onStateChange (https://llk.github.io/scratch-gui/develop/lib.min.js:12:14373) at Object.notify (https://llk.github.io/scratch-gui/develop/lib.min.js:12:10144) at e.notifyNestedSubs (https://llk.github.io/scratch-gui/develop/lib.min.js:12:9760) at a.onStateChange (https://llk.github.io/scratch-gui/develop/lib.min.js:12:14373) at Object.notify (https://llk.github.io/scratch-gui/develop/lib.min.js:12:10144) at e.notifyNestedSubs (https://llk.github.io/scratch-gui/develop/lib.min.js:12:9760) at a.onStateChange (https://llk.github.io/scratch-gui/develop/lib.min.js:12:14373) at Object.notify (https://llk.github.io/scratch-gui/develop/lib.min.js:12:10144) at e.notifyNestedSubs (https://llk.github.io/scratch-gui/develop/lib.min.js:12:9760) at a.onStateChange (https://llk.github.io/scratch-gui/develop/lib.min.js:12:14373) at m (https://llk.github.io/scratch-gui/develop/lib.min.js:23:27919) at https://llk.github.io/scratch-gui/develop/lib.min.js:106:190718 at Object.onError (https://llk.github.io/scratch-gui/develop/lib.min.js:41:134214) at https://llk.github.io/scratch-gui/develop/lib.min.js:41:133160Component stack: in t in Connect(t) in InjectIntl(Connect(t)) in A in Connect(A) in A in Connect(A) in A in Connect(A) in A in Connect(A) in A in Connect(A) in InjectIntl(Connect(A)) in A in Connect(A) in A in t in Connect(t) in Unknown in IntlProvider in Connect(IntlProvider) in A in Connect(A) in A in A in Connect(A) in IntlProvider in Connect(IntlProvider) in o in i
I'm getting "Whoops! Our server is scratching its head" when I follow that link: https://scratch.mit.edu/projects/252810337/
is the project shared?
@fsih The project is in the trash, but you should be able to view it as a moderator / ST member.
It seems like DOMParser can't handle this particular SVG. I can't open it in the browser or Illustrator either.
2.zip
We should probably handle it in a way that doesn't crash the whole editor though...
It's a missing namespace issue. I can get the SVG to render by adding this to the beginning of the SVG file
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
]>
@fsih thank you for the digging! Do you mind uploading a copy of the whole project as well? I don't think I'm able to get projects that have been added to the trash.
Also this looks to be related to #2236
Here's the project.
Rename the file ext from .zip to .sb2 to upload to Scratch
讬讬砖讜诪讜谉 讛讛诇讬拽讜驻讟专 remix-2 (2).zip
By the way, there is existing code where we fix missing SVG namespaces in these 2 places. SvgRenderer is probably the better one.
https://github.com/LLK/scratch-svg-renderer/issues/50
Going to close this in favor of tracking on https://github.com/LLK/scratch-svg-renderer/issues/61 since it is the same issue. This issue has-patch though, so should be fixed shortly.