MicrosoftDocs / appcenter-docs

content repo for Visual Studio App Center on docs.microsoft.com
https://docs.microsoft.com/appcenter/
Creative Commons Attribution 4.0 International
122 stars 321 forks source link

Crash Upload API not working? #1493

Closed yamir-godil closed 11 months ago

yamir-godil commented 11 months ago

Hello,

I'm trying to test out the AppCenter API for Android crash uploading and I get this when I run the POST request displayed in the docs -

{"status":"NoValidLogsFoundInLogContainer","validDiagnosticsIds":[],"throttledDiagnosticsIds":[],"correlationId":"0884e55c-636c-4ef4-bf3b-bf7e8dcb9246"}

Docs with API request - https://learn.microsoft.com/en-us/appcenter/diagnostics/upload-crashes

Is this API still available for developers to upload custom crashes? I've tried using my app's process name and app secret, but I still get same error..


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Crash POST API Request -

curl -X POST \
>   'https://in.appcenter.ms/logs?Api-Version=1.0.0' \
>   -H 'Content-Type: application/json' \
>   -H 'app-secret: 8e14e67c-7c91-40ac-8517-c62ece8424a6' \
>   -H 'install-id: 00000000-0000-0000-0000-000000000001' \
>   -d '{
>   "logs": [
>     {
>       "type": "managedError",
>       "timestamp": "2019-10-08T04:22:23.516Z",
>       "appLaunchTimestamp": "2019-09-29T22:22:23.516Z",
>       "processId": "123",
>       "id": "bca65f46-46ee-451b-83bb-2e358c3f45bf",
>       "fatal": true,
>       "processName": "com.microsoft.appcenter.demo.project",
>       "device": {
>         "appVersion": "12.0",
>         "appBuild": "1",
>         "sdkName": "custom.android",
>         "sdkVersion": "1.0.0",
>         "osName": "android",
>         "osVersion": "9.3",
>         "model": "Pixel",
>         "locale": "en-US",
>         "appNamespace": "com.contoso.myapp"
>       },
>       "userId": "TestID",
>       "exception": {
>         "type": "java.lang.RuntimeException",
>         "frames": [
>           {
>             "className": "android.app.ActivityThread",
>             "fileName": "ActivityThread.java",
>             "lineNumber": 2575,
>             "methodName": "performResumeActivity"
>           },
>           {
>             "className": "android.app.ActivityThread",
>             "fileName": "ActivityThread.java",
>             "lineNumber": 2603,
>             "methodName": "handleResumeActivity"
>           },
>           {
>             "className": "android.app.ActivityThread",
>             "fileName": "ActivityThread.java",
>             "lineNumber": 2089,
>             "methodName": "handleLaunchActivity"
>           },
>           {
>             "className": "android.app.ActivityThread",
>             "fileName": "ActivityThread.java",
>             "lineNumber": 130,
>             "methodName": "access$600"
>           },
>           {
>             "className": "android.app.ActivityThread$H",
>             "fileName": "ActivityThread.java",
>             "lineNumber": 1195,
>             "methodName": "handleMessage"
>           },
>           {
>             "className": "android.os.Handler",
>             "fileName": "Handler.java",
>             "lineNumber": 99,
>             "methodName": "dispatchMessage"
>           },
>           {
>             "className": "android.os.Looper",
>             "fileName": "Looper.java",
>             "lineNumber": 137,
>             "methodName": "loop"
>           },
>           {
>             "className": "android.app.ActivityThread",
>             "fileName": "ActivityThread.java",
>             "lineNumber": 4745,
>             "methodName": "main"
>           }
>         ],
>         "innerExceptions": [
>           {
>             "type": "java.lang.RuntimeException",
>             "frames": [
>               {
>                 "className": "android.app.Activity",
>                 "fileName": "Activity.java",
>                 "lineNumber": 5084,
>                 "methodName": "performResume"
>               },
>               {
>                 "className": "android.app.ActivityThread",
>                 "fileName": "ActivityThread.java",
>                 "lineNumber": 2565,
>                 "methodName": "performResumeActivity"
>               },
>               {
>                 "className": "android.app.ActivityThread",
>                 "fileName": "ActivityThread.java",
>                 "lineNumber": 2603,
>                 "methodName": "handleResumeActivity"
>               }
>             ]
>           }
>         ]
>       }
>     }
>   ]
> }'
{"status":"NoValidLogsFoundInLogContainer","validDiagnosticsIds":[],"throttledDiagnosticsIds":[],"correlationId":"99b70064-1547-486f-8098-7879c0b86d0d"}
yamir-godil commented 11 months ago

Was able to get it working by updating the timestamp to be more recent. Closing.