Skip to content
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

In iOS how to force cancel the live preview and while capturing #92

Open
ManojAtamai opened this issue Oct 23, 2024 · 6 comments
Open

Comments

@ManojAtamai
Copy link

While live previewing or capturing, if the Ricoh Theta connection is lost, the catch blocks for the corresponding methods are not being triggered in iOS. I am using the same code you provided in the example project.

I would like to know if it’s possible to forcefully cancel actions such as getting device info, live preview, or capturing when the connection is lost

@ManojAtamai ManojAtamai changed the title In iOS how to force cancel the the live preview and while capturing In iOS how to force cancel the live preview and while capturing Oct 23, 2024
@codetricity
Copy link

@ManojAtamai it's fixed in 1.11.0, correct?

https://github.com/ricohapi/theta-client/releases/tag/1.11.0

@ManojAtamai
Copy link
Author

ManojAtamai commented Nov 4, 2024

On the native iOS platform, while Theta is in preview or capture state, if the connection is lost, the catch blocks are not being called, even after waiting for more than 10 to 15 seconds.

I would also like to know how to cancel an ongoing task, such as getting device info, previewing, or capturing.

@codetricity
Copy link

Isn't the live preview error firing fixed in 1.11.0?

image

Note that

  • I don't work for RICOH. I'm a guy in the community
  • I haven't tried this myself, but I am interested in the status

@ManojAtamai
Copy link
Author

ManojAtamai commented Nov 5, 2024

Hi @codetricity To answer your question regarding the live preview error, I am currently using version 1.10.2. I need to upgrade to a newer version and check if the error persists. Additionally, could you please address the issue while capturing and obtaining device information, as well as implement a force cancellation when retrieving device information, during live preview, and while capturing? Thank you.

@codetricity
Copy link

@ManojAtamai

Additionally, could you please address the issue while capturing and obtaining device information, as well as implement a force cancellation when retrieving device information, during live preview, and while capturing? Thank you.

Just an FYI that I don't work for RICOH and I'm not doing development on theta-client. Like you, I'm using theta-client. I'm following this thread to see how you address the issues listed above. Thanks.

@ManojAtamai
Copy link
Author

ManojAtamai commented Jan 8, 2025

@simago @codetricity
I tested the demo iOS example (https://github.com/ricohapi/theta-client/tree/main/demos/demo-ios) using SDK version 1.11.1 with the Ricoh Theta SC2 (firmware version 1.90), and found the following observations:

Live Preview: When the connection to the Ricoh Theta is lost during live preview, the catch block for the live preview takes 70 to 80 seconds to respond, which is a long duration. The error is as follows:
Error Domain=KotlinException Code=0 "kotlin.IllegalStateException: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80)."
UserInfo={NSLocalizedDescription=kotlin.IllegalStateException: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80)., KotlinException=com.ricoh360.thetaclient.ThetaRepository.NotConnectedException: kotlin.IllegalStateException: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80)., KotlinExceptionOrigin=}

Picture Capture (iPhone 12 Pro Max, OS version 17.3.1): When the connection to Theta is lost during picture capture, it takes 2 to 5 seconds and returns the following error:
Error Domain=KotlinException Code=0 "ECONNRESET (54): Connection reset by peer"
UserInfo={NSLocalizedDescription=ECONNRESET (54): Connection reset by peer, KotlinException=com.ricoh360.thetaclient.ThetaRepository.NotConnectedException: ECONNRESET (54): Connection reset by peer, KotlinExceptionOrigin=}

Picture Capture (iPhone XR, OS version 18.1.1): When the connection to Theta is lost during picture capture, it takes 20 seconds and returns the following error:
Error Domain=KotlinException Code=0 "Timed out waiting for 20000 ms"
UserInfo={NSLocalizedDescription=Timed out waiting for 20000 ms, KotlinException=com.ricoh360.thetaclient.ThetaRepository.NotConnectedException: Timed out waiting for 20000 ms, KotlinExceptionOrigin=}
HttpClient: REQUEST http://192.168.1.1/osc/state failed with exception: kotlin.IllegalStateException: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80)

Could you please address the issue where the Theta connection loss during live preview takes longer to return the error (70-80 seconds)? Additionally, while capturing, the response time is inconsistent—one device (iPhone 12 Pro Max) is quick, while another device (iPhone XR) takes 20 seconds

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

No branches or pull requests

2 participants