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

SkyAPM.Diagnostics.CAP System.MissingMethodException: Method not found sometimes #565

Open
4 tasks
bingtianyiyan opened this issue Aug 15, 2023 · 2 comments
Open
4 tasks

Comments

@bingtianyiyan
Copy link

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirement
  • Feature or performance improvement

Question

  • What do you want to know?

Bug

  • Which version of SkyWalking, OS and .NET Runtime?
    -SkyWalking 8.9.1-91ab0a3 (20211210154203)
    SkyAPM.Agent.AspNetCore:2.1.0
    SkyAPM.Diagnostics.CAP:2.1.0

  • Which company or project?

  • What happen?
    when i use SkyAPM.Diagnostics.CAP(2.1.0) to monitor cap,The application is open and run, my computer is Lock screen,the newwork mybe break sometimes,When I come back, unlock my computer and connect to the internet,application is to print this error and Will not automatically recover,but cap can normal use to publish message and receivemessage
    Invoke diagnostic method exception.
    System.MissingMethodException: Method not found: 'DotNetCore.CAP.Messages.TransportMessage DotNetCore.CAP.Diagnostics.CapEventDataPubSend.get_TransportMessage()'.
    at SkyApm.Diagnostics.CAP.CapTracingDiagnosticProcessor.BeforePublish(CapEventDataPubSend eventData)
    at invoker_Void BeforePublish(CapEventDataPubSend)(Object , Object[] )
    at SkyApm.Diagnostics.TracingDiagnosticMethod.Invoke(String diagnosticName, Object value)
    at SkyApm.Diagnostics.TracingDiagnosticObserver.OnNext(KeyValuePair`2 value)

1692088454450

Requirement or improvement

  • Please describe about your requirements or improvement suggestions.
@feiyun0112
Copy link
Contributor

It may be that the new version of DotNetCore.CAP modifies the TransportMessage definition, try the version referenced by SkyAPM.Diagnostics.CAP

 <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
        <PackageReference Include="DotNetCore.CAP" Version="3.1.2" PrivateAssets="All" />
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
        <PackageReference Include="DotNetCore.CAP" Version="5.2.0" />
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
        <PackageReference Include="DotNetCore.CAP" Version="6.2.1" />
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
        <PackageReference Include="DotNetCore.CAP" Version="7.0.1" />
    </ItemGroup>

@bingtianyiyan
Copy link
Author

It may be that the new version of DotNetCore.CAP modifies the TransportMessage definition, try the version referenced by SkyAPM.Diagnostics.CAP

 <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
        <PackageReference Include="DotNetCore.CAP" Version="3.1.2" PrivateAssets="All" />
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
        <PackageReference Include="DotNetCore.CAP" Version="5.2.0" />
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
        <PackageReference Include="DotNetCore.CAP" Version="6.2.1" />
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
        <PackageReference Include="DotNetCore.CAP" Version="7.0.1" />
    </ItemGroup>

thanks for you,i try it.my CAP version is 7.1.4

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

No branches or pull requests

2 participants