microsoftgraph / msgraph-sdk-android

Microsoft Graph SDK for Android! https://graph.microsoft.io
Other
51 stars 43 forks source link

Unexpected 500 error from Graph #43

Closed yesjessn closed 7 years ago

yesjessn commented 7 years ago

Got the following error while trying to create a folder in my app folder:

com.microsoft.graph.http.GraphFatalServiceException: [This is an unexpected error from Graph, please report this at https://github.com/microsoftgraph/msgraph-sdk-android/issues]
POST https://graph.microsoft.com/v1.0/me/drive/special/approot/children
SdkVersion : graph-android-v1.2.0
Authorization : bearer <REDACTED>
{"folder":{},"name":"gg"}

500 : Internal Server Error
Duration : 234.839
Cache-Control : private
X-Android-Sent-Millis : 1489454003081
Content-Type : application/json
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"West US","Slice":"SliceA","ScaleUnit":"000","Host":"AGSFE_IN_2","ADSiteName":"WST"}}
request-id : f25e8a83-5b40-493f-811c-7c9731790c9f
Date : Tue, 14 Mar 2017 01:13:37 GMT
Transfer-Encoding : chunked
X-Android-Response-Source : NETWORK 500
client-request-id : f25e8a83-5b40-493f-811c-7c9731790c9f
X-Android-Received-Millis : 1489454003395
{
    "error": {
        "code": "generalException",
        "message": "An unspecified error has occurred.",
        "innerError": {
            "request-id": "f25e8a83-5b40-493f-811c-7c9731790c9f",
            "date": "2017-03-14T01:13:37"
        }
    }
}

Full details in graph_error_500.txt.

Per the app folder and the create folder documentation, the request should work given I have "Files.ReadWrite.AppFolder" permission scope.

I created the folder manually and tried to access its metadata and it failed similarly:

com.microsoft.graph.http.GraphFatalServiceException: [This is an unexpected error from Graph, please report this at https://github.com/microsoftgraph/msgraph-sdk-android/issues]
GET https://graph.microsoft.com/v1.0/me/drive/special/approot:/gg:
SdkVersion : graph-android-v1.2.0
Authorization : bearer <REDACTED>

500 : Internal Server Error
Duration : 199.4711
Cache-Control : private
X-Android-Sent-Millis : 1489455064558
Content-Type : application/json
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"West US","Slice":"SliceA","ScaleUnit":"003","Host":"AGSFE_IN_3","ADSiteName":"WST"}}
request-id : 660fad6b-491a-4876-98c5-9160c9f8715c
Date : Tue, 14 Mar 2017 01:31:19 GMT
Transfer-Encoding : chunked
X-Android-Response-Source : NETWORK 500
client-request-id : 660fad6b-491a-4876-98c5-9160c9f8715c
X-Android-Received-Millis : 1489455064872
{
    "error": {
        "code": "generalException",
        "message": "An unspecified error has occurred.",
        "innerError": {
            "request-id": "660fad6b-491a-4876-98c5-9160c9f8715c",
            "date": "2017-03-14T01:31:20"
        }
    }
}

There's a file in the app directory that I can access via its item id and get its contents without issues.

Any ideas what might be causing this issue? I'm creating this ticket here per the error message.

caitlinrussell commented 7 years ago

So sorry for the late reply! I'm unable to reproduce your error, but it would appear that this is a service error sent from OneDrive, not an issue with the library. Could you please post this on StackOverflow with the tags "microsoftgraph" and "onedrive"? Someone from that team should be able to debug this with you.

I will look into updating the error message advice you received to be more appropriate to the situation.