atlantis
atlantis copied to clipboard
Atlantis crashes on Simulator iPhone 15 Pro Max (17.0)
Xcode 15.2
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Codes: 0x0000000000000001, 0x0000000000000008
VM Region Info: 0x8 is not in any region. Bytes before following region: 4370874360
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 104864000-10487c000 [ 96K] r-x/r-x SM=COW ... App DEV
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [69420]
Thread 3 Crashed:: Dispatch queue: com.apple.NSURLSession-delegate 0 libobjc.A.dylib 0x18005aad0 objc_object::sidetable_clearDeallocating() + 128 1 Atlantis 0x108690454 thunk for @escaping @callee_guaranteed (@guaranteed NSObject?, @guaranteed NSError?) -> () + 80 2 libdispatch.dylib 0x10a2e40f0 _dispatch_call_block_and_release + 24 3 libdispatch.dylib 0x10a2e593c _dispatch_client_callout + 16 4 libdispatch.dylib 0x10a2edbd8 _dispatch_lane_serial_drain + 916 5 libdispatch.dylib 0x10a2ee91c _dispatch_lane_invoke + 420 6 libdispatch.dylib 0x10a2fb2f8 _dispatch_root_queue_drain_deferred_wlh + 324 7 libdispatch.dylib 0x10a2fa754 _dispatch_workloop_worker_thread + 488 8 libsystem_pthread.dylib 0x1092b3924 _pthread_wqthread + 284 9 libsystem_pthread.dylib 0x1092b26e4 start_wqthread + 8
when it's crashing:
- Please click on the current thread from Xcode
- It will show the crashed line in Atlantis
- Please share it with me
I'd like to investigate it
@NghiaTranUIT here you go (AtlantisHelper::swizzleWebSocketReceiveMessage(
withCompleteHandler handler: AnyObject,
responseHandler: ((String?, Data?, Error?) -> Void)?)
@DarkSatyr I suggest updating Atlantis to the latest version:
Use this code to ignore the Websocket:
Atlantis.start(hostName: "<Your host name>", shouldCaptureWebSocketTraffic: false)
May I ask if you're using Intercom library 🤔 ?
Ref: https://github.com/ProxymanApp/atlantis/issues/134#issuecomment-1803057604
@NghiaTranUIT I'm using 1 week old Atlantis version, and yes Intercom lib is 1 of my dependencies Actually, about web sockets, this was my main intention to use Atlantis framework to log web socket events because Proxyman don't capture those events (we use Kotlin multiplatform lib for api with Ktor for web sockets and REST). If it's possible to intercept such events than I can use only Proxyman app
we use Kotlin multiplatform lib for api with Ktor for web sockets and REST
It means Atlantis can't capture REST traffic because it's not from URLSession, which is Apple's network lib.
You should follow this doc: https://ktor.io/docs/proxy.html to config HTTP Proxy to ktor
lib.
IP = localhost
Port = 9090
Then, Proxyman can capture its traffic 👍
@NghiaTranUIT actually it captures REST from Ktor (with localhost:9090) but it doesn't capture web sockets inside kmp lib from ktor
@DarkSatyr it's understandable because Atlantis framework only captures WS/WSS, which is called from URLWebsocketSessionTask (again, it's from Apple framework). I suppose that Ktor uses a different lib, so Proxyman can't.
May I ask: What engine do you use from Ktor (https://ktor.io/docs/proxy.html)? I suppose that we can override SOCKS Proxy on Ktor, to point to Proxyman SOCKS (In Tool menu -> Proxy Setting -> SOCKS Proxy). Websocket often uses SOCKS Proxy.