Code Monkey home page Code Monkey logo

scyther's People

Contributors

bstillitano avatar danielmoi avatar pejato avatar stfnhdr 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  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  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

Watchers

 avatar

scyther's Issues

[BUG] NetworkLoggerViewController.prepareObjects gets called from background thread

Describe the bug

NetworkLoggerViewController.prepareObjects is sometimes called off the main thread. This is an issue because it also touches a UISearchController off the main thread.

To Reproduce
Interact with the search bar while the app being monitored is performing network requests. It's easier to reproduce if there are many concurrent requests.

Expected behaviour
This function is only called on the main thread because it reads from UI objects.

Screenshots
Screen Shot 2021-10-25 at 5 52 57 PM

Environment (please complete the following information):

  • Device: iPhone 8
  • OS: iOS 15.0
  • Feature N/A
  • Version 1.1.1

Additional context
This is happening because the network requests that post the notification don't post on the main thread.

[WORKAROUND] WebSockets failing to connect when using Scyther

Foreword

In a recent project, I had to implement web sockets for some chat functionality that I was working on. As part of this, it became apparent that web sockets were simply failing to connect, with an error message that looked like Connection not set before response is received, failing task.

Hypothesis

The reason here is that Scyther injects a class protocol into all URLSessionConfiguration instances in order to power the network logging functionality. This, in-turn, triggers an internal mechanism that fires a response, BEFORE the socket has had time to connect. Doing so, again internally, triggers an internal failure on the socket and aborts the connection process.

Solution

In order to get around this, Scyther has added a static initialiser to the URLSessionConfiguration class which allows you to pass in an identifier for default configurations, noting specifically that web sockets can not be run on background configurations. This configuration looks for String.noSwizzle, which resolves internally to do_not_swizzle, in ANY PART of the identifier. If this string is present it will not swizzle the configuration and the socket will run as normal.

Examples

An example implementation looks like this:

URLSessionConfiguration.default(withIdentifier: "\(String.noSwizzle)_\(UUID().uuidString)")

Future Plans

Whilst this implementation is robust enough to be a long term solution, I do see some utility in potentially logging web sockets. Until I can test a solution I have in the works across all scenarios and ensure that it won't break anything that is, as yet, undiscovered, this will remain the solution.

Release

The release which introduces this functionality can be found here:
https://github.com/bstillitano/Scyther/releases/tag/1.3.3

SOLVED - [BUG] View frames/borders not working as expected

Describe the bug
There is a known bug that causes all borders to render in either black or white (depending on dark mode). This issue does not affect production versions of the app, provided that Scyther is run only on non app store builds, as recommended in the README.

Additional context
This issue is being actively looked into and will be fixed when time permits.

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.