SketchUp and OSX Mavericks....
-
@tig said:
I too have written some simple href="skp:callbackname@string" examples, which I thought might break Mavericks.
They didn't.
Then I rewrote the SketchThis code so that it puts into the Ruby Console the string that is received from the 'install' click href=... callback.
Surprisingly it never gets to this point, instead it just presents the "Runtime error: invalid URL 'skp.callbackname@http_url_path.skp'", then stops - never displaying the string as it never gets a valid callback returned.
This is plain weird...So, WebDialog is throwing this exception before it ever passes the callback to your Ruby. The Foundation library must have identified the skp: "scheme" correctly, else it would never have handed this request to the WebDialog's protocol handler. But for some reason either it or WebDialog is failing to extract the correct path out of the request. I remain baffled why we can't reproduce this in simple test cases. That's especially frustrating because if we can't identify a causing pattern, we can't recommend a viable workaround.
Pulling at any thread I can find: this page makes use of jQuery to do things such as track usage. Could this be somehow entangled? Just as a theory, could Mavericks have changed something in the javascript engine that causes this bug and we aren't reproducing it because we aren't firing the same javascript enroute to Ruby? Seems like a long shot, but when in desperation...
-
Jquery might be a factor - my test didn't include it...
Presumably the page records downloads using it ??When you read the SketchThis html source it has
<a href="skp:callbackname@http://urlpath.skp">
etc.
When I test it... it works... except on MACs with Mavericks, when it fails...
When I do the exact same code on my TIG.this test it always works !
The only difference is my html has:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html>
BUT the SketchThis html source has:
<!DOCTYPE html> <!--[if IE 6]> <html id="ie6" lang="en-US"> <![endif]--> <!--[if IE 7]> <html id="ie7" lang="en-US"> <![endif]--> <!--[if IE 8]> <html id="ie8" lang="en-US"> <![endif]--> <!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!--> <html lang="en-US"> <!--<![endif]-->
I haven't managed to retest with that in my code, as I am currently downloading/installing Mavericks on that MAC... -
@tig said:
The only difference is my html has:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html>
BUT the SketchThis html source has:
<!DOCTYPE html> <!--[if IE 6]> <html id="ie6" lang="en-US"> <![endif]--> <!--[if IE 7]> <html id="ie7" lang="en-US"> <![endif]--> <!--[if IE 8]> <html id="ie8" lang="en-US"> <![endif]--> <!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!--> <html lang="en-US"> <!--<![endif]-->
I haven't managed to retest with that in my code, as I am currently downloading/installing Mavericks on that MAC...I tried that DOCTYPE and conditional stuff. No effect - my test code still gets the right URL. The Jquery stuff is way more complex than I feel competent to fiddle with...haven't used it enough.
-
@tig said:
When you read the SketchThis html source it has
<a href="skp:callbackname@http://urlpath.skp">
etc.from web inspector inside SU the source for this item reads
<a href="skp;add_component@http://plugin.sketchthis.net/wp-content/uploads/2012/07/Sizeable-Back-Panel.skp" class="btn all">Insert into Model</a>
does that work in tests??
EDIT: re-read the thread and see it does...
observation, if you just paste the address into Safari it downloads the file to 'Downloads', and you get a 'saved in v8' warning when you open that skp. Maybe the warning is blocking it being automated?
john
-
-
That's the path: I just wrote a 'shorthand' form
I have tested it my own rb/html with the exact same href= text and it works fine with Mavericks too
Perhaps it's something to do with some remote url's and permissions ?The SketchUcation Plugin Store uses some similar [onClick=] callbacks and they all work in Mavericks as far as I know
-
Everything totally broken here.
Tried changing the Doctype around, from Transitional to Strict to Html 5, all no change.
Tried href= vs window.location= vs document.location=, all broken, broken, broken.
If TIG or anyone has sample code that does work within Mavericks, I'd love to see it.Most of our skp: callbacks are within Javascript for ease of maintenance. Usually fired by onclicks, but it can vary.
--J
-
At the moment I am at a loss...
Some methods work in Mavericks, some do not [both href= and onClick= + window.location=].
BUT some that fail in one html document, will work in another, when the code looks all but identical
I can see not commonality for the fails/successes...
Waiting for Trimble's engineer's feedback....... -
Here's a little more info from testing if this helps.
I have two dialogs which are identical, both just a Select listbox, with an OnChange event that fires a window.location callback. Using Transitional doctype.The one that is a local htm file stored in the Plugins folder, that works.
The one that is remote PHP, that one fails.--J
-
I've got nothing to add at this point, but I did want to chime in just to make sure everyone knows that we are looking into this issue as best we can also and working directly with some of the developers who have emailed us already. We'll post here as soon as we know anything useful. Thanks,
Chris
-
Thanks Chris, so I may have something helpful, just bear with me because I am not a programmer...
TIG is the guy who writes my plugin (and he does a fantastic job)
I was talking with a friend of mine who's a software developer and he wanted to take a crack at solving the problem, and while he didn't get it, he thinks he may have something that will shed some light on the subject. Again, please bear with my elementary description:
My plugin downloads content from the web, Sketchup files to be exact. Since the Mavericks update, it's broken.
TIG had written a small plugin that could test the way links were formed in Mavericks. My friend took that plugin and tried testing a local VS remote web page.
So what we proved (I think) is that a link is properly passed to Sketchup when the page is saved on the local machine (in the plugins folder) but when the link is to a page that is remote (on the web) it fails.
So while that's not an answer, it appears Mavericks is blocking this somehow. The attached test code proves this. Take a look at the Ruby code, and you can fire up a local or remote test by typing in "TIG.local" or "TIG.remote" into the Ruby console.
I have the remote page in the code hosted on a public Dropbox folder (with a proper public link) and I will leave it there for testing.
https://www.dropbox.com/s/gprwg3lolzxnp39/TIG%20This%20Test.zip
I hope this somehow helps.... (And that I've explained it properly)
-
Thanks Eric.
This is useful feedback.
If I ever manage to get Mavericks downloaded and installed on my MAC I'll report in too...
As you have said ests with local html callbacks work but some remote ones don't...
It's plain weird... -
I'm having trouble reconciling the observations reported here, and I think there's a clue to be derived. The error message lists the entire URL, including the "skp:callback@" part. Normally, that prefix is stripped off by WebDialog and whatever follows @ is passed to the Ruby callback. Also, TIG has reported that his Ruby callback does not get invoked when this error occurs. None of us has been able to reproduce the error using simple test code.
The fact that the part after @ is an external URL should be completely irrelevant. To WebDialog it is just text. To reiterate: WebDialog has no business checking or accessing the linked website in these hrefs because it has no reason to assume that Ruby will even attempt to load the webpage in the text. The Ruby might parse the URL to extract other information, might save it for later reference, might use the URL text in another page it constructs... the possibilities other than loading the URL are endless. Likewise, to Mavericks, the part of the URL that matters is the skp: protocol prefix. It uses that to decide what protocol handler should receive the request, and leaves the processing of the URL details to that handler.
So, the problem has to be that for some reason we haven't yet figured out, WebDialog fails while trying to parse the request before handing it to Ruby.. The implication is that in Mavericks, the URL is somehow altered on the way to WebDialog in a way that WebDialog can't unravel. Maybe Mavericks doesn't separate the scheme and path parts correctly and this bombs WebDialog? To answer that, we need input from the Trimble team who know what causes WebDialog to generate this specific error and exactly what it receives from Mavericks vs from other OS's. Could this be a change in character encoding handling? Is something on the SketchThis page (e.g. javascript) altering the URL before it is passed on (so that what we see in the page source isn't what WebDialog actually receives)?
-
So some of that was over my head, but if it helps at all, there are other plugins that are failing in the same way as well, try KeyFrame animation and attempt to start a trial by using their web dialog, it also fails...
-
I have at least managed to 'crowbar' Mavericks into my MAC !
I can confirm that the test code Eric posted earlier works for TIG.local and TIG.remote on all PCs and pre-Mavericks MACs. However it fails miserably on Mavericks with TIG.remote and href= -
I had a look at this yesterday for LightUp when I started getting reports of blank dialog windows on Macs running OSX 10.9 on Friday.
I believe most of these posts in this thread are way off the mark. I may be wrong, but I believe its nothing to do with WebDialogs looking at text strings after @ etc. I believe it is Mavericks using increasingly fine grain parallelism and in particular being much less speculative in launching CPU - and therefore power consuming tasks - which is after all the USP of 10.9.
So LightUp now runs fine on Mavericks and I posted new builds and installer (v3.0j) yesterday.
It now works on Mavericks because I procrastinate communicating with WebKit until the latest I can to ensure it really is running. Using set_file etc before this appears to simply be talking into an azure blue void.
Adam
-
Should say I posted new builds of LightUp Analytics for Macintosh too.
LightUp updates for OSX Mavericks available here: http://light-up.co.uk
LightUp Analytics updates for OSX Mavericks here: http://lightup-analytics.com
6 releases in 1 day was .. challenging.
Adam
-
@AdamB, were you getting the error message on the console, or just a blank page? I've noticed that when I open SketchThis, the content takes a very long time to load, with a blank page displaying until it completes. That would be consistent with what you say about WebKit startup being delayed. But after the WebDialog loads the page, if I click the import button I get the error on the console.
-
Mine's enabled as well... It always has been....
-
Here, LightUp (pre-last update), just opened the preferences pane blank, no message.
and
Keyframe Animation cannot run saying Java Script needs to be enabled, but it is.
Adam, any clue on this JS bug ?
Advertisement