Article - CS336280
Vuforia Experience Service returns http 406 status when handling large JSON payload
Modified: 26-Feb-2024
Applies To
- Vuforia Studio 8.5.5 to 9.17.0
- Vuforia Experience Service 8.5.15 to 9.17.0
- ThingWorx Platform 8.4 to 9.3
- For Vuforia Studio developers who are not aware of the presence of Vuforia Experience Service, this is a server side of application where stores Experiences published from Vuforia Studio; once it's published, the end users will be able to view the Augmented Reality Experience using Vuforia View
- See Help Center for more information
- Please contact responsible person or implementation partner to implement the workaround in the resolution
- Issue is relevant for HoloLens 2, IOS (verified on IOS IPad Pro 3 device) , Realwear device and Android platform.
Description
- Required to take a picture using the Camera Widget, then save the photo in a Repository in Thingworx
- To save the picture to dataBase use the SaveImage Service from the Repository Thing
- Can not save image captured via Camera Widget in Vuforia Studio to Thingworx Repository
- After binding Image Data Property of Camera Widget with content Property of SaveImage Service of File Repository Thing from ThingWorx, the base64-encoded string (text) fails to transfer with http 406 response
- ThingWorx itself executes correctly on SaveImage Service even with base64-encoded string, the JSON sample is as below:
{ "path":"/test/123.jpg", "content":<base64-encoded string> }
- Vuforia Experience Service log reported http 406 response error:
:ffff:<IP address> - - [date] "POST /Thingworx/Things/<thing name>/Services/<service name> HTTP/1.1" 406 - "http://localhost:3000/resource/<experience name>/dist/index-desktop.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36" 20008 ms <ES server>:<ES port> 90943 [date] - ms - ms - ms - ms
- Postman fails with http 406 status cod as well when using below URL with correct JSON body:
http://<ES host>:<ES port>/Thingworx/Things/<thing name>/Services/<service name>
- ThingWorx ApplicationLog.log contains message below:
YYYY-MM-DD HH:MM:SS.MS+0900 [L: ERROR] [O: c.t.w.Things] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-80-exec-5] Unable To Parse JSON Request YYYY-MM-DD HH:MM:SS.MS+0900 [L: ERROR] [O: c.t.w.BaseService] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-80-exec-5] Invalid request: Unable To Parse JSON Request YYYY-MM-DD HH:MM:SS.MS+0900 [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: ???] [S: ] [P: ] [T: http-nio-80-exec-5] Connection should be closed but message received anyway. Attempting to force close. Message: V1MessageHeader [messageType=3, requestId=92521, endpointId=0, sessionId=51083549, flags=0] YYYY-MM-DD HH:MM:SS.MS+0900 [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: ???] [S: ] [P: ] [T: http-nio-80-exec-5] Server WebSocket closed unexpectedly and has already been unregistered from Server Endpoint [ws session id: 6] null
- We are able to send and receive data to/from ThingWorx but it fails when we try to send a picture to ThingWorx from Vuforia View
This is a printer-friendly version of Article 336280 and may be out of date. For the latest version click CS336280