Skip to content
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

Akka.Fsharp spawning an actor results in Exception in 1.3.6 release #3402

Closed
ivog opened this issue Apr 19, 2018 · 9 comments
Closed

Akka.Fsharp spawning an actor results in Exception in 1.3.6 release #3402

ivog opened this issue Apr 19, 2018 · 9 comments

Comments

@ivog
Copy link
Contributor

ivog commented Apr 19, 2018

The exception is:

System.Exception: Doesn't match
at Akka.FSharp.Linq.toExpression[Actor](Expression f)
at Akka.FSharp.Spawn.spawnOpt[Message,Returned](IActorRefFactory actorFactory, String name, FSharpFunc2 f, FSharpList1 options)

I think the problem could be related to the Akka.Fsharp project referencing the 1.1.0 version of FSharp.Quotations.Evaluator which is a broken package. The 1.1.2 version of that package is correct.

@ivog
Copy link
Contributor Author

ivog commented May 10, 2018

This is fixed since #3405 was merged. Since nightly build Akka.FSharp 1.3.7-beta501 Akka.Fsharp seems to be working properly again!

@chrisjhoare thanks! I guess PR #3441 wasn't even needed to fix Akka.FSharp. I'll close this issue.

@jtmueller
Copy link

I'm getting this error in 1.3.8...

@Aaronontheweb
Copy link
Member

@jtmueller same exact stack trace? Do you have a small repro sample we could look at?

cc @Horusiath

@Aaronontheweb Aaronontheweb reopened this Aug 22, 2018
@Aaronontheweb Aaronontheweb modified the milestones: 1.3.7, 1.3.10 Sep 5, 2018
@jtmueller
Copy link

@Aaronontheweb Yes, the same stack trace. I'm now getting it in 1.3.10 in a different project that I just updated from Akka 1.2.3. spawnObj appears to be completely unusable unless I stick to Akka 1.2.3.

at Akka.FSharp.Linq.toExpression[Actor](Expression f)
at Akka.FSharp.Spawn.spawnObjOpt[a](IActorRefFactory actorFactory, String name, FSharpExpr1 f, FSharpList1 options)

I can't share this project, but I guess I can try to make an isolated repro case if you still can't reproduce it. From where I'm sitting it's harder to avoid getting this error than it is to reproduce.

@jtmueller
Copy link

It might be relevant that my project is targeting .NET 4.5.2. However, I tried retargeting it to 4.6.1 and reinstalling all the nuget packages, but it didn't make any difference.

@jtmueller
Copy link

Here's a simple isolated repro: Akka.FSharp.SpawnRepro.zip

This project is targeting .NET 4.5.2 and Akka 1.2.3.

  1. Open the attached project in Visual Studio 2017 (I have 15.9.3). Build and run it to verify that it works.
  2. Use NuGet to upgrade Akka.FSharp to the latest version (or any version 1.3.6 or newer)
  3. Now build and run again.
Unhandled Exception: System.Exception: Doesn't match
   at Akka.FSharp.Linq.toExpression[Actor](Expression f)
   at Akka.FSharp.Spawn.spawnObjOpt[a](IActorRefFactory actorFactory, String name, FSharpExpr`1 f, FSharpList`1 options)
   at Program.main(String[] argv) in C:\...\Akka.FSharp.SpawnRepro\Program.fs:line 16

chrisjhoare added a commit to chrisjhoare/akka.net that referenced this issue Dec 2, 2018
@chrisjhoare
Copy link
Contributor

Just opened a pull request which I appears to fix this. I'm not super familiar with this area and don't use expressions for actors myself, but at the very least you might be able to make use of the forked code yourself.

@Aaronontheweb
Copy link
Member

Looks like @chrisjhoare's PR addresses this. Will be releasing that fix as part of 1.3.11, which we're going to be releasing shortly.

Aaronontheweb pushed a commit that referenced this issue Dec 14, 2018
* Fix for #3402. Allows spawning an actor via expression.

* Change ExprSerializer Identifier to 99 to avoid clash with Cluster pubsub
@Aaronontheweb
Copy link
Member

closed via #3667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants