Null posts after submitting
See original GitHub issueThis 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:
- Create a new user which my script runs under, verified with email.
- Make them a moderator of the subreddit they run on.
- Create a link post to the desired content (this returns a null post, even though the post was submitted)
- 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:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok I found the issue, just a minute
Great thanks! The issue was fixed. I did discover another issue but it is different enough to warrant a separate issue.