New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alias Newtonsoft #190
Comments
|
I got a weird error today doing some tests. Connecting my account to any Stream component in grasshopper, I get this: Might be related? If so the reports are 3. Otherwise ignore me. |
|
Yep, that's probably due to a Newtosoft conflict, try temporarily disabling your other GH plugins (eg jSwan...) We'll add this item to our backlog for the Beta release! |
|
I tried to disable all plugins... same error. |
|
If that helps, the conflict happen when getting the client |
|
(source: https://discourse.mcneel.com/t/creating-brep-from-json/65873 and my pc) |
|
Try see if this brings any joy: 295ea73 |
|
No joy. GQLClient = new GraphQLHttpClient(
new GraphQLHttpClientOptions
{
EndPoint = new Uri(new Uri(account.serverInfo.url), "/graphql"),
UseWebSocketForQueriesAndMutations = false,
ConfigureWebSocketConnectionInitPayload = (opts) => { return new { Authorization = $"Bearer {account.token}" }; },
OnWebsocketConnected = OnWebSocketConnect,
},
new NewtonsoftJsonSerializer(),
HttpClient);Can it be the extternal assembly |
|
Hey @iltabe can you please pull branch |
|
So I got to the bottom of it. The issue was caused by a combination of things:
When Rhino loads it sometimes ignore the N12 dependency and just loads N10, this causes problems in Speckle and in the GQL library. This is especially reproducible when enabling the "Memory load GHA using COFF byt array" setting, as that seems to make Rhino always ignore our N12 dependency. Solution:
Now Speckle can run alongside other GH plugin using earlier versions of Newtonsoft and as well it works well with the COFF setting enabled (see imga below). Other solutions tried: Will close this issue as soon as we approve the solution found. |




Newtonsoft.Json is creating conflicts again, we had 2 reports of that happening in GH, so we should alias wherever is possible.
Example of how to do so is in the DynamoConnector where we aliased an old version of Newtonsoft that Dynamo uses internally:
https://github.com/specklesystems/speckle-sharp/blob/master/ConnectorDynamo/ConnectorDynamo/ConnectorDynamo.csproj#L66-L69
speckle-sharp/ConnectorDynamo/ConnectorDynamo/AccountsNode/Accounts.cs
Line 2 in 4fb9c83
The text was updated successfully, but these errors were encountered: