Extensions not loading in SketchUp 2019

My Building Creator extension uses a windows installer to copy files to the plugins directory rather than using an rbz file. I’ve had complaints that in SketchUp 2019my plugin doesn’t load when SketchUp launches. I haven’t been able to figure out why. I can load it just fine from the ruby console.

EDIT:

To try this create a new test.rb file in the plugins folder. add the following code:

UI.messagebox "test"

I have a trade show coming up in a few days an this is a huge show stopper for me!

Is the installer placing the files in the correct directory? Does manually placing the files there work?

Please confirm the following.
What is the RB file with the Plugins folder doing ?
e.g. Is it setting up an extension using other files in a named subfolder within Plugins.
Are the permissions for the various files and subfolder set up properly, e.g. to let SketchUp read the file ?
Compare the permissions with some other files you know to work.

If you manually add the files into Plugins and restart SketchUp does it work then ?

Has SketchUp been installed properly on the problem PCs ?
Bad permissions and random flakiness are known issues when it’s done incorrectly.
It can be repaired by doing the following…
While logged in as your usual Windows user, ensure SketchUp in closed.
Find the v2019 exe installer file - probably in your Downloads folder.
Select its icon, right-click > context-menu > “Run as administrator”
When prompted choose “Repair”.
Restart SketchUp to see if it’s better…

Running an installer exe file in any other way is a recipe for later unpredictable weirdness.
So never double-click it to “Run” it - even if you have admin-powers it is no the same.

You might need to rerun your installer so that the files and folders haven’t inherited the earlier permission issues etc…

Yes. I’ve tried both:
C:\ProgramData\SketchUp\SketchUp 2019\SketchUp\Plugins
and
C:\Users\MyComputer\AppData\Roaming\SketchUp\SketchUp 2019\SketchUp\Plugins

The file registers my extension, and calls a loader.rb. The point is that my rb file is never loaded.
I do have a sub folder properly named. Everything works as advertised if I do this in the ruby console.

load 'path\to\plugin.rb'

Yes

No. Even adding a new test.rb in the plugins folder doesn’t work. See my edit above.

Tried that same issue.

Could it possibly be related to being a trial version of SketchUp?

@thomthom Any input?

Are you getting any error messages? Load errors?

No. As mentioned before the file never tries to load. I can verify this by placing a UI.messagebox on the first line. Doing that in one of the other extension rb files (installed from EW) results in the message being shown before that plugin loads.

How did you create the RB that’s failing to auto-load from the Plugins folder ?
If you open it with Notepad++ what is the file’s encoding reported as ?
It should be UTF-8…

OK it seems there SketchUp must no longer load all files in the plugins folder. Apparently it doesn’t load extensions that were not installed using the extension manager.

I created a zip from my rb file and installed it using the extension manager. No my plugin loads at startup. This is really unhandy to need to add this extra step. Any ideas how I can handle this from my installer? This info must be stored somewhere. Perhaps in the registry. I’ve already checked out the preferences json files.

You are mistaken ?

I just made a new RB file, and an associated subfolder with some code files in.
I then manually added all of it into my user’s AppData 2019 Plugins folder.
I restarted SketchUp and the new RB makes the extension and menu items etc, and runs as expected.
So you do not need to install from a signed RBZ…

I have an idea !
Please check your Extension Manager’s Extension Loading Policy - if it is NOT set to Unrestricted, then unsigned extensions will NOT auto-load as SketchUp starts.

PS: Also check that you only have your files installed in one Plugins location - installing an RBZ uses the current user’s AppData Plugins folder. The one in the ProgramData folder is only used when you want the same extensions to auto-load for all users on that PC…

Did you try that using a trial version of SketchUp 2019?

Yup I already checked all the easy stuff :wink:

Yes I understand the way that works.

My installer puts the files in the programdata folder so they are available for everyone. When this issue came up the first thing I tried was copying the files to the user\appdata location.

That’s not correct. Nothing has changed in how we load extensions. And we can verify that extensions load in general. This must be an issue local to the extension/installer/machine.

The one thing we did do was update Ruby to 2.5. If your extension is all Ruby files, no binaries then it should generally keep working. But there are some things that might break as Ruby syntax has become stricter. But you should be getting error messages.

TIG brings up a good point, if you changed the Extension Loading Policy you might see extensions being blocked. If it’s set to “Identified Extension Only” it will silently be blocked. If you set it to “Approve Unidentified Extensions” there should be a message/prompt. “Unrestricted” is the default and doesn’t block anything.

Can you tell us what the output of:

Sketchup.find_support_file('Plugins')
$LOAD_PATH
$LOADED_FEATURES
Sketchup.find_support_file('Plugins')

Plugins

$LOAD_PATH

[“C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific”, “C:/Program Files/SketchUp/SketchUp 2019/Tools”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins”, “C:/ProgramData/SketchUp/SketchUp 2019/SketchUp/Plugins”]

$LOADED_FEATURES

[“enumerator.so”, “thread.rb”, “rational.so”, “complex.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/enc/encdb.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/enc/trans/transdb.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/enc/windows_1252.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/rbconfig.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/compatibility.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/defaults.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/deprecate.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/errors.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/version.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/requirement.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/platform.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/basic_specification.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/stub_specification.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/util/list.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/stringio.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/rfc2396_parser.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/rfc3986_parser.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/common.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/generic.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/ftp.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/http.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/https.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/ldap.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/ldaps.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri/mailto.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/uri.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/specification.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/exceptions.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/core_ext/kernel_gem.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/monitor.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/dependency.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/path_support.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/enc/trans/single_byte.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/extensions.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/langhandler.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/sketchup.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dcloader.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dcobservers.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dcclass_v1.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dcfunctions_v1.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dcclassifier.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dcclass_overlays.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dctools.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dcutils.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/dcconverter.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_dynamiccomponents/ruby/generatereport.rbe”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/su_dynamiccomponents.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/building creator.rbs”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/benchmark.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/building.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/views.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/openings.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/window.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/openings edit.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/opening observers.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/porch drawing.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/porches.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/spec editor.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/colors.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/import export.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/toolbar.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/menu.rbs”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/building creator/cupola.rbs”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/Building Creator/Loader.rb”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/Building Creator.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/nc_facecutter/facecutter.rbe”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/NC_FaceCutter.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_advancedcameratools/actloader.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_advancedcameratools/advancedcameratools_main.rbe”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/su_advancedcameratools.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/sandboxmenus.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/geometryhelpers.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/fromcontours.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/triangulatorutility.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/meshhelpers.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/fromscratch.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/smoovetool.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/stamptool.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/drapetool2.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/detailtool.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_sandbox/flipedgetool.rbe”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/su_sandbox.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/boot.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/main.rbe”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/etc.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/fileutils.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/json/version.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/ostruct.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/json/generic_object.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/json/common.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/json/ext/parser.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/json/ext/generator.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/json/ext.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/json.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/pathname.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/pathname.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/set.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/tmpdir.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/core_object.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/date_helper.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/debug.rbe”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/logger.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/exceptions.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/file.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/tc_object.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/string_helper.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/file_dialog.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/window.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/file_transfer.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/http_request_manager.rbe”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/singleton.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/observers.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/position_reference_tool.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/progress.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/reference_manager.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/session.rbe”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/platform_specific/date_core.so”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/date.rb”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/time.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/sign_in_window.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/task_dialog.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/tc_dialog.rbe”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/view.rbe”, “C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/base64.rb”, “c:/users/server computer/appdata/roaming/sketchup/sketchup 2019/sketchup/plugins/su_trimble_connect/viewer_dialog.rbe”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/su_trimble_connect.rb”, “C:/Users/Server Computer/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/test.rb”]

Ok this infuriating. Now since I installed the rbz everything works, even adding a new test.rb file. I’m installing SketchUp 2019 on a different computer so I can get the problem back again.

Ok this is getting really weird.

So before the first run of SketchUp after installing, the plugins folders are not created yet. My installer places the files there creating the plugin folders if necessary. After SketchUp loads, it ignores the files that were already there. If I change the name of my rb file from Building Creator.rb to Building Creator1.rb causes it to load just fine, but as soon as I change it back it won’t load again.

Ok here is something more.

If I delete the extension files from ProgramData and place them in the user directory the plugin loads. Howerver, if the plugin is in both locations or only in the programdata location then it doesn’t load.

Hmmm… :frowning: :confused:

EDIT: But… this is only true for the computer where I installed the RBZ. It’s like the files are somehow blacklisted.

When I try to uninstall the extension I get an error saying ‘Unable to remove extension files.’

This apparently is false.

I removed the Building Creator.rb. Restarted SketchUp and noticed the Building Creator extension was no longer listed. Then I copied the files back in and bingo. My extension loaded.

Uninstall and reinstall SketchUp and I can’t get it to malfunction again on this computer.

OK more mysteries and more answers.

  1. It seems my installer was placing files in BOTH the programdata, and the user locations. Removing the files from either location fixed the issue.

  2. However the mystery remains because I can add a test.rb in both locations, and only the one in the users folder is loaded (this is correct, expected behavior).

Should return a pathname string like:
C:/Users/Dan/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins

NOT just "Plugins" as you gave above.

VERIFY

Oops typo or pasting error. It gave a path like you show, with a different username of course.

1 Like

Are you being hit by Window’s Virtual Store feature perhaps?