question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work on Linux - mono

See original GitHub issue

Removing all instances of RedditSharp clears errors and it works fine on my Windows PC.

I have no idea what the error means.

Unhandled Exception:
System.InvalidCastException: Specified cast is not valid.
  at RedditSharp.WebAgent.CreateRequest (System.String url, System.String method) <0x41fbdfc0 + 0x00177> in <filename unknown>:0
  at RedditSharp.BotWebAgent.CreateRequest (System.String url, System.String method) <0x41fbdec0 + 0x000b7> in <filename unknown>:0
  at RedditSharp.WebAgent.CreateGet (System.String url) <0x420396a0 + 0x00022> in <filename unknown>:0
  at RedditSharp.Reddit.InitOrUpdateUser () <0x42039400 + 0x0007b> in <filename unknown>:0
  at RedditSharp.Reddit..ctor (IWebAgent agent, Boolean initUser) <0x420390a0 + 0x00157> in <filename unknown>:0
  at botname.RedditAccount.startup () <0x41f936e0 + 0x000e3> in <filename unknown>:0
  at botname.Program.Start () <0x41f92150 + 0x000e3> in <filename unknown>:0
  at botname.Program.Main (System.String[] args) <0x41f90d50 + 0x00033> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidCastException: Specified cast is not valid.
  at RedditSharp.WebAgent.CreateRequest (System.String url, System.String method) <0x41fbdfc0 + 0x00177> in <filename unknown>:0
  at RedditSharp.BotWebAgent.CreateRequest (System.String url, System.String method) <0x41fbdec0 + 0x000b7> in <filename unknown>:0
  at RedditSharp.WebAgent.CreateGet (System.String url) <0x420396a0 + 0x00022> in <filename unknown>:0
  at RedditSharp.Reddit.InitOrUpdateUser () <0x42039400 + 0x0007b> in <filename unknown>:0
  at RedditSharp.Reddit..ctor (IWebAgent agent, Boolean initUser) <0x420390a0 + 0x00157> in <filename unknown>:0
  at botname.RedditAccount.startup () <0x41f936e0 + 0x000e3> in <filename unknown>:0
  at botname.Program.Start () <0x41f92150 + 0x000e3> in <filename unknown>:0
  at botname.Program.Main (System.String[] args) <0x41f90d50 + 0x00033> in <filename unknown>:0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
CrustyJewcommented, Mar 1, 2017

Yeah merging the code back in is fine, I see the PR for that. Was just trying to narrow down why it was breaking

0reactions
CrustyJewcommented, Mar 6, 2017

I’m assuming this has been fixed and am going to close the issue. Feel free to re-open if it’s still not behaving on the latest version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install Mono on Linux
Install Mono on Linux ... Follow the instructions on the download page for the latest stable release. Alternatively, you can also try the...
Read more >
FAQ: Technical | Mono
What operating systems does Mono run on?#. Mono runs on Linux, UNIX and Windows systems. For a more detailed list, see the Supported...
Read more >
Mono problem!
Hello folks, i'm getting this error when i use mono to run a windows form in a raspberry pi 4: mono WindowsFormsApp1.exe Unhandled...
Read more >
Mono Application Compiled Under Linux Does Not Run in ...
1 Answer 1 ... Since you are using Mono.Unix.Catalog then your project should be referencing the Mono.Posix assembly. The problem is likely to...
Read more >
Mono won't run with script or sudo - linux
Whenever I try run a program like this "sudo mono Program.exe" or from a bash script. I get the error: mono: command not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found