Since 3 weeks, I’m not able to get camera info. Before it’s worked well. I got the following error
It appears on iPhone 12 pro but not on Android.
On network I’m connected like this
(“Pas de connexion à internet” means I’ve no access to internet)
My cameras are up-to-date, my code was not edited
I’m using Xamarin forms to create my app (hybrid c# framework to build app)
Anyone have an idea of what happened and why I got 404 whereas I’m connected to device. Thank you in advance.
craig
February 8, 2022, 10:04pm
2
You shouldn’t need headers on a GET, but I would try it if I were you.
Overview
[API (e.g. POST /osc/commands/execute)] HTTP/1.1
Host: [IP address]:[HTTP port]
Content-Type: application/json;charset=utf-8
Accept: application/json
Content-Length: [Content length]
{
...
Input to each API
...
}
Does it work from curl?
curl --request GET \
--url http://192.168.1.1/osc/info \
--header 'Content-Type: application/json;charset=utf8'
Other Ideas
press and hold the power button on the camera. What model is it?
force shutdown of background process. press and hold power and wifi
reset wifi to 2.4GHz. Press and hold Wi-Fi button
It’s possible you set the camera to 5GHz and your mobile app is trying at 2.4GHz or the camera is at 2.4GHz (maybe lost the settings) and your phone is at 5GHz.
Hello @craig and thank’s for your help, I tried to make request with curl and like android it’s working well.
I’m using ricoh theta Z1 and SC2, both occurs error.
Other ideas
“press and hold the power button on the camera” => it just turn on my camera as the following picture
“force shutdown of background process. press and hold power and wifi” => light of camera was blue when it was turning on and a few seconds later was turning off. Does I made the good manipulation ? (Before this step camera was turned off)
“reset wifi to 2.4GHz. Press and hold Wi-Fi button” => it just enabled bluetooth like this
How to be sure camera is set to 2.4GHz.
Thank’s a lot
craig
February 9, 2022, 3:51pm
4
Can you upgrade your firmware?
This is from your camera. The most recent firmware is 2.00.1 for the Z1. You are running 1.60.1.
https://support.theta360.com/en/download/firmware/z1/
Sometimes the RICOH THETA camera will get stuck. This may happen during development. If there is a stuck plug-in running inside the camera or a WebAPI command causes the camera to become unresponsive, you should first try a shutdown. Normal Shutdown...
Est. reading time: 1 minute
Can you connect to the camera with the official RICOH THETA mobile app as a baseline test?
If so, you can see the Wi-Fi GHz in the camera settings.
With an API, it is this:
Notice of website closure
For the Z1, you can reset using the Wi-Fi and Mode buttons. See video above.
Does your mobile app connection code work with other HTTP API testing sites such as:
https://jsonplaceholder.typicode.com/
https://picsum.photos/
Hi @craig ,
I upgraded firmware
I’ve followed your guide to Force Shutdown, Wi-Fi Reset, Settings Reset using insomnia like this
but I still have this issue on iOS devices.
On Ricoh app it’s working well, and in settings I found 2.4 GHz
I noticed when I build my app to iOS devices it’s working but after several use, or next day I got 404 error.
I can show you my code C# language, if you want, but nothing has changed
Do you have any others suggestions, thank’s a lot !
craig
February 10, 2022, 3:44pm
6
Can you download the free, official RICOH THETA app to the same phone and see if the official mobile app works?
Download | RICOH THETA
What version of iOS are you using?
On the iPhone XS and 12 pro, can you use a browser like Chrome or Safari (from the phone) and access http://192.168.1.1/osc/info (this is a GET)
I tried to use official Ricoh Theta mobile app, it work’s well.
I’m on iOS 15.2.1
When I’m using chrome I’m able to get info like this
What does that mean ?
craig
February 11, 2022, 3:32pm
8
Do you have additonal debugging information from your Xamarin Forms app? Can you test the Xamarin Forms GET with another http server that is http, not https. When you test it on a non-THETA HTTP make sure it is using the insecure http without the s on iOS.
opened 01:02PM - 19 Jan 21 UTC
closed 08:33AM - 09 Mar 21 UTC
t/bug
p/iOS 🍎
s/needs-repro ❔
s/needs-info ❓
s/unverified
### Description
When using Http client in a sample Xamarin.Forms project I am u… nable to make any kind of HTTP requests using HttpClient (NSUrlSession) on my iOS device (iPhone 11, iOS 14.3) to a web service running on my development computer. Both devices are connected to the same network. A web service is a ASP.NET Core Web API running NOT in IISExpress but via dotnet run, the launch settings for that service have been configured to use the ip of my computer on my local area network (192.168.1.74). I am developing an application in Xamarin.Forms that interacts with my web service. On android everything works just fine.
When accessing my API from a Chrome application on my iPhone I am able to reach endpoints and everything is ok. In my application however, when making a request to my computer which hosts my web service I get the following error followed by a crash of a Xamarin.Forms application.
An error occurred: 'Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x280be9d40 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <5D24636F-E5D0-496F-A8E6-EC0E78A1D8CF>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <5D24636F-E5D0-496F-A8E6-EC0E78A1D8CF>.<1>"
), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=http://192.168.1.74:1488/Auth/Register, NSErrorFailingURLKey=http://192.168.1.74:1488/Auth/Register, _kCFStreamErrorDomainKey=1}'. Callstack: ''
I've also enabled local area network access and allowed HTTP for my Xamarin.Forms application by adding the following lines in Info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
### Steps to Reproduce
1. Create a blank Mobile App (Xamarin.Forms) project
2. Create a blank ASP.NET Core Web API project
3. In launchSettings.json set applicationUrl to be your local area network ipv4 adddress (and choose a port)
3. dotnet run web api
4. Add the code to test HttpClient request to web api in your local area network in your mobile app
### Expected Behavior
I am able to use HttpClient on iOS to make requests to my development computer which hosts an ASP.NET Core web api. The computer is connected to the same network as my iOS device.
### Actual Behavior
I am unable to use HttpClient on iOS to make requests to my development computer which hosts an ASP.NET Core web api. The computer is connected to the same network as my iOS device. The problem is fully described in the 'Description' section.
### Basic Information
- Version with issue: 4.8.0.1451 (also present on 5.0.0.1874)
- Last known good version: don't know
- Platform Target Frameworks:
- iOS: Default (option selected in iOS project when going to Properties -> iOS Buid)
- NuGet Packages: none
- Affected Devices: iPhone 11
### Environment
<details><summary>Show/Hide Visual Studio info</summary>
Microsoft Visual Studio Community 2019
Version 16.8.4
VisualStudio.16.Release/16.8.4+30907.101
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Community
Visual C++ 2019 00435-60000-00000-AA742
Microsoft Visual C++ 2019
ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools
ASA Service Provider 1.0
ASP.NET and Web Tools 2019 16.8.557.25636
ASP.NET and Web Tools 2019
ASP.NET Core Razor Language Services 16.1.0.2052803+84e121f1403378489b842e1797df2f3f5a49ac3c
Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2012 16.8.557.25636
For additional information, visit https://www.asp.net/
ASP.NET Web Frameworks and Tools 2019 16.8.557.25636
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.8.557.25636
Azure App Service Tools v3.0.0
Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.
Azure Data Lake Tools for Visual Studio 2.6.1000.0
Microsoft Azure Data Lake Tools for Visual Studio
Azure Functions and Web Jobs Tools 16.8.557.25636
Azure Functions and Web Jobs Tools
Azure Stream Analytics Tools for Visual Studio 2.6.1000.0
Microsoft Azure Stream Analytics Tools for Visual Studio
C# Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Cookiecutter 16.8.20241.2
Provides tools for finding, instantiating and customizing templates in cookiecutter format.
Extensibility Message Bus 1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
Fabric.DiagnosticEvents 1.0
Fabric Diagnostic Events
GitHub.VisualStudio 2.11.102.28613
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft Azure HDInsight Azure Node 2.6.1000.0
HDInsight Node under Azure Node
Microsoft Azure Hive Query Language Service 2.6.1000.0
Language service for Hive query
Microsoft Azure Service Fabric Tools for Visual Studio 16.0
Microsoft Azure Service Fabric Tools for Visual Studio
Microsoft Azure Stream Analytics Language Service 2.6.1000.0
Language service for Azure Stream Analytics
Microsoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure Node
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30924.1
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager 2.1.113+g422d40002e.RR
Install client-side libraries easily to any web project
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards
Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio 16.8.43 (00471f8)
Support for debugging Mono processes with Visual Studio.
Node.js Tools 1.5.20902.1 Commit Hash:b474efcb6f92db52a8f8e2e6a8cb9648476885cc
Adds support for developing and debugging Node.js apps in Visual Studio
NuGet Package Manager 5.8.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Open Command Line 2.4.233
2.4.233
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Python 16.8.20241.2
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.
Python - Conda support 16.8.20241.2
Conda support for Python projects.
Python - Django support 16.8.20241.2
Provides templates and integration for the Django web framework.
Python - IronPython support 16.8.20241.2
Provides templates and integration for IronPython-based projects.
Python - Profiling support 16.8.20241.2
Profiling support for Python projects.
Qt Visual Studio Tools 2.6.0.7
The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools.
SQL Server Data Tools 16.0.62012.31170
Microsoft SQL Server Data Tools
Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
ToolWindowHostedEditor 1.0
Hosting json editor into a tool window
TypeScript Tools 16.0.21016.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 16.8.0-beta.20507.4+da6be68280c89131cdba2045525b80890401defd
Microsoft Visual F# Tools
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Container Tools Extensions 1.0
View, manage, and diagnose containers within Visual Studio.
Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
Visual Studio Tools for Kubernetes 1.0
Visual Studio Tools for Kubernetes
VisualStudio.DeviceLog 1.0
Information about my package
VisualStudio.Foo 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 16.8.000.261 (d16-8@bb99248)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.8.0.507 (remotes/origin/d16-8@e87b24884)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.8.112 (86385a3)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 11.1.0.26 (d16-8/a36ce73)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc
Xamarin.iOS and Xamarin.Mac SDK 14.8.0.3 (c51fabee8)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
</details>
Visual Studio Feedback
Are you using the NSUrlSession for the HttpClient Implementation?
HttpClient and SSL/TLS Implementation Selector for iOS/macOS - Xamarin | Microsoft Docs
Thank’s a lot I will try it this week end and go back. Have a nice week-end !
1 Like
craig
February 11, 2022, 7:57pm
10
For testing, disable network security on the iOS version of your app to isolate the problem. turn on debugging logs and see if there is any exception thrown when you try to connect to the camera.
Sorry for the late reply, I made additional tests
Do you have additonal debugging information from your Xamarin Forms app? Can you test the Xamarin Forms GET with another http server that is http, not https
I’ve no additionnal logs during launching app, I’ve not iphone with current error but I can access to logs using this . So when I get iPhone back, I will tell you.
When you test it on a non-THETA HTTP make sure it is using the insecure http without the s on iOS
I used http://192.168.1.1/osc/info
Are you using the NSUrlSession for the HttpClient Implementation?
For testing, disable network security on the iOS version of your app to isolate the problem
I also made a test with another iPhone 12 pro max which version is 15.2.1 and it work’s, but why on the first one it fails ?
Each time I build app on the iPhone 12 pro it worked during 1 or 2 days and after error appears
craig
February 17, 2022, 1:19pm
12
Wow, this is tough to isolate the problem. If you get the error logs, I can discuss with RICOH. I don’t have the same hardware to test and can’t replicate the problem. However, hopefully there is something useful in the logs.
Yes I agree, I will come back once I have logs
Hi @craig last week I found a solution instead of using HttpClient , I used WebRequest to make an API call.
I just used WebRequest for this endpoint GET http://192.168.1.1/osc/info
Thank you for your help
2 Likes
craig
March 7, 2022, 4:40pm
15
Thanks for posting the solution. In other languages, I’ve also noticed some differences between the HTTP client packages. I suspect that the SC2 and the Z1 have a slightly different behavior compared to a reference HTTP server. I’ve noticed significant differences between the SC2 and Z1 in how it handles open HTTP connections for camera.getLivePreview. How the internal camera server handles the headers and errors may differ.
Thanks again for posting the solution. I’m sure it will help other people.
Hi, We have been having a few customers also getting 404 error when connecting to Z1 and iPhone 14. Not all customers have this issue. Do we know why httpClient is not working for some?
@Winnie_Wen Are your customers end users or developers? Can you describe when they are getting an error? They are using the RICOH THETA mobile app on their iPhone 14 and it can’t connect to their Z1? Or have you built your own app? You say it’s a 404 page not found error?
craig
June 7, 2023, 6:41pm
18
Is the Z1 firmware updated to version 2.30.1?
Compare the behavior with the RICOH THETA official mobile app on iOS.
Can you replicate the error on iOS with Z1 firmware 2.30.1?
Yes, Z1 firmware is up to date. When I say customers meaning customers using our app that we build. In our app we make http request to osc/info. I see a 404 error.
It has no problem with Ricoh Theta official mobile app.
craig
June 7, 2023, 10:32pm
20
Can your application connect to insecure http (not https)? How did you configure the insecure http security exception?
on the iOS device, can you open up a browser (like chrome) with http://192.168.1.1/osc/info ?
Do you have any other error than the 404 if you apply a debugger to the app?
Make sure there is no typo and it is http:// (not https://)
Are you applying a header?
theta-api-specs/overview.md at main · ricohapi/theta-api-specs · GitHub
In particular, does your http request have this:
Content-Type: application/json;charset=utf-8
1 Like