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.

Null posts after submitting

See original GitHub issue

This problem has been reproducible so far on both build 1.1.12 and 2.0.0-CI00020 for me. The steps I have taken to cause the issue are as follows:

  1. Create a new user which my script runs under, verified with email.
  2. Make them a moderator of the subreddit they run on.
  3. Create a link post to the desired content (this returns a null post, even though the post was submitted)
  4. Attempt to set a flair on a null post and fail.

Not much information is shown when the error occurs (This is a stack trace from the 2.0-.Net-Core branch):

Unhandled Exception: System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullR
eferenceException: Object reference not set to an instance of an object.
   at RedditSharp.Things.Subreddit.<SubmitAsync>d__176.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RedditSharp.Things.Subreddit.<SubmitTextPostAsync>d__178.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at youtube_updates_multi.Program.<>c__DisplayClass4_0.<<Main>b__1>d.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at youtube_updates_multi.Program.Main(String[] args)

However, I know for a fact the post task succeeded because the post exists. I’ve currently altered my process to include a step between the post submission and setting the flair, which simply filters down to all of the posts in the subreddit which were created after or at the time the YouTube video (link I am posting) was created, and then checking URLs to make sure it ended up being posted. However I would like to know why this issue is occurring in the first place.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CrustyJewcommented, Mar 9, 2017

Ok I found the issue, just a minute

0reactions
kade-robertsoncommented, Mar 11, 2017

Great thanks! The issue was fixed. I did discover another issue but it is different enough to warrant a separate issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

$_POST is empty/null after form submission - php
Firstly, data is an array. Hence form.append(data) will stringify the array and append it in the HTML as text. It is not adding...
Read more >
Post data returning null [closed]
I'm getting all of the other POST data, so that seems to be working okay. However, I'm not getting the submit button's post...
Read more >
Post Request for Appointment Planner sending null object
I completed the Appointment Planner project. So I decided to go further and add a backend to the application that would store Contacts...
Read more >
Why do we use isset() if, after submitting the form, the $ ...
The array $_POST always exists, but specific elements may be non-existent, in which case you will get an “undefined index error” if you...
Read more >
How to stop sending a null value to an API post - Codeless
I am creating a custom function to host a HTTP POST request. The POST request uses the Create Object block to update data...
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