0

I have a website running in production that uploads files on behalf of users. This functionality has been working for months with only transient network issues.

Past two weekdays (Friday and Monday, virtually no usage over the weekend), all users are getting the standard null reference error whenever they try to upload the file. I'm able to produce this in all our environments. The interesting part is that the graph service itself is returning the error message, this is NOT a null reference exception from the website code.

Here is the request URL: https://graph.microsoft.com:443/beta/groups/[id]/drive/items/[folderId]:/[filename].[ext]:/microsoft.graph.createUploadSession

The [] and content within are placeholders for the values that are sent. I am using the .NET Graph SDK and have verified that it is properly encoding the file name.

The body of the response from the Graph API is:

{
  "error": {
    "code": "InternalServerError",
    "message": "Object reference not set to an instance of an object.",
    "innerError": {
      "request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "date": "2020-02-17T20:10:03"
    }
  }
}
Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
Brian Ball
  • 12,268
  • 3
  • 40
  • 51
  • The error goes away if I stop using the beta endpoint. I realize that using the beta endpoint is not supported in production, but I would still like to find a solution. – Brian Ball Feb 18 '20 at 15:14
  • Hey, Any chance you resolved this issue? If not, what is the request body you are providing when calling the URL? – Eastman Jan 26 '21 at 10:51
  • It's been a while. I had to look back at the code to see what I did. It looks like I didn't do anything different than what I posted; I believe the software I was working on had another requirement that was only available on the beta endpoint, so we just decided to go with that. – Brian Ball Jan 26 '21 at 13:15
  • Sorry. I did not fully understand. Did it finally work on beta, or did you just use v1.0? – Eastman Jan 27 '21 at 10:32
  • Sorry, I didn't full re-read my original question before responding. Looking back at the history of the source code, I didn't make any code changes to fix it. I think I just used a different endpoint. I either switched from beta to v1.0 or the other way around. I don't have the request body available as I am using a library provided by MSFT, so I am just making C# calls and that library is translating it into REST calls for me. – Brian Ball Jan 27 '21 at 14:49

0 Answers0