-
Notifications
You must be signed in to change notification settings - Fork 4
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
Crash in ConnectionHandler.connect() Method of nats.swift file resuming the app from the background or in Idle for random time #86
Comments
Hello @MayankMintoak, thank you for reporting the issue. I have a few questions:
func sceneDidBecomeActive(_ scene: UIScene) {
Task {
try await natsClient?.resume()
print("resumed")
}
}
func sceneWillResignActive(_ scene: UIScene) {
Task {
try await natsClient?.suspend()
print("suspended")
}
}
|
Hi Team,
Please find below the attached crash report.
…On Thu, Oct 31, 2024 at 4:49 PM Piotr Piotrowski ***@***.***> wrote:
Hello @MayankMintoak <https://github.com/MayankMintoak>, thank you for
reporting the issue. I have a few questions:
1. Could you provide the crash report? That would make it easier for
us to reproduce.
2. Are you suspending and resuming connection when putting the app in
background? You can do it in SceneDelegate so that the app does not
heep the connection alive when in background:
func sceneDidBecomeActive(_ scene: UIScene) {
Task {
try await natsClient?.resume()
print("resumed")
}
}
func sceneWillResignActive(_ scene: UIScene) {
Task {
try await natsClient?.suspend()
print("suspended")
}
}
3. What do you mean by "unspecified period of time"? Are there e.g.
nats server restarts during this period or any reconnection attempts?
—
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLU4WQP4F5C5OQGDDOQNEJ3Z6IG5JAVCNFSM6AAAAABO7FQPZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBZGYYTIMZSGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I do not see the crash report. Please check if it happens with latest release 0.4 - it contains a lot of improvements. |
Hi Team,
Below are the attached crashes that we found in our App. Please go through
the crash report once.
We will try the new version as well.
…On Mon, Nov 11, 2024 at 1:27 PM Tomasz Pietrek ***@***.***> wrote:
I do not see the crash report.
Please check if it happens with latest release 0.4 - it contains a lot of
improvements.
—
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLU4WQLLABICJWEQWUJQGDT2ABPOVAVCNFSM6AAAAABO7FQPZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRXGQ3DINRQGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I do not think you are attaching the crash report. |
Hi Team,
I have already attached the zip file in the previous mail chain. please
check. Find the screenshot.
[image: Screenshot 2024-11-11 at 7.26.10 PM.png]
…On Mon, Nov 11, 2024 at 7:05 PM Tomasz Pietrek ***@***.***> wrote:
I do not think you are attaching the crash report.
—
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLU4WQKDIZ6GJDBMWV4GFS32ACXCRAVCNFSM6AAAAABO7FQPZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRYGE4TMOJRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Please try doing it through github.com, not via mail, as neither the report nor the screenshot is attached correctly. |
Hello @Jarema Please find attached zip file that contains the crash logs. |
Observed behavior
Description: The app crashes in the ConnectionHandler.connect() method of nats.swift when the app is either idle for an extended random period or has been moved to the background. Upon resuming or interacting with the app after this idle period, the app crashes, and the crash report points to the connect() method in nats.swift.
Crash Details:
File: nats.swift
Method: ConnectionHandler.connect()
Line: Occurs during reconnection attempt (as seen in the attached screenshot).
Observed Behavior:
The app crashes and navigates to the ConnectionHandler.connect() method in the nats.swift file.
Expected behavior
The connection handler should gracefully handle reconnections or retries without crashing, even after idle or background sessions.
Server and client version
0.3.0
Host environment
No response
Steps to reproduce
Steps to Reproduce:
Open the app.
Let the app remain idle for an unspecified period of time (can vary randomly).
Alternatively, put the app in the background after it is connected.
After the idle period or when resuming the app from the background, try interacting with the app.
The app crashes, and the crash report indicates the ConnectionHandler.connect() method in nats.swift.
The text was updated successfully, but these errors were encountered: