Extension install broken


#1

Hello,

In Sketchup 2015, it worked fine installing an extension with the .rbz file ending. However I now installed Sketchup 2016, and sketchup is doing it incorrectly, and even tells me everything went fine when installing, but then it simply fails to show the plugin in the list or toolbar.

Basically it unzip the plugin incorrectly, which results in it not finding it… If I move the plugin manually it starts working. So this is a bug in Sketchup 2016, even if the .rbz somehow is invalid, it should at least tell me so.

The plugin in question: https://github.com/JoakimSoderberg/sketchup-svg-outline-plugin
(I am not the author, I simply made it work for Sketchup 2014+)

Here is a step by step description on how Sketchup is lying to me:
… Turns out since I am a new user I could not post more than one image here. So for a step by step description of the bug go here: https://github.com/JoakimSoderberg/sketchup-svg-outline-plugin/issues/4

In summary, sketchup unzips in a subdirectory in the plugins folder like this:

If I move the files out of this directory it starts working.


#2

There’s one directory level to much in the path in the zip file, if you rename it to rbz, it will not work.


SVG outline plugin and Make 2016 on Mac
#3

did you zip it yourself using the Archive utility in Finder?

rbz instal is fine on v16, but if they have been zipped using Finder it adds the extra folder unless your careful…

edit: I only just saw your git issue post’s…

when you make the .rbz it’s best to use Terminal with zip with flags set to not make the extra folder and to not copy .DStore file…

on < v15 the rbz instal would make an additional folder to hide this extra folder [and a copy of it’s contents]

john


#4

This exact procedure worked fine in Sketchup 2015.

If Sketchup does not find a valid .rb file in the root of the .zip, why does it not give an error? I would consider this a bug, and a bad user experience. This should be fixed, do you not agree? I mean it would be a trivial fix…

I simply used the feature on github that lets me tag releases, it creates a .zip… I did not zip anything myself in finder… I simply took that github generated zip and renamed it, which worked fine in Sketchup 2015, but does not now. So a regression.

But yes I realise now that github adds a directory name at the start when zipping.

Since Finder in OSX will unzip into only one a sub directory in both cases, it was not apparent.


#5

I don’t think older versions were more tolerant with wrong rbz extensions, a correct rbz will be the correct solution in this case.


#6

Yes, but the relevant issue is the user experience? No? I have no idea if you’re an official developer or whatever.

But this is not apparent to me, there should be an error at least telling me that the file is in the wrong format.

I have now made a zip manually and it works, fine. Sketchup still lies to me with a broken zip, telling me everything is fine… But it just does not work.

Is this good you think? Could you agree this is BAD and should be more user friendly? It would be a trivial fix, if anyone cares…

I had an invalid file, I did not know this, I found no clear instructions on how it must be setup other than “just rename a zip to rbz”.


#7

Users (I’m one of them) should be able to rely on correct rbz files. It was one of the main reasons for their introduction back in V8.


#8

I do agree this ‘port’ is BAD and needs fixing to make it more user friendly…

john


#9

I haven’t fixed any of the code, but I named spaced the files and here’s a properly wrapped rbz…
edit: remove file…
does it install?

john


#10

I think you misunderstand me. Not talking about my crappy code. Yes it sucks, I agree, I totally just hacked a fix together that worked, and only because the original author did not respond to me.

Yes it would have helped if people including me don’t write broken stuff.

My only issue is that there should be an error if there is something incorrect. Bad input = Error. This is normal in any software. I am trying to point out this bad user experience. You should not get a message telling you something is installed, if it is not properly installed.

I apologise if my tone was somehow bad, I appreciate the help in understanding the fault with the zip file. But I am trying to help you improve the user experience. That i the sole reason I came here, took a bunch of screenshots to show you the issue I found. I had already found the reason and gotten it to work.

If you don’t even acknowledge that this is something you could improve, then ok. Then I know that it is not worth trying to help you improve your product in the future either.

I will try your updated version to see if it works. Thank you


#11

sorry, I think you misunderstood my reply…

I don’t work for Trimble. I write plugins and often ‘fix’ other peoples so they work on a mac or with a new version of SU…

I admire your efforts to sort this one out, but was pointing to the fact that there are guide lines and some things that need to be done correctly for any plugin to work…

The reason you get the ‘successful install’ message is because it was installed without any modifications to what was provided. i.e. you had a wrapper and SU installed that, and the contents…

the fact that in previous versions this may have been overlooked, means the system has improved, not declined…

I also, again, encourage you to pursue a full fix in the developers forum…

what you are seeing is not a bug, but a more stringent regime, which will only get stricter with each new version…

I will remove the rbz from my post as it was only for your benefit…

john


#12

Ok, that sounds nice… A stringent regime in my world would actually give you an Error if something is wrong. Which is my entire point.

To get you off the focus on my broken code, I created an empty plugin with “nothing.txt” in it… That is, there isn’t even a .rb script. In my world, to give users a good experience, developer or otherwise, when installing something broken, this would not end with a dialog telling me it installed fine. It should tell me “There is no script in this installation file” or something useful.

I don’t work for Trimble. I write plugins and often ‘fix’ other peoples so they work on a mac or with a new version of SU…

… ok I just read that now, and realise I’m talking to the wrong person. I totally got the impression you did work for Trimble. So yea, sorry for wasting your time, and thanks for pointing me to where I can fix the issues you have any power over fixing. Gah… Never argue on the internet or what they say.


#13

I Joakim. I looked at the RBZ and it appear to be structured correctly: flightsofideas.rb and FlightsOfIdeas folder packaged up. But looking at your screenshot there appear to be an additional folder there - are you saying that came from SU’s install function? I’ve never seen that happen - only when people unzip manually and OSX will create a folder with the name of the ZIP package.


#14

See: http://extensions.sketchup.com/en/developer_center/ew_developer#rbz


#15

I’ve never seen that happen - only when people unzip manually and OSX will create a folder with the name of the ZIP package.

Actually OSX unpacks zip files containing a directory in the same way, as long as the directory is named the same as the zip file. Let’s say we have some_dir.zip … Two versions of it:

Version A:

some_dir/filea.txt

Version B:

filea.txt

If you unpack these using OSX Finder, both will result in this:

some_dir/filea.txt

I was using a zip file generated by github, which comes in the format some_dir/filea.txt … And since I used OSX Finder to unpack it and check that it was structured ok, I did not see the problem (That some_dir was in the zip file).

So, in summary, my zip file was invalid, there was no .rb file in the root of the zip.

NOW, to the issue that I think is a bug in sketchup 2016. When installing an .rbz with a folder like this (or any other incorrect way of doing a plugin), in my opinion you should get an error message telling you that something is wrong with the plugin, and that the installation failed. Instead sketchup simply says that everything installed fine… And then you have no plugin installed at all, which is very confusing.


#16

Basically what I mean is that sketchup should have a validator that makes sure these rules are met at install time:
http://extensions.sketchup.com/en/developer_center/ew_developer#rbz


#17

Another validation that should occur in a stricter regime is to check that the extension is compatible with the version of Sketchup that the user has installed. The Extension Wareouse setup for an extension has checkboxes for developer to indicate which versions of SketchUp the extension supports. These appear on the extension page in the store page. But the download/install process does no checking. SImilarly, the Warehouse has no indication OR checking for compatibility with Pro vs Make…


#18

Have you considered being a registered developer? You’d get code reviews and better answers on these topics.


#19

The problem with that is that it would break compatibility with legacy extensions/plugins/scripts. There might be something in checking that at least one RB was added to the Plugins folder and report back a better error message.