Can't find speckle kits when using GH SDK

Hey @knut.tjensvoll !

We saw this issue in the past when an old version of Core was being loaded by mistake…

See: Grasshopper Speckle Connector install issues - #17 by teocomi

Here’s some additional context too that might be useful:

When developing/debugging, the kits should get copied in the right location (appdata) when you build the Converter project.
So I would suggest always rebuilding the whole Connector solution.

Accounts, instead need to be set up manually from Manager or Desktop UI (eg the Rhino Connector).

Both accounts and kits should live in %appdata%\Speckle.

You should try avoiding mixing a development version of the connectors and the ones from Manager, as there might be involuntary crossovers.

I’d suggest cleaning your environment by removing any version of the Gh/Rhino connectors and trying again.

Also, as you noticed, from 2.7 onwards the GH&Rhino connectors are bundled together when installing from Manager, not sure if that’s part of your problem as well!

Thanks for the response @teocomi !

So I tried to clean my environment completely by removing everything Speckle related, and I removed any Library Folders I had added in the Grasshopper Developer Settings where additional dlls were loaded. I checked everywhere for SpeckleCore2.dlls and there were none left that could be possibly be loaded. After I uninstalled my Speckle Managers I made sure that the AppData\Roaming\Speckle folders were deleted.

Then I installed the Speckle Manager v2 and the Rhino + Grasshopper connector v2.7.
Still didn’t work.
Then finally I tried to copy the Kits folder from <MyUser>\AppData\Roaming\Speckle to Default\AppData\Roaming\Speckle, and it finally worked.

So it doesn’t seem to me that it’s the same issue as Merijn had (which coincidentally I was there for and we frantically trying to fix it, and I actually didn’t have that issue that time :smiley: ). It seems rather that the issue is that different AppData folders are being used in different situations (one by Rhino and one by GH) for some reason… Not sure how this happened, but I’m starting to think that it’s an issue I might have to bring up with McNeel…
When I open the Special Folders > Components Folder from GH, it opens it in the Default user, but SpeckleRhino2 is installed in my user folder…

I also had to copy Accounts.db from my my user to the Default user in order for the GH connector to find the accounts I logged into in the Manager for Speckle

@knut.tjensvoll this is rather odd! Do you know if your machine has any sort of virtualization or network account management set up?

If you type %appdata% in windows explorer, where does it take you?
And what if you type Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); in a gh C# node?

image

I remember Default Kit error being caused by installing of different versions for Rhino and Grasshopper connectors. I had it before and once i made sure they were same, it disappeared on my end.

1 Like

%APPDATA% takes me to my user, but…
image
:open_mouth:

Edit: I do have network account management set up as it is a work laptop. However I haven’t had this issue before.

@gokermu Yeah indeed, but I tried to clean everything and it didn’t work…
And it does seem now that the issue is the wrong user folder is being used.

Will try to see if there’s a way to change it in GH (or Rhino)

Hey @knut.tjensvoll

Can you please do an additional test for me? What does Environment.ExpandEnvironmentVariables("%AppData%") return if you put that inside a GH C# node instead?

@teocomi %AppData% gives the one on the bottom

1 Like

Hi @knut.tjensvoll!

Sorry to have you poking around… but it’s the only way we can figure out what’s going on with your specific setup.

As I understand it, the Default user in Windows is not something we should ever be touching, as it’s the “template” for any new user’s in that machine.

I’ve got one extra test for you…It’s weird that the SpecialFolder.ApplicationData points to the default though, could you try and check if this line of code does return your user profile (not the Default one)

Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)

We may be able to work around your issue by just grabbing the proper user profile and appending /AppData/Roaming at the end, but i’d like to confirm that it actually points to the user you’d expect :slight_smile:

Hi @AlanRynne ,

So that actually gives me, so that’s good.
image

But still the ApplicationData is in the Default folder… So weird…
image

1 Like

Ok…this gives me some hope of fixing this on our side hehe :upside_down_face:

Let me have a chat with the team and I’ll get back to you!

Okay thank you very much for your help so far @AlanRynne and @teocomi !

1 Like

We might push a “preliminary version” of this fix for you to test sometime today/tomorrow, but meanwhile I have 2 new questions for you @knut.tjensvoll :smiley:

  • We’re using the same logic in the KitManager and the Account selection node, so it just dawned on me… does your account node pick up the accounts setup in Manager properly?
  • Just to triple check, that path C:\Users\909587 is in fact the correct path for your current user, right?

Thanks again for your patience while we figure this out! :smiley:

@knut.tjensvoll We released version 2.7.1-appDataFix last night, could you install it and check if that does fix the Kit issue for you?

It’s not really a “full fix”, just some quick changes we made for you to be able to give it a go :slight_smile:

If that works, we’ll implement it everywhere it’s needed so that we’ll always pickup the right user folder.

@AlanRynne Thanks for helping out! And sorry that I haven’t responded, but it’s been quite busy. I unfortunately don’t have time to test today, but I’ll definitely test it on Monday or maybe even during the weekend.

Nope it didn’t, so I had to copy all of the below into the Default/AppData/Roaming/Speckle folder.

Yes indeed 909587 is the correct path :slight_smile:

@AlanRynne so I uninstalled everything Speckle that I could find and deleted the Speckle folders in both the default user and my own user. Then I installed the new manager and the Rhino/GH connector v2.7.1-appDataFix.

Now it does find the kits! :smiley:
However, it doesn’t find the accounts, which I suppose is also expected.

image

1 Like

Hi again @knut.tjensvoll!

I’m glad to hear that a full reinstall with our new manager somehow managed to get it working.

The “No accounts found” is expected, as I only fixed the Kit logic (that way we had a way to compare). The accounts (and several other non-critical places) still use the “wrong” AppData folder, I’ll work on getting that fixed and release an alpha version for you to fully test as soon as possible.
:slight_smile:

1 Like

Hey @knut.tjensvoll ,

We wanted to give you a quick heads-up in regards to this issue as we’re changing a bit how paths are handled, and that might affect you.

We’re going back to the old mechanism (that used SpecialFolder.ApplicationData), and we will now instead be providing a simple way to override that default path with an Environment Variable.

Changes will take effect in the upcoming 2.10 release of the connectors and in the next Manager release.

If you happen to encounter issues in your Rhino/GH connectors, you can just add an Environment Variable named SPECKLE_USERDATA_PATH with your actual user path (which should be C:\Users\909587\AppData\Roaming).

Please let me know if you have any questions!

2 Likes