Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Nick Hodges
    @NickHodgesRB
    Hello! If you are interested in getting help with our contributing to the Rollbar .net SDK, this is the place to do it!
    Marvin Frederickson
    @mfrederickson

    I am getting the following internal Rollbar error when adding Rollbar.NET to my simple console app that targets the 4.7.2 Framework, and run it:

    Unhandled Exception: Rollbar.RollbarException: Exception while initializing the internal services! ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Rollbar.RollbarInfrastructure.Init(IRollbarInfrastructureConfig config)
       --- End of inner exception stack trace ---
       at Rollbar.RollbarInfrastructure.Init(IRollbarInfrastructureConfig config)
       at PapyrusNotifierConsole.Module1.ConfigureRollbar() in C:\projects\PapyrusNotifier\PapyrusNotifierConsole\Module1.vb:line 11
       at PapyrusNotifierConsole.Module1.Main() in C:\projects\PapyrusNotifier\PapyrusNotifierConsole\Module1.vb:line 15

    Here is the relevant code:

        Sub ConfigureRollbar()
            Dim rollbarInfrastructureConfig As RollbarInfrastructureConfig = New RollbarInfrastructureConfig("thiscodecamefromrollbarprojectsetuppage")
            RollbarInfrastructure.Instance.Init(rollbarInfrastructureConfig)
        End Sub
    
        Sub Main()
            ConfigureRollbar()
            RollbarLocator.RollbarInstance.Info("Rollbar is configured properly.")

    Can someone help me? I've not had any luck googling a solution.

    Cyrus Radfar
    @cyrusradfar
    Hi Marvin! We just setup this community and channel. You can be proud to be the first ever request! I’ll pull the right person in to support.
    Nico Krüger
    @TheDevFactory
    I was able to create a quick console application in VB.Net using the 4.7.2 Framework. Here is the working code I have using only the Nuget Package called Rollbar

    Imports Rollbar

    Module Module1

    Sub Main()
    
        'Write messages to console window
        Console.WriteLine("Welcome to this Console Application.")
    
        Console.WriteLine("Loading main application data...")
    
        Console.WriteLine("|")
        Console.WriteLine("|-")
        Console.WriteLine("|-|")
        Console.WriteLine("|-|-")
        Console.WriteLine("|-|-|")
    
        'Load Rollbar
        ConfigureRollbar()
    
        'Execute Functions
        HandledError()
    
        Console.WriteLine("Ready.... press any key to exit.")
    
        'Keeps the Window Open Until a Key press
        Console.Read()
    
    End Sub
    
    Sub ConfigureRollbar()
    
        Dim objRollbarSettings As New RollbarLoggerConfig("XXX", "Production")
    
        RollbarLocator.RollbarInstance.Configure(objRollbarSettings)
        RollbarLocator.RollbarInstance.Info("Rollbar is configured properly.")
    
    End Sub
    
    
    Sub HandledError()
    
        Try
    
            'Generate Error Here
            Dim intValue As Integer
            Dim intValue2 As Integer = 0
    
            'Generate Error Here
            intValue = 1 / intValue2
    
        Catch ex As Exception
            RollbarLocator.RollbarInstance.Error(ex)
        End Try
    
    End Sub

    End Module

    To Test this code just change out this test XXX with your project Access Token
    Dim objRollbarSettings As New RollbarLoggerConfig("XXX", "Production")
    Nico Krüger
    @TheDevFactory
    @mfrederickson let me know if the above example answers your questions.
    Marvin Frederickson
    @mfrederickson
    @TheDevFactory that worked great. Thank you.
    Andrey Kornich (Wide Spectrum Computing LLC)
    @akornich
    @mfrederickson, thanks for reporting the issue. I opened this GH issue based on your report: rollbar/Rollbar.NET#623.
    @mfrederickson , the fix is in and is available within the latest v5.1.2 release of the SDK. Now, the RollbarInfrastructure can be successfully initialized within client applications targeting .NET Framework. Please, feel free to open a GitHub issue against the SDK repository any time you have a question, a suggestion, or find a bug.
    George Tzavaras
    @fr33k3r
    Hi everyone. Just joined. Nice to be here!
    1 reply
    Thomas Wolf
    @rm984519_gitlab
    Hi
    Josh Minnie
    @joshminnie_twitter
    Hello. I was looking at the docs for Rollbar's .NET SDK and I'm not seeing documentation around .NET 6. Is the .NET 5 version compatible with .NET 6?
    2 replies