[GH-ISSUE #84] Should find a previous WS Package! #57

Open
opened 2026-03-03 19:11:24 +03:00 by kerem · 10 comments
Owner

Originally created by @khoogheem on GitHub (Sep 9, 2021).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/84

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? 2.32.1 (23210)

macOS Version? 11.4

Steps to reproduce

when proxyman is not running... I get these issue:

Fatal error: Something went wrong! Should find a previous WS Package! Please contact the author!: file Atlantis/Atlantis.swift, line 358

Originally created by @khoogheem on GitHub (Sep 9, 2021). Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/84 Originally assigned to: @NghiaTranUIT on GitHub. Proxyman version? 2.32.1 (23210) macOS Version? 11.4 Steps to reproduce when proxyman is not running... I get these issue: Fatal error: Something went wrong! Should find a previous WS Package! Please contact the author!: file Atlantis/Atlantis.swift, line 358
Author
Owner

@kjoe07 commented on GitHub (Feb 1, 2022):

got this same crash any news on it

<!-- gh-comment-id:1026335964 --> @kjoe07 commented on GitHub (Feb 1, 2022): got this same crash any news on it
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 1, 2022):

@kjoe07 Just wondering: Which Atlantis version and your iOS version are you using? I could not reproduce this issue in the last time and I'd like to investigate it again 👍

<!-- gh-comment-id:1026403773 --> @NghiaTranUIT commented on GitHub (Feb 1, 2022): @kjoe07 Just wondering: Which Atlantis version and your iOS version are you using? I could not reproduce this issue in the last time and I'd like to investigate it again 👍
Author
Owner

@kjoe07 commented on GitHub (Feb 1, 2022):

iOS 15.3 Xcode 13.2.1 macOS Monterrey proxyMan latest version, Install with swift package manager using urlSession for sockets, chafed to 1.14.0 and 1.9.0 and got the same error every time also have amplify as dependency and guess is using starscream

<!-- gh-comment-id:1026418133 --> @kjoe07 commented on GitHub (Feb 1, 2022): iOS 15.3 Xcode 13.2.1 macOS Monterrey proxyMan latest version, Install with swift package manager using urlSession for sockets, chafed to 1.14.0 and 1.9.0 and got the same error every time also have amplify as dependency and guess is using starscream
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 1, 2022):

@kjoe07 if you're using Starscream to perform the Websocket, do you use NativeEngine by setting useCustomEngine: false?

for example:

let ws = Websocket(request: myRequest, useCustomEngine: false)

Ref: github.com/daltoniam/Starscream@c68359159d/Sources/Starscream/WebSocket.swift (L118)


It's because, by default, Starscream would use TCPTransport rather than URLSessionWebsocketTask behind the hood. On the other hand, Atlantis only supports URLSessionWebsocketTask.

<!-- gh-comment-id:1026450871 --> @NghiaTranUIT commented on GitHub (Feb 1, 2022): @kjoe07 if you're using Starscream to perform the Websocket, do you use `NativeEngine` by setting `useCustomEngine: false`? for example: ```swift let ws = Websocket(request: myRequest, useCustomEngine: false) ``` Ref: https://github.com/daltoniam/Starscream/blob/c68359159dcf0b5de9b536b9a959e9e435e968d3/Sources/Starscream/WebSocket.swift#L118 ------------ It's because, by default, Starscream would use TCPTransport rather than URLSessionWebsocketTask behind the hood. On the other hand, Atlantis only supports `URLSessionWebsocketTask`.
Author
Owner

@kjoe07 commented on GitHub (Feb 1, 2022):

I now I don't use start scream it's a dependency for amplify not for my app my sockets connections are handle with url session

<!-- gh-comment-id:1026495832 --> @kjoe07 commented on GitHub (Feb 1, 2022): I now I don't use start scream it's a dependency for amplify not for my app my sockets connections are handle with url session
Author
Owner

@VaslD commented on GitHub (Apr 11, 2023):

@NghiaTranUIT I've also encountered this. Does Atlantis support initialization elsewhere other than AppDelegate?

I wrapped Atlantis in a toggle switch in app settings. If a WS connection was mid-flight and I then enabled Atlantis (setup with no specific host), this crash would very likely be triggered.

<!-- gh-comment-id:1502881164 --> @VaslD commented on GitHub (Apr 11, 2023): @NghiaTranUIT I've also encountered this. Does Atlantis support initialization elsewhere other than AppDelegate? I wrapped Atlantis in a toggle switch in app settings. If a WS connection was mid-flight and I then enabled Atlantis (setup with no specific host), this crash would very likely be triggered.
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 11, 2023):

Technically, you can initialize the Atlantis framework anywhere in the app, not just AppDelegate.

When the app is crashed, can you take a screenshot where the crash occurs?

<!-- gh-comment-id:1502883893 --> @NghiaTranUIT commented on GitHub (Apr 11, 2023): Technically, you can initialize the Atlantis framework anywhere in the app, not just AppDelegate. When the app is crashed, can you take a screenshot where the crash occurs?
Author
Owner

@vani2 commented on GitHub (Apr 21, 2023):

Screenshot 2023-04-21 at 15 23 20

It happens when I manually try to cancel URLSessionWebSocketTask with .normalClosure.

<!-- gh-comment-id:1518390134 --> @vani2 commented on GitHub (Apr 21, 2023): <img width="1440" alt="Screenshot 2023-04-21 at 15 23 20" src="https://user-images.githubusercontent.com/4734983/233743417-50112910-4834-416f-8119-09f723e452fb.png"> It happens when I manually try to cancel `URLSessionWebSocketTask` with `.normalClosure`.
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 22, 2023):

@vani2 Thanks. I will look on it today 👍

<!-- gh-comment-id:1518454516 --> @NghiaTranUIT commented on GitHub (Apr 22, 2023): @vani2 Thanks. I will look on it today 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 22, 2023):

@vani2 let's update to Atlantis 1.21.1, it should fix the crash 👍

<!-- gh-comment-id:1518462526 --> @NghiaTranUIT commented on GitHub (Apr 22, 2023): @vani2 let's update to Atlantis [1.21.1](https://github.com/ProxymanApp/atlantis/releases/tag/1.21.1), it should fix the crash 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/atlantis#57
No description provided.