on 05-12-2016 12:12 PM
Hi,
we tried to move our SAPUI5 Master-Detail App to xs advanced.
We are on SPS11, Rev. 112
If we try to start the app, we get this ODATA problem:
Error: Unsupported content type: multipart/mixed;boundary=batch
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Any help would be great.
I've also hit the same issue when testing the an App, however I got some useful tips from Thomas Jung which worked for me.
Try deploying the application similar to the steps in '2.1.4 Deploy the "Tiny World" Application' in the XSA Dev guide.
It's a bit painful, but might get you past this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aron,
good to know, thanks for this hint!
Today we try to patch our XSA on the current version (June'16). Afterwards I'll check for it on the regulary way.
But if this doesn't work I'll try your proposal.
BR
Dirk
I found out that with the new patch for SPS12 only the runtime version (v1.0.28) has changed, but I think this will not solve this problem.
That's why I'll try your way first and give feedback if it worked for us.
So, now the same issue with SPS12.
I would like to know, could this (Unsupported content type) error caused, because we have an XSRF-Token error before?
Application is starting
Application is running
6/3/16 2:11:25.000 PM [APP/24714-0] TRC /node_modules/approuter/lib/middleware/xsrf-token-middleware.js:14 [iozt72vz] ERROR: Failed to get new xsrf token [Error: No session established. Failed to store token in session]
6/3/16 2:11:25.156 PM [APP/24714-0] LOG #2.0#2016 06 03 16:11:25:156#+02:00#ERROR#/XSRF-Handler###############iozt72vz#PLAIN##Failed to get new xsrf token [Error: No session established. Failed to store token in session]#
6/3/16 2:11:25.210 PM [APP/24714-0] ERR Error: Unsupported content type: multipart/mixed;boundary=batch_a5a7-be1b-8fb7
6/3/16 2:11:25.210 PM [APP/24714-0] ERR at Busboy.parseHeaders (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/multer/node_modules/busboy/lib/main.js:68:9)
6/3/16 2:11:25.210 PM [APP/24714-0] ERR at new Busboy (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/multer/node_modules/busboy/lib/main.js:21:10)
6/3/16 2:11:25.210 PM [APP/24714-0] ERR at multerMiddleware (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/multer/lib/make-middleware.js:32:16)
6/3/16 2:11:25.210 PM [APP/24714-0] ERR at Layer.handle [as handle_request] (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/layer.js:95:5)
6/3/16 2:11:25.210 PM [APP/24714-0] ERR at trim_prefix (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/index.js:312:13)
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at /HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/index.js:280:7
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at Function.process_params (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/index.js:330:12)
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at next (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/index.js:271:10)
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at /HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/utils/fileStorage.js:43:13
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at Layer.handle [as handle_request] (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/layer.js:95:5)
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at trim_prefix (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/index.js:312:13)
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at /HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/index.js:280:7
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at Function.process_params (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/index.js:330:12)
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at next (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/index.js:271:10)
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at logger (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/morgan/index.js:136:5)
6/3/16 2:11:25.211 PM [APP/24714-0] ERR at Layer.handle [as handle_request] (/HANA/usr_sap/DUMMYHOST/xs/ea_data/DUMMYHOST/executionroot/f70e308a-b047-4752-b058-dbb75c18ac76/app/appcontroller.TrmOttoSxE/AppController/node_modules/express/lib/router/layer.js:95:5)
Application:https://DUMMYHOST:51031Logs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eckart,
we are on SPS12, is it a patch which is still not released?
Or should this error solved with our npm's
"dependencies": { | ||
"express": "4.12.3", | ||
"sap-xssec": ">=0.5.4", | ||
"passport": ">=0.2.1", | ||
"sap-hdbext": ">=2.0.4", | ||
"sap-xsenv": ">=1.2.2", | ||
"sap-xsjs": ">=1.6.4" | ||
}, | ||
"description": "", | ||
"devDependencies": { | ||
"sap-xsjs-test": ">=1.0.7", | ||
"compression": "1.6.0" | ||
}, |
BR,
Dirk
I should mention that it happens only with the Post request.
The Get Request works fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the greets!
Regarding structure, I think you should have the xsodata file in a node.js module and the UI in a HTML5 module - Is this the structure of your application?
Can you please describe the folder layout of the app?
Also, can you please send the full error message which you receive?
Thanks,
Omer.
"Regarding structure, I think you should have the xsodata file in a node.js module and the UI in a HTML5 module - Is this the structure of your application?"
-->yes, its exactly the same structure, as you said. The xsodata file is within the lib folder.
If I check only the xsodata-service with a get request, that works fine.
Can you please describe the folder layout of the app?
Is that what you want?
Also, can you please send the full error message which you receive?
-->Will do it, but at this moment I get an other error. Will fix it and send you the whole exception message.
OK, so the next immediate suspects are the xs-app.json file and the dependencies of the js and ui modules:
For the xs-app.json, do you have there a route which uses the xsodata such as:
{ | |
"welcomeFile": "index.html", | |
"authenticationMethod": "none", | |
"routes": [{ | |
"source": "^/euro.xsodata/.*$", | |
"destination": "tinyjs_be" | |
}, { | |
"source": ".*\\.xsjs", | |
"destination": "tinyjs_be" | |
}] | |
} |
Regarding dependencies, can you please attach the package.json files of both the js and ui modules?
Regards,
Omer.
xs-app.json
{
"welcomeFile": "index.html",
"authenticationMethod": "route",
"routes": [{
"source": "(.*)(.xsodata)",
"csrfProtection": false,
"destination": "nodejs_destination",
"authenticationType": "xsuaa"
},{
"source": "(.*)(.xsjs)",
"csrfProtection": false,
"destination": "nodejs_destination",
"authenticationType": "xsuaa"
},
{
"source": "^/(.*)$",
"csrfProtection": false,
"destination": "nodejs_destination",
"authenticationType": "xsuaa"
}]
}
mta.yaml
# Don't use Tab Key
# You need to use space key
# Check with online validator for right syntax
_schema-version: 2.0.0
ID: TestTBASE
version: 0.0.1
modules:
- name: web
type: html5
path: web
# -- requires js service URL
requires:
- name: tbase-uaa
- name: nodejs_api # name of the 'provides' element in the node.js module
group: destinations # name of a target environment variable
properties: # key values in json format in the 'destinations' variabl
name: nodejs_destination
url: ~{service_url}
forwardAuthToken: true
- name: db
type: hdb
path: db
requires:
- name: hdi-container
- name: js
type: nodejs
path: js
requires:
- name: tbase-uaa # dependency on the UAA service
- name: db
- name: hdi-container
provides:
- name: nodejs_api
properties:
service_url: ${default-url}
resources:
- name: hdi-container
type: com.sap.xs.hdi-container
- name: tbase-uaa
type: com.sap.xs.uaa
# parameters:
# config_path: ./xs-security.json
package.json from nodejs folder
{
"name": "js",
"description": "",
"version": "1.0.0",
"main": "server.js",
"scripts": {
"start": "node server.js",
"stop": ""
},
"files": [],
"dependencies": {
"sap-xsenv": "1.2.1",
"sap-xsjs": "1.4.0",
"express": "4.12.3",
"sap-hdbext": "1.1.2",
"sap-xssec": "0.5.3",
"passport": "0.2.1",
"async": "latest",
"sap-textbundle": "latest",
"accept-language": "latest"
},
"devDependencies": {
"sap-xsjs-test": "1.0.3",
"express": "4.12.3",
"compression": "1.6.0"
}
}
It would be help, if somebody could check, if it works.
Moving one simple MasterDetail App to XSA and try to start it. (within a simple odata-service on the master-side)
I would suppose that you would get the same error."Error: Unsupported content type: multipart/mixed;boundary=batch"
Master-Detail Template
Thanks!
xsodata does'nt throw "Error: Unsupported content type: multipart/mixed;boundary=batch".
The xsodata library directly supports valid OData batch requests. E.g. like
Header: Content-Type: multipart/mixed; boundary=batch_12345
Body:
--batch_12345
Content-Type: multipart/mixed; boundary=changeset_12345_A
--changeset_12345_A
Content-Type: application/http
Content-Transfer-Encoding: binary
POST /key_int_char_modify HTTP/1.1
....
So i suppose there error is thrown in a layer above the odata library.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.