bugsnag-maze-runner 9.17.0 → 9.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9030ac2f7abdbeae92dd93722ea67c366d12b3eca63e4d4a83e63aead8487a7
4
- data.tar.gz: 1b1e1932f4f1d6a33b63093ea5c26f745041593fe0515ddd987b2cb11abe5554
3
+ metadata.gz: c6c149e156ab34e2716d12ea70903fe9731d9806cf96c7a1bb6505fef007d97b
4
+ data.tar.gz: 1152cb99ceeb9cf8882d43b931655cb0ba9abf20baac77770e6c98a5b53fd78b
5
5
  SHA512:
6
- metadata.gz: 71739fc49bb2d280db6ffeb330e29aa33ebd77c47ac055edb2434f4ad6a24159772ba2e83182de94ce32db323ca3e9dc2e810eb4edb96128d1fb66d875f39204
7
- data.tar.gz: e6203434b23df13a7aa4d984f3b693d44163249a689db391c1aae7a0a5ca8c3a2eb215a12434d959879c6f1e4785f8381147d2ea44872ab576371b563ee9cd0a
6
+ metadata.gz: b2f057457f5d2e9c51c8b7509ab276ca34ddbd7510e8821af07e89b58ea8b519e556f3ae5c15abfb16f20ca0e44e3dafa9861680edbc079e82bde903610dc3eb
7
+ data.tar.gz: 10f760389cd942ffc3c7b5116feefdd2f0dbf00f7abcbd7f03927f794e7d5b4ce3f2656fe9f04226be5faa7f60f862817838c77f86a0abf37272b5b386c9ccd7
@@ -166,6 +166,7 @@ After do |scenario|
166
166
  output_received_requests('traces')
167
167
  output_received_requests('builds')
168
168
  output_received_requests('logs')
169
+ output_received_requests('ignored requests')
169
170
  output_received_requests('invalid requests')
170
171
  end
171
172
 
@@ -13,7 +13,7 @@ module Maze
13
13
  path = output_folder
14
14
  FileUtils.makedirs(path)
15
15
 
16
- request_types = %w[errors sessions builds uploads logs sourcemaps traces invalid reflections]
16
+ request_types = %w[errors sessions builds uploads logs sourcemaps traces ignored invalid reflections]
17
17
  request_types << 'sampling requests'
18
18
 
19
19
  request_types.each do |request_type|
data/lib/maze/server.rb CHANGED
@@ -101,6 +101,8 @@ module Maze
101
101
  sourcemaps
102
102
  when 'reflect', 'reflects', 'reflection', 'reflections'
103
103
  reflections
104
+ when 'ignored', 'ignored requests'
105
+ ignored_requests
104
106
  when 'invalid', 'invalid requests'
105
107
  invalid_requests
106
108
  else
@@ -186,6 +188,10 @@ module Maze
186
188
  @commands ||= RequestList.new
187
189
  end
188
190
 
191
+ def ignored_requests
192
+ @ignored_requests ||= RequestList.new
193
+ end
194
+
189
195
  # Whether the server thread is running
190
196
  # An array of any invalid requests received.
191
197
  # Each request is hash consisting of:
@@ -297,6 +303,7 @@ module Maze
297
303
  sampling_requests.clear
298
304
  traces.clear
299
305
  logs.clear
306
+ ignored_requests.clear
300
307
  invalid_requests.clear
301
308
  reflections.clear
302
309
  end
@@ -159,7 +159,25 @@ module Maze
159
159
  private
160
160
 
161
161
  def add_request(request)
162
- Server.list_for(@request_type).add(request)
162
+ if @request_type == :errors and system_generated_anr?(request)
163
+ $logger.info 'Ignoring system-generated ANR'
164
+ Server.list_for('ignored').add(request)
165
+ else
166
+ Server.list_for(@request_type).add(request)
167
+ end
168
+ end
169
+
170
+ def system_generated_anr?(request)
171
+ body = request[:body]
172
+ error_class = Maze::Helper.read_key_path(body, 'events.0.exceptions.0.errorClass')
173
+ return false unless error_class == 'ANR'
174
+
175
+ stack_trace = Maze::Helper.read_key_path(body, 'events.0.exceptions.0.stacktrace')
176
+ return false unless stack_trace.kind_of?(Array)
177
+
178
+ method_1 = stack_trace.any? { |frame| frame['method'] == 'android.os.BinderProxy.transact' }
179
+ method_2 = stack_trace.any? { |frame| frame['method'] == 'android.app.IActivityManager$Stub$Proxy.handleApplicationCrash' }
180
+ method_1 && method_2
163
181
  end
164
182
 
165
183
  def log_request(request)
data/lib/maze.rb CHANGED
@@ -7,7 +7,7 @@ require_relative 'maze/timers'
7
7
  # Glues the various parts of MazeRunner together that need to be accessed globally,
8
8
  # providing an alternative to the proliferation of global variables or singletons.
9
9
  module Maze
10
- VERSION = '9.17.0'
10
+ VERSION = '9.18.0'
11
11
 
12
12
  class << self
13
13
  attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag-maze-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.17.0
4
+ version: 9.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Kirkland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-06 00:00:00.000000000 Z
11
+ date: 2024-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber