Git Product home page Git Product logo

symbol-collector's Introduction


Symbol Collector

build codecov Discord Chat

Collect system symbols from different devices like Android, macOS, Linux, etc. It involves a server that writes the symbols to Google cloud storage and a set of clients.

Symbol Collector on a device farm

Uploading symbols

Client applications

Current clients are:

  • Android
  • macOS
  • Linux

The client applications will parse files and make sure they are valid ELF, Mach-O, Fat Binary, etc. Besides that, before uploading it to the server, it will make a HEAD request with the image build id to make sure this file is still missing, to avoid wasting time and bandwidth uploading redundant files.

Looking for system images in the filesystem and the HTTP requests happen in parallel, so to go through GBs and thousands of files takes only a few seconds. Finally, the client apps will upload its internal metrics to help reconcile the batch results and troubleshoot any issues.

cURL

Although using the client programs is strongly recommended, it's possible to upload files via HTTP.

For example, uploading a batch of Android symbols:

  1. Create a batch:
export batchId=$(uuidgen)
export batchFriendlyName="Android 4.4.4 - Sony Xperia"
export batchType="Android"
export body='{"BatchFriendlyName":"'$batchFriendlyName'","BatchType":"'$batchType'"}'
export server=http://localhost:5000

curl -sD - --header "Content-Type: application/json" --request POST \
  --data "$body" \
  $server/symbol/batch/$batchId/start
  1. Upload files:
curl -i \
  -F "libxamarin-app-arm64-v8a.so=@test/TestFiles/libxamarin-app-arm64-v8a.so" \
  -F "libxamarin-app.so=@test/TestFiles/libxamarin-app.so" \
  $server/symbol/batch/$batchId/upload
  1. Close batch (without providing metrics):
curl -sD - --header "Content-Type: application/json" --request POST \
  --data "{}" \
  $server/symbol/batch/$batchId/close

Why are you doing this?

In order to stack unwind from a memory dump, every loaded image involved in the call stack needs to be available. Unwind information is not in the debug files but in the libraries instead. This project allows collecting these libraries so that native crash processing can be done on the backend as opposed to stackwalking on the client.

Releases

The Releases page in this repository include builds for Android (apk), native CLIs for macOS and Linux (self contained), and the server.

Building from source

Dependencies

This project includes an Android app, an ASP.NET Core server and a Console apps as CLI clients for macOS and Linux. The build script build.sh is focused on building all the components which means you'd need all the dependencies below.

Server and Console app

To build the Server, Libraries and the Console app (aka: everything except the Android app) you'll need:

Android app

To build the Android project you need:

  • JDK 11
  • .NET Android workload: dotnet workload install android

Resources

symbol-collector's People

Contributors

bitsandfoxes avatar bruno-garcia avatar getsentry-bot avatar jasonious avatar joshuarli avatar lucas-zimerman avatar mattgauntseo-sentry avatar tonyo avatar vaind avatar vcsjones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

symbol-collector's Issues

Verify if retry logic works and sets error code if it doesn't

Doesn't seem to work from the log - there's just a log about a failed upload but no log about trying again (and succeeding).

See
https://github.com/getsentry/sentry-dart/actions/runs/6649991569/job/18069373897#step:6:4427

FINER: 2023-10-26 06:11:27.528091:    info: System.Net.Http.HttpClient.ISymbolClient.LogicalHandler[100]
FINER: 2023-10-26 06:11:27.528112:          Start processing HTTP request POST https://symbol-collector.services.sentry.io/symbol/batch/acb0d8eb-c6f6-46a5-b1c8-176ecb051369/upload
FINER: 2023-10-26 06:11:27.528853:    info: System.Net.Http.HttpClient.ISymbolClient.ClientHandler[100]
FINER: 2023-10-26 06:11:27.528889:          Sending HTTP request POST https://symbol-collector.services.sentry.io/symbol/batch/acb0d8eb-c6f6-46a5-b1c8-176ecb051369/upload
FINER: 2023-10-26 06:11:36.642136:    info: System.Net.Http.HttpClient.ISymbolClient.ClientHandler[101]
FINER: 2023-10-26 06:11:36.642180:          Received HTTP response headers after 9113.6459ms - 400
FINER: 2023-10-26 06:11:36.642633:    info: System.Net.Http.HttpClient.ISymbolClient.LogicalHandler[101]
FINER: 2023-10-26 06:11:36.642644:          End processing HTTP request after 9114.1039ms - 400
FINER: 2023-10-26 06:11:36.654732:    warn: SymbolCollector.Core.SymbolClient[0]
FINER: 2023-10-26 06:11:36.654765:          Failed to upload file
FINER: 2023-10-26 06:11:36.654773:          System.InvalidOperationException: Failed uploading file. Server response: BadRequest
FINER: 2023-10-26 06:11:36.654780:             at SymbolCollector.Core.SymbolClient.ThrowOnUnsuccessfulResponse(String message, HttpResponseMessage checkResponse)
FINER: 2023-10-26 06:11:36.654788:             at SymbolCollector.Core.SymbolClient.<>c__DisplayClass9_0.<<Upload>g__Upload|1>d.MoveNext()
FINER: 2023-10-26 06:11:36.723514:    warn: SymbolCollector.Core.Client[0]
FINER: 2023-10-26 06:11:36.723582:          Failed to upload. Failure count: 1.
FINER: 2023-10-26 06:11:36.723595:          System.InvalidOperationException: Failed uploading file. Server response: BadRequest
FINER: 2023-10-26 06:11:36.723610:             at SymbolCollector.Core.SymbolClient.ThrowOnUnsuccessfulResponse(String message, HttpResponseMessage checkResponse)
FINER: 2023-10-26 06:11:36.723625:             at SymbolCollector.Core.SymbolClient.<>c__DisplayClass9_0.<<Upload>g__Upload|1>d.MoveNext()
FINER: 2023-10-26 06:11:36.723636:          --- End of stack trace from previous location ---
FINER: 2023-10-26 06:11:36.723646:             at SymbolCollector.Core.SymbolClient.<>c__DisplayClass9_0.<<Upload>g__Upload|1>d.MoveNext()
FINER: 2023-10-26 06:11:36.723660:          --- End of stack trace from previous location ---
FINER: 2023-10-26 06:11:36.723670:             at SymbolCollector.Core.SymbolClient.Upload(Guid batchId, String unifiedId, String hash, String fileName, Func`1 fileFactory, CancellationToken token)
FINER: 2023-10-26 06:11:36.723681:             at SymbolCollector.Core.Client.UploadAsync(Guid batchId, ObjectFileResult objectFileResult, CancellationToken cancellationToken)
FINER: 2023-10-26 06:11:36.723692:             at SymbolCollector.Core.Client.UploadFilesAsync(Guid batchId, String path, CancellationToken cancellationToken)

Originally posted by @vaind in getsentry/sentry-dart#1673 (comment)

Migrate CI from Travis to GitHub Actions

Travis sprung some surprise billing changes on us awhile, so we are now prioritizing removing usage of TravisCI completely. This issue will be used by @getsentry/productivity to track overall progress across the organization, but please let us know here if there's anything we should be aware of.

Remove manual tracing `TraceIdentifier`

When this project was created Sentry didn't have performance monitoring or tracing built in.
So TraceIdentifier was added to propagate the id in outgoing HTTP headers.
Since then (3 years now) Sentry added perf monitoring. And recently tracing works OOTB even without transactions.

  1. Remove TraceIdentifier and other manual propagation.
  2. Validate Android requests send trace id properly (getsentry/sentry-dotnet#2447)

Reduce CLI binary size

Published CLI artifacts are pretty large. They could be significantly reduced by switching to .NET Native AOT.

Error: Error while processing envelope (event ID: xxx).

See logs https://github.com/getsentry/publish/runs/5333817295?check_suite_focus=true

System.NotSupportedException: Serialization and deserialization of 'System.IntPtr' instances are not supported. Path: $.Cancellation.Token.WaitHandle.Handle.
---> System.NotSupportedException: Serialization and deserialization of 'System.IntPtr' instances are not supported.
at System.Text.Json.Serialization.Converters.UnsupportedTypeConverter1.Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack& state, NotSupportedException ex) at System.Text.Json.Serialization.JsonConverter1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter1.WriteCoreAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.JsonSerializer.WriteUsingSerializer[TValue](Utf8JsonWriter writer, TValue& value, JsonTypeInfo jsonTypeInfo) at System.Text.Json.JsonSerializer.Serialize[TValue](Utf8JsonWriter writer, TValue value, JsonSerializerOptions options) at Sentry.Internal.Extensions.JsonExtensions.WriteDynamicValue(Utf8JsonWriter writer, Object value) in /_/src/Sentry/Internal/Extensions/JsonExtensions.cs:line 281 at Sentry.Internal.Extensions.JsonExtensions.WriteDictionaryValue(Utf8JsonWriter writer, IEnumerable1 dic) in //src/Sentry/Internal/Extensions/JsonExtensions.cs:line 101
at Sentry.Contexts.WriteTo(Utf8JsonWriter writer) in /
/src/Sentry/Protocol/Contexts.cs:line 94
at Sentry.Internal.Extensions.JsonExtensions.WriteSerializableValue(Utf8JsonWriter writer, IJsonSerializable value) in //src/Sentry/Internal/Extensions/JsonExtensions.cs:line 215
at Sentry.Internal.Extensions.JsonExtensions.WriteSerializable(Utf8JsonWriter writer, String propertyName, IJsonSerializable value) in /
/src/Sentry/Internal/Extensions/JsonExtensions.cs:line 224
at Sentry.Internal.Extensions.JsonExtensions.WriteSerializableIfNotNull(Utf8JsonWriter writer, String propertyName, IJsonSerializable value) in //src/Sentry/Internal/Extensions/JsonExtensions.cs:line 378
at Sentry.Transaction.WriteTo(Utf8JsonWriter writer) in /
/src/Sentry/Transaction.cs:line 267
at Sentry.Protocol.Envelopes.JsonSerializable.SerializeAsync(Stream stream, CancellationToken cancellationToken) in //src/Sentry/Envelopes/JsonSerializable.cs:line 34
at Sentry.Protocol.Envelopes.JsonSerializable.SerializeAsync(Stream stream, CancellationToken cancellationToken) in /
/src/Sentry/Envelopes/JsonSerializable.cs:line 35
at Sentry.Protocol.Envelopes.EnvelopeItem.BufferPayloadAsync(CancellationToken cancellationToken) in //src/Sentry/Envelopes/EnvelopeItem.cs:line 65
at Sentry.Protocol.Envelopes.EnvelopeItem.SerializeAsync(Stream stream, CancellationToken cancellationToken) in /
/src/Sentry/Envelopes/EnvelopeItem.cs:line 109
at Sentry.Protocol.Envelopes.Envelope.SerializeAsync(Stream stream, CancellationToken cancellationToken) in //src/Sentry/Envelopes/Envelope.cs:line 74
at Sentry.Internal.Http.EnvelopeHttpContent.SerializeToStreamAsync(Stream stream, TransportContext context) in /
/src/Sentry/Internal/Http/EnvelopeHttpContent.cs:line 16
at System.Net.Http.HttpContent.g__WaitAsync|56_0(ValueTask copyTask)
at Sentry.Internal.Http.GzipBufferedRequestBodyHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in //src/Sentry/Internal/Http/GzipBufferedRequestBodyHandler.cs:line 63
at Sentry.Internal.Http.GzipBufferedRequestBodyHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /
/src/Sentry/Internal/Http/GzipBufferedRequestBodyHandler.cs:line 63
at Sentry.Internal.Http.RetryAfterHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in //src/Sentry/Internal/Http/RetryAfterHandler.cs:line 64
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Sentry.Internal.Http.HttpTransport.SendEnvelopeAsync(Envelope envelope, CancellationToken cancellationToken) in /
/src/Sentry/Internal/Http/HttpTransport.cs:line 155
at Sentry.Internal.BackgroundWorker.WorkerAsync() in /_/src/Sentry/Internal/BackgroundWorker.cs:line 131

Collect symbols from Android simulators

Job on schedule that boots the simulators available on GHA and collect their symbols.

This is useful because folks test out Sentry in simulators often. So having a nice experience with proper function names and paths is helpful

Cap number of symlink follow ups

System.IO.IOException: Too many levels of symbolic links
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options)
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at SymbolCollector.Core.Client.<>c__DisplayClass11_0.<<UploadAllPathsAsync>g__SafeGetDirectories|7>d.MoveNext()
   at System.Linq.Enumerable.SelectManyIterator[TSource,TCollection,TResult](IEnumerable`1 source, Func`2 collectionSelector, Func`3 resultSelector)+MoveNext() 
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.GroupedEnumerable`3.GetEnumerator()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at SymbolCollector.Core.Client.UploadAllPathsAsync(String friendlyName, BatchType type, IEnumerable`1 topLevelPaths, CancellationToken cancellationToken)
   at SymbolCollector.Console.ConsoleUploader.StartUploadSymbols(IEnumerable`1 paths, String bundleId, CancellationToken token)
   at SymbolCollector.Console.Program.Run(Args args)
   at SymbolCollector.Console.Program.Main(String upload, String check, String path, String symsorter, String bundleId, String batchType, Boolean dryrun, Uri serverEndpoint)

Xam.Android AOT

Consider using AOT, R8 and other goodies

        <AndroidManagedSymbols>true</AndroidManagedSymbols>
        <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
        <BundleAssemblies>true</BundleAssemblies>
        <AotAssemblies>true</AotAssemblies>
        <AndroidEnableProfiledAot>true</AndroidEnableProfiledAot>
        <AndroidDexTool>d8</AndroidDexTool>
        <AndroidLinkTool>r8</AndroidLinkTool>
        <AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
        <AndroidUseAapt2>true</AndroidUseAapt2>
        <EnableLLVM>true</EnableLLVM>

CLI should respect `batchType`

Take batch type from argument into the client by mapping it into the enum while ignoring the casing.

args.BatchType is available but not passed down:

await uploader.StartUploadSymbols(new[] {args.Path}, args.BundleId, args.Cancellation.Token);

Type is getting auto detected here instead of being taken by parameter and falling back only if not provided:

SymbolCollector.Console fails to run on macOS

Since the .NET 5 upgrade the self contained exectuable for macOS fails to run:

./SymbolCollector.Console
Error:
  An assembly specified in the application dependencies manifest (SymbolCollector.Console.deps.json) was not found:
    package: 'runtimepack.Microsoft.NETCore.App.Runtime.osx-x64', version: '5.0.3'
    path: 'libSystem.IO.Compression.Native.dylib'

Latest version that works is 1.2.1.
Breakage happened when upgrading to .NET 5.0

Run CLI --version after build as a "smoke-test"
Something like:

# Smoke test the native console app is compatible platform:

if macos; then
cli=./publish-osx-x64/SymbolCollector.Console
chmod +x $cli
./$cli

Improvements

  • Upload native symbols through Craft + Symbol Collector (verify: #133)
  • Add second test to relaunch the app on the device in case the first test (symbol upload) crashes (verify: #134)
  • Update craft with latest version
  • Add a transaction to CLI client
  • Bundle sources in pdb and get source context EmbedAllSources (9f382c7)
  • Automatically collect from emulators.
  • Make sure device count and batch end counts match
  • Codecov integration - Show coverage data on stack traces in Sentry
  • getsentry/sentry#43826
  • Make sure all assemblies upload coverage to codecov (only Core is)
  • HEAD request to check for symbol should hit GCS to spare the upload if symbol exists
  • Build local cache of known debug ids
  • Client should batch these check API calls instead of hitting for each file
  • Can we capture crashes?

CLI windows client

It would be nice if there was a GH release artifact with a Windows CLI client. This is a low-prio though because it's easy to use WSL2 instead.

System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update...

Sentry Issue: SYMBOL-COLLECTOR-48

System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
  File "/app/server/src/SymbolCollector.Server/SymbolsController.cs", line 162, in async Task<IActionResult> SymbolsController.IsSymbolMissing(Guid batchId, string unifiedId, string hash, CancellationToken token)
  File "/app/server/src/SymbolCollector.Server/Startup.cs", line 155, in async void Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env)+(?) => { }
...
(12 additional frame(s) were not displayed)

CLI exit code

In case of an error, CLI should return a non-zero exit code so that it can be used in other scripts/programs confidently. Additionally, the error output should be written to stderr, not stdout.

For example, see the following log yet the exit code is still 0:

FINER: 2023-10-12 12:41:00.587642:    info: System.Net.Http.HttpClient.ISymbolClient.ClientHandler[100]
FINER: 2023-10-12 12:41:00.587722:          Sending HTTP request POST https://symbol-collector.service/symbol/batch/77816c1a-37f1-4286-af6c-ba4b7fb3e3be/start
FINER: 2023-10-12 12:41:01.658841:
FINER: 2023-10-12 12:41:01.658922:    Started at:
FINER: 2023-10-12 12:41:01.662217:    10/12/2023 12:40:38 PM +02:00
FINER: 2023-10-12 12:41:01.662285:    Ran for:				00:00:23.3245737
FINER: 2023-10-12 12:41:01.662307:    File Processed:				0
FINER: 2023-10-12 12:41:01.662320:    File or Directory Unauthorized		0
FINER: 2023-10-12 12:41:01.662330:    Directory DoesNotExist:			0
FINER: 2023-10-12 12:41:01.662340:    File DoesNotExist:			0
FINER: 2023-10-12 12:41:01.662350:    Job in flight:				0
FINER: 2023-10-12 12:41:01.662359:    Failed to upload:			0
FINER: 2023-10-12 12:41:01.662368:    Successfully uploaded:			0
FINER: 2023-10-12 12:41:01.662376:    Already existed:			0
FINER: 2023-10-12 12:41:01.662385:    Uploaded bytes:				0 Bytes
FINER: 2023-10-12 12:41:01.662394:    ELF files loaded:			0
FINER: 2023-10-12 12:41:01.662403:    Mach-O files loaded:			0
FINER: 2023-10-12 12:41:01.662412:    Fat Mach-O files loaded:		0
FINER: 2023-10-12 12:41:01.669709:    System.Net.Http.HttpRequestException: Name or service not known (symbol-collector.service:443)
FINER: 2023-10-12 12:41:01.669839:     ---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known
FINER: 2023-10-12 12:41:01.669865:       at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.669879:       at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
FINER: 2023-10-12 12:41:01.669891:       at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.669901:       at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.669912:       --- End of inner exception stack trace ---
FINER: 2023-10-12 12:41:01.669923:       at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.669934:       at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.669942:       at System.Net.Http.HttpConnectionPool.AddHttp2ConnectionAsync(QueueItem queueItem)
FINER: 2023-10-12 12:41:01.669951:       at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.669960:       at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
FINER: 2023-10-12 12:41:01.669970:       at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.669979:       at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.669990:       at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.670001:       at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.670012:       at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)
FINER: 2023-10-12 12:41:01.670021:       at Polly.AsyncPolicy`1.ExecuteAsync(Func`3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)
FINER: 2023-10-12 12:41:01.670032:       at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.670136:       at Sentry.SentryMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.670214:       at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.670245:       at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
FINER: 2023-10-12 12:41:01.670259:       at SymbolCollector.Core.SymbolClient.Start(String friendlyName, BatchType batchType, CancellationToken token)
FINER: 2023-10-12 12:41:01.670272:       at SymbolCollector.Core.Client.UploadAllPathsAsync(String friendlyName, BatchType type, IEnumerable`1 topLevelPaths, CancellationToken cancellationToken)
FINER: 2023-10-12 12:41:01.670282:       at SymbolCollector.Console.ConsoleUploader.StartUploadSymbols(IEnumerable`1 paths, String bundleId, Nullable`1 batchType, CancellationToken token)
FINER: 2023-10-12 12:41:01.670292:       at SymbolCollector.Console.Program.Run(IHost host, Args args)
FINER: 2023-10-12 12:41:01.670302:       at SymbolCollector.Console.Program.Main(String upload, String check, String path, String symsorter, String bundleId, String batchType, Boolean dryrun, Uri serverEndpoint)

The relevant code is here:

catch (Exception e)
{
WriteLine(e);
// if rethrown, System.CommandLine.DragonFruit will capture handle instead of piping to AppDomain
e.Data[Mechanism.HandledKey] = false;
e.Data[Mechanism.MechanismKey] = "Main.UnhandledException";
SentrySdk.CaptureException(e);
}

Symbol upload

Currently the artifacts produced in CI are not being used in production for the backend and mobile apps. Only the CLI is.
The docker build doesn't have the org/proj/auth values needed so msbuild triggers upload.
And the mobile app is being built cleanly through run.sh when scheduling the job at the device farm.

Change:

  • Get the Docker to pull the compiled artifact in CI. That means the Cloud Build needs to wait for CI to complete (or the Dockerfile need to be polling for the artifact at the commit SHA until ready. Or build the docker imagine in GHA and get into google cloud repository (bypass cloud build)
  • Schedule the run based on the pre-built mobile app in CI. Or make sure symbols are uploaded when running run.sh (set the props locally when running)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.