NSURLErrorDomain when try to connect to camera using API v. 2.1

Test Environment

  • iOS physical device for me with an iPhone 13 Pro running iOS version 17.5.1
  • theta-client 1.10.0
  • WiFi enabled
  • THETA X firmware 2.50.2

Test #1: Testing theta-client App on iOS - Access Point Mode

After the initial build on the physical device with XCode, the theta-client app loaded as expected.

The iPhone and THETA X are only separated by a meter. Pressing the ‘Take a Photo’ button on the device with the WiFi connected to the THETA X camera, worked appropriately. The log outputted the warnings shown below, but it didn’t interfere with the app’s functionality.

Test #2: Testing the Internet Connection with iPhone WiFi Connected to Router

While the app was running, I disconnected the mobile device from the THETA X’s WiFi and reconnected my device to a router. Now, the log outputted the failed to connect error. I received a series of Connection errors when trying to take a picture as shown below. I replicated this procedure and got the same output.


Test #3: Testing the Internet Connection with iPhone WiFi Disabled

I disabled the iPhone WiFi and received the same Connection output displayed above in the screenshots.

Test #4: Turning off the THETA X WiFi

Turning off the THETA X WiFi also outputs the failed to connect error.

Tests #5, #6, #7: Placing the THETA X camera at Varying Distances

We placed the THETA X camera at varying distances and on the other side of a wall to replicate an unstable WiFi connection with dropped packets. Distance from THETA X were as follows:

  • test #5: 10 meters
  • test #6: 20 meters
  • test #7: 30 meters

The live preview function to take photos didn’t always appear and the camera appeared to take a longer time to capture the image, suggesting that the HTTP data needed to be resent from the iPhone to the camera. Nonetheless, the app was still able to take photos without a critical error.

Conclusion

We were not able to replicate the NSURLErrorDomain error. There is no obvious situation where the NSURLErrorDomain error appears. A lost connection did not cause the error in my test. Additionally, an unstable connection where the motionjpeg frames from livePreview were dropped, did not cause the error.

1 Like

@craig iOS version 17.4.1 and device is iPhone 14.

@Anjali_Nirmale Do you see the test here by @caitlyn ? She was not able to replicate the problem.

Do you see anything different in her workflow?

Are the errors still just intermittent for you?

@jcasman another developer had the same problem. Let’s put this information from Anjali on the agenda for the meeting we have with our contact at RICOH.

In a previous post, she listed the following camera information.

Firmware Version:2.51.0
Manufacturer: Ricoh Company, Ltd.
Model: RICOH THETA X

Got it. It’s in the agenda for tomorrow.

The RICOH THETA camera is unable to use https. The error may not be coming from the THETA.

Is it possible that the mobile is connecting to an Internet router or another device at 192.168.1.1?

Maybe the phone is losing connection to the camera and then reconnecting?

Is your mobile phone connected to any other device at any point in your workflow?

1 Like

no my mobile phone is not connecting to any other device at any point…

Do you think there is a router in the area that your mobile phone is connecting to temporarily? The THETA can’t handle https, so the error with the https response is not coming from the THETA.

What library are you using to send the http requests?

If you disconnect the THETA and the iPhone and then run info, does this error come up?

The Internet connection appears to be offline., 
    NSErrorFailingURLStringKey=http://192.168.1.1/osc/i

Maybe this is just the error that is shown from the library when the library cannot reach the network endpoint? We can try and use the same iOS library and see if we can replicate the error.

I spoke to a contact at RICOH about this and they cannot replicate the error either.

Hi @craig @jcasman @caitlyn,
We also still experience the same issue for some our clients.

I have a question regarding info.plist.
In Ricoh demo project in info.plist I see keys “NSTemporaryExceptionAllowsInsecureHTTPLoads” and “NSTemporaryExceptionRequiresForwardSecrecy”. But at the same time I can’t find any official apple documentation about these keys. There is documentation only about keys NSExceptionAllowsInsecureHTTPLoads and NSExceptionRequiresForwardSecrecy.

In our app we use keys like in demo app, so maybe we have to change these keys to NSExceptionAllowsInsecureHTTPLoads and NSExceptionRequiresForwardSecrecy?
It would be also great if you could provide us the info.plist from real Theta app, but not from demo app, maybe they have there some other keys that could fix this issue?

@Mikhail thank you for your note.

As RICOH is a large company with different groups, let’s try to work in parallel.

One communication path is if you can open an issue on GitHub for theta-client with this same question.

In parallel, I will add it to an agenda for a meeting we have with a RICOH manager for community feedback.

@Craig I have already opened an issue on GitHub but no response.

I think there may be new info

“NSTemporaryExceptionAllowsInsecureHTTPLoads” and “NSTemporaryExceptionRequiresForwardSecrecy”

are not in the Apple documentation. Maybe that could be pointed out in a comment below the issue?

Additionally, it may be easier to get information from the RICOH360 App instead of the RICOH THETA app.

I wonder if we could test the RICOH360 App in addition to the RICOH THETA app?

Hi @craig, thank you for your quick response.
I’ve just created the issue with this question iOS demo SDK. There are keys in SdkSample in info.plist that are not described in official apple documentation. · Issue #95 · ricohapi/theta-client · GitHub

I wonder if we could test the RICOH360 App in addition to the RICOH THETA app?

Could you please clarify which exactly app you mean? Could you send link to the AppStore?

The RICOH360:THETA Capture App appears to be under active development.

New comment in GitHub issue posted by RICOH engineer points to article called Working with Apple’s App Transport Security that explains about NSExceptionAllowsInsecureHTTPLoads and NSTemporaryExceptionAllowsInsecureHTTPLoads .

Posting here just so this thread includes the latest info from the GitHub issue.

@craig thank you! I will ask our customer support team about checking with RICOH360 App. Meanwhile Is it possible to get info.plist from this app? Just to compare the keys with our app.

That article doesn’t look like an official Apple Developer document. Additionally, it is 9+ years old.

I believe the objective was to find the official documentation.

The 9 year old non-Apple document that you posted does link to an official Apple Document, but that does not appear to list NSTemporaryExceptionAllowsInsecureHTTPLoads

Maybe the key is no longer in use?

@jcasman can you bring this up with your contacts at RICOH? I am hoping that since the RICOH360 app is under active development, that there might be a way to get more information about the security settings.

Hello @craig, do you have more information about the security settings ? I got same issue with SC2 and X cameras.

Thank you in advance

@Wyllis_Monteiro unfortunately, I don’t have any additional information. Suggest you post to the same issue on GitHub.

I’ll ask @jcasman to include it in the agenda he has to submit community feedback to his contact at RICOH.