bugsnag-maze-runner 9.17.0 → 9.18.1

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: 1bf3a12cf3a22fdf973e3fd8ac7880475395ab7cd6a449b7c7484ef9f6b9f1a0
4
+ data.tar.gz: 492d5ed9de4b7203253d641244c84f45f7e571ea4114e9059f608af179e64622
5
5
  SHA512:
6
- metadata.gz: 71739fc49bb2d280db6ffeb330e29aa33ebd77c47ac055edb2434f4ad6a24159772ba2e83182de94ce32db323ca3e9dc2e810eb4edb96128d1fb66d875f39204
7
- data.tar.gz: e6203434b23df13a7aa4d984f3b693d44163249a689db391c1aae7a0a5ca8c3a2eb215a12434d959879c6f1e4785f8381147d2ea44872ab576371b563ee9cd0a
6
+ metadata.gz: 50c855d588fa42abc11d7547a09ea3994c7d2da56873f62dfea3654a38841a6f67c4e47453f5cc51fbf98a8918187a1efe46ca6d89f987daf11eb8dc49355744
7
+ data.tar.gz: b2280139bc8e8ccf867c9c655d386f3be1d30990aa4ed392e343170338a2b95f173b6ae742ce513f5449d8d81e3a4d214101ce605b36c10a913f7e8aff5ea9a3
@@ -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.1'
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.1
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-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.7.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: uri
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.13.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.13.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: appium_lib
85
99
  requirement: !ruby/object:Gem::Requirement