Skip to content

[INSD-8271] Fix Network Requests Logging on iOS #280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 1, 2022

Conversation

DavidMina96
Copy link
Contributor

Description of the change

Problem

The below error message is logged, and network requests aren't captured on iOS:
“[Instabug] - IBGCore: Error requestHeaders values should be of type string not __NSArrayM”.

This is due to some checks recently added in the native iOS SDK, expecting the request and response headers to be a dictionary of String key-value pairs while we allow dynamic values.

Solution

Stringify the values in requestHeaders and responseHeaders maps before passing the network data params to the native SDK.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Issue links go here

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests

Code review

  • This pull request has a descriptive title and information useful to a reviewer
  • Issue from task tracker has a link to this pull request

TheBuggedYRN
TheBuggedYRN previously approved these changes Oct 20, 2022
a7medev
a7medev previously approved these changes Nov 1, 2022
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Merging #280 (1aa6818) into master (925b493) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #280      +/-   ##
==========================================
+ Coverage   81.74%   81.84%   +0.09%     
==========================================
  Files          17       17              
  Lines         367      369       +2     
==========================================
+ Hits          300      302       +2     
  Misses         67       67              
Impacted Files Coverage Δ
lib/src/models/network_data.dart 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@DavidMina96 DavidMina96 dismissed stale reviews from a7medev and TheBuggedYRN via 1aa6818 November 1, 2022 12:01
@ymabdallah ymabdallah merged commit dfd7e52 into master Nov 1, 2022
@ymabdallah ymabdallah deleted the fix/network-requests-not-logged-iOS branch November 1, 2022 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants