Grasshopper - 2.0 connector error

Since today I get some errors when starting GH. This results in the Speckle 2.0 toolbar being quite empty. I tried the following steps: uninstall GH connector, start GH, close GH, and reinstall. No luck so far.

I’ve added a Screenshot of the toolbar. Plus GH loading errors log (in quotes, not sure if this is the ideal way to do that? EDIT: thank you Matteo for adding it as code block).
Any ideas on what I could do or test?

GH_Speckle2.0

Object: ToNativeConverterAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: ToNativeConverterAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: ToSpeckleConverterAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: ToSpeckleConverterAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: GetObjectValueByKeyAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: GetObjectValueByKeyAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: GetObjectValueByKey (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: GetObjectValueByKey (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: ExtendSpeckleObjectAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: ExtendSpeckleObjectAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: ExtendSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: ExtendSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: ExpandSpeckleObjectAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: ExpandSpeckleObjectAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: ExpandSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: ExpandSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: CreateSpeckleObjectByKeyValue (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: CreateSpeckleObjectByKeyValue (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: CreateSpeckleObjectByKeyValueAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: CreateSpeckleObjectByKeyValueAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: CreateSpeckleObjectAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: CreateSpeckleObjectAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: SendComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: SendComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: ReceiveComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: ReceiveComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: SendLocalComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: SendLocalComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: ReceiveLocalComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: ReceiveLocalComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: CreateSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: CreateSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
Object: CreateSchemaObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}
Object: CreateSchemaObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}
1 Like

Hi @JdB , what version of the connector is it?

If it’s a beta version I’d recommend disabling installation of betas from the manager as they’re not always tested, and then re-install the connector.

1 Like

Hi @teocomi , thank you (also for adding the code block to my start post)

I’m using this version:

This is the manager version: image

In the settings I have beta versions turned off (I didn’t know this features was here, nice!):
image

Then can you let us know if anything got updated recently? We’d be interested in

  • new rhino version? 6 or 7?
  • rhino inside update (we suspect this one strongly, but for revit issues)?
  • any plugins you’ve added recently, or any that got updated?
  • any other changes that could’ve happened to any speckle-related software?
1 Like

A reboot of my pc “fixed” it. So not sure what was going on…

I use this version of Rhino: image
I use GH in Rhino (so not from within Revit).

If I would ever get the error again, I’ll post it here and try to answer all questions.

2 Likes

Hi, got the same problem as above.
Rhino 7 (7.4.21078.1001, 2021-03-19) - just updated.
Speckle Manager v2.0.22
Speckle connector for Rhino 2.1.3 - just updated
Speckle connector for Grasshopper 2.1.3 - just updated.

below gh_load_error:

Object: ToNativeConverterAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ToNativeConverterAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ToSpeckleConverterAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ToSpeckleConverterAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: GetObjectValueByKeyAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: GetObjectValueByKeyAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: GetObjectValueByKey (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: GetObjectValueByKey (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ExtendSpeckleObjectAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ExtendSpeckleObjectAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ExtendSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ExtendSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ExpandSpeckleObjectAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ExpandSpeckleObjectAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ExpandSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ExpandSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSpeckleObjectByKeyValue (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSpeckleObjectByKeyValue (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSpeckleObjectByKeyValueAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSpeckleObjectByKeyValueAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSpeckleObjectAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSpeckleObjectAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: SendComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: SendComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ReceiveComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ReceiveComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: SendLocalComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: SendLocalComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ReceiveLocalComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ReceiveLocalComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSchemaObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSchemaObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Thanks for the deets @Ionut_Anton !
Can you tell us if you’re getting the error consistently or just randomly? Does a reboot fix it by any chance?

If not, we’d be happy to try debug it with you if possible.

Tried a reboot and gettign the error consistently on every startup.
There is no speckle toolbar in rhino nor in Grasshopper.
First install of speckle worked for me. upon updating rhino and speckle it stopped working.

This is my components folder in gh.

1 Like

Just did a remove and install on rhino and grasshopper connectors for speckle.
rhino works just fine.
grasshopper same error.

Rhino 6 works just fine, both in gh and in rhino.
its rhino 7 with latest update that doesnt work.

1 Like

Dang. We’ll look into this… Probably a minor case of dependency hell that we’re in at the moment.

3 Likes

Currently, it’s being tracked here: Gh Bug: error initializing connector · Issue #414 · specklesystems/speckle-sharp · GitHub

@Ionut_Anton if you’r bored this weekend, maybe you could zip your components folder and send it to us, that’ll help us try to replicate it!

3 Likes

I got the error again, this time only a reboot of Rhino solved it. Yesterday I didn’t got the error but as far as I know nothing changed.

It appears to be quite random, which was also the case in the topic below. Let me know if it would be useful to run practically the same script with and without the error. I could run the script like this:

A = AppDomain.CurrentDomain.GetAssemblies().Select(o => o.FullName).ToList();

Link to the other topic:

Hey @JdB_RHDHV, sorry you’re also experiencing this… That may be useful, although it may be quite a long list!! :sweat_smile: I think this may be caused by Grasshopper choosing the order in which it loads the components.

Are you getting the error consistently? If so, can you try modifying the Load Mechanism for Speckle2 in the Grasshopper Settings, and set it to Disk? (See pic)

1 Like

Hi Alan, thank you I’ve changed the setting. I’ll let you know if I get the error again.

As a test I’ve been closing and reopening Rhino and GH today (instead of just leaving it on when I don’t need it). Sometimes I get the error, sometimes I don’t. It appears to be quite random.

Since it might be useful, I’ve listed the differences between lists of assemblies. “Txt_working” and “Txt_working_2” contain a list when Speckle 2.0 is working fine (the list differs after a restart of Rhino and GH) and “Txt_error” is the list of assemblies when I get the error. If you’d like me to post the whole lists let me know.

Hopefully this information is a bit clear (and useful). If not, please let me know and I’ll try to clarify.

3 Likes

wow! many thanks for this @JdB. I’m going to look into it but I’m unable to reproduce it… From the lists you sent us nothing really stands out :thinking:

how big is your Grasshopper Libraries folder? Could you share a screenshot of what’s installed?

Is it viable to zip it and send it to us? You can send me a link privately if you prefer :wink:

That way we can be sure we have 100% the same dlls and maybe get it to reproduce in my computer.

On a similar approach, if you remove ALL the components in the folder except the Speckle2, do you still get the error? (just drag them to a temporary folder so you can set them back as they were)

Sorry for the many questions/requests :angel:

Hi @JdB and @Ionut_Anton. Thanks again for reporting this and helping us fix it, I’ve been hacking around trying to find a solution, but since I cannot reproduce it locally, I’m not sure it actually addresses the underlying problem. So this is what I came up with:

In order to know if these changes fix the issue, I added the fix to the Object Management nodes only, and published a new beta version of the GH connector (2.1.4-beta). You should already see it in your Manager.

So, in theory, if the fix works, you should be getting all the Object Management nodes properly loaded without any issues. And probably the following ones should still throw an error:

  • Send/Receive
  • Send local/ Receive Local
  • Convert ToNative
  • Convert ToSpeckle

This way, we can still detect when the issue occurs and, when it does, if the fix I added actually works in that case.

Let me know if you can reproduce the error with the new version and if everything works as expected I’ll apply the patch to everything else.

3 Likes

Hi there.
Just updated the beta speckle connector for grasshopper and it works just fine. all of it, including send/receive. didint get any errors.
Also i can confirm that the error i am getting is due to latest rhino update.
tried today on a second computer to install speckle. all worked, both rhino and grasshopper. updated rhino to latest version and speckle for grasshopper stopped working. updated speckle for grasshopper to its beta version and it started working again.

Cheers for all the effort put into it!

2 Likes

Great idea!

I’ve installed the beta client and after a bunch of restarts of Rhino I got the error and the result is here below. So most object management things are in there (only the Create Schema Object is missing). And, as you expected, the send/receive is missing so I think this could be it!
image

Full error export:

Object: ToNativeConverterAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ToNativeConverterAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ToSpeckleConverterAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ToSpeckleConverterAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: GetObjectValueByKey (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: GetObjectValueByKey (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ExtendSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ExtendSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ExpandSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ExpandSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSpeckleObjectByKeyValue (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSpeckleObjectByKeyValue (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: SendComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: SendComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ReceiveComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ReceiveComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: SendLocalComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: SendLocalComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ReceiveLocalComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ReceiveLocalComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSchemaObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSchemaObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Wooohoo!!! :partying_face: seems like we’re getting somewhere… thanks both!

Although, it seems my fix only addresses the issue partially. I was expecting the Object Management nodes to not throw an exception at all and load properly; but it seems like they are able to load now while still throwing the exception :thinking: @JdB, do the CreateSpeckleObject and ExpandSpeckleObject nodes work properly even when you get the error?

This may indicate that the null reference is somewhere else…

1 Like