cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA SAP 03 XSA : "DeprecationWarning: Calling an asynchronous function without callback .."

draschke
Active Contributor

Hi,

we have the issue, that if we start the web app, we obtain a lot of this err messages (approx. 400 errors):

[APP/5-0] ERR (node:36531) [DEP0013] : Calling an asynchronous function without callback is deprecated.

This issue came with SPS03.

Yes, we are working with node.js and I'm aware of this issue itself, but I assume that it has nothing to do with our endpoints. (To get sure, I was commenting out this whole endpoints).

Any help would be great!

BR, Dirk

former_member540015
Participant
0 Kudos

Hi Dirk!

Well, my infrastructure is on 2.00.033.00.1535711040 now, and I regret to say that the issue still boring.

My "@sap/approuter" set to "5.3.0", as recommended by thomas.jung. So, devs didn't fix a bug in the latest release.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member

Dear Christoph,

facing the same problem: Setting node command line options in the package.json file of the web application results in an error when starting the application.

Any idea?

Best,

Philipp

draschke
Active Contributor

Hi,

is there someone and can tell me, what's wrong with start cmd?

"start": "node --trace-deprecation node_modules/@sap/approuter/approuter.js"

{"name": "web-approuter","engines": {"node": ">=4.0.0 <9.0.0"},"dependencies": {"@sap/approuter": "5.0.0"},"scripts": {"start": "node --trace-deprecation node_modules/@sap/approuter/approuter.js"}}

"Could not invoke application '-xxx-web'. Check application logs for more details."

Thanks!

HPSeitz
Active Participant
0 Kudos

Hi Dirk, Hi XSA enthusiasts

in HANA Express Edition SPS03 (rev 30) the generated approuter dependency in package.json for e.g. a SAPUI5 HTML5 Module is

	"dependencies": {
		"@sap/approuter": "5.0.0"

after update this to newer version of approuter (with Thomas Jungs Hint) the depreacation warning is gone:

	"dependencies": {
		"@sap/approuter": "5.3.0"

BR, have fun, HP

draschke
Active Contributor
0 Kudos

Hi HP,

tried it on an on-premise system SPS03 (rev 40). Still the same! (It comes only with the second start of the web module....)

BR, Dirk



former_member540015
Participant
0 Kudos

Same for me here up to 2.00.031 HANA version.

approuter": "5.3.0" fixes the issue for the first time, but second start of the web module and the Deprecation warning is here again. No solution found so far.

draschke
Active Contributor
0 Kudos

Hi Valery, I guess that SP03 Patch7 for SAP WEB IDE 2 will "solve" this behaviour. I didn't try it at this moment.

"NodeJS Tools: Fixed an issues that caused warninig to be marked as errors"

christoph_pohl
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dirk,

this message comes directly from node.js

XSA has switched the default node runtime from 6.x to 8.x with HANA 2 SPS03. This means you may now get additional warnings that you have not seen before. You can use "node --trace-deprecation yourapp.js" to better find the problems in your code.

See also https://stackoverflow.com/questions/41195580/deprecationwarning-calling-an-asynchronous-function-wit...


Best,

Christoph

draschke
Active Contributor
0 Kudos

Hi Christoph,

cool, this is exactly what I was looking for: "node --trace-deprecation yourapp.js"

Thank you very much!

BR, Dirk

draschke
Active Contributor
0 Kudos

Hi Christoph,

sorry, need some more help. Thought I could run this trace by using the xs client, like xs node --trace-deprecation yourapp.js. But this seems to be not the right way...

Please, could you give me some more advice.

Thanks a lot!


thomas_jung
Developer Advocate
Developer Advocate

This is the approuter itself throwing these deprecation warnings? What version of the app router are specifying in your package.json within the web folder? For example the package.json on project that I've updated to SPS 03 and doesn't throw these deprecation warnings can be found here:

https://github.com/SAP/com.sap.openSAP.hana5.example/blob/hana2_sps03/web/package.json

draschke
Active Contributor
0 Kudos

Hi Thomas,

thanks for your reply. At this moment I don't know where this error messages come from. I don't see any missing callbacks in our coding, but it's a lot and maybe I have overseen it.

We are using this approuter. (I will change it as in your sample to "node": " ^8 ")

{"name": "web-approuter","engines": {"node": ">=4.0.0 <9.0.0"},"dependencies": {"@sap/approuter": "5.0.0"},"scripts": {"start": "node node_modules/@sap/approuter/approuter.js"}}

Now I would like to know how we can start the trace command --trace-deprecation, to get more informations.

"start": "node --trace-deprecation node_modules/@sap/approuter/approuter.js"

But if I try it on this way the app doesn't start and runs in this error

"Could not invoke application '-xxx-web'. Check application logs for more details." (couldn't find this logs)

Thanks for your help!

draschke
Active Contributor
0 Kudos

Hi,

after a long investigation I'm sure that this message is not caused by our app!

To make sure, I was taking the sap template:

js-modul (node.js without xsjs)

web - "SAPUI5 HTML5 Module"

It's quite easy to reproduce. This messages comes always after executing the web app a second time.

Furthermore, I can see that this issue comes always between "POST /.../softReset and "GET /webapp/index.html HTTP/1.1" 200 sent 823

And I can see a difference between the amount of warning messages. For this template there are only eight warning messages while in our app there are thrown more than 400 messages. And now I would really like to be interested to know where this comes from!

6/7/18 10:02:20.000 AM [RTR] OUT   IP - - to host "POST /9ca4cf2f-cf9b-4ba4-af25-3b239cca0894/softReset HTTP/1.1" 200 sent 45 in 14 by 029-a0d60c0a-d072-40e7-996e-215326827d71
6/7/18 10:02:20.355 AM [APP/8-0] ERR    (node:60720) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
6/7/18 10:02:20.355 AM [APP/8-0] ERR    (node:60720) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
6/7/18 10:02:20.356 AM [APP/8-0] ERR    (node:60720) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
6/7/18 10:02:20.358 AM [APP/8-0] ERR    (node:60720) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
6/7/18 10:02:20.358 AM [APP/8-0] ERR    (node:60720) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
6/7/18 10:02:20.359 AM [APP/8-0] ERR    (node:60720) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
6/7/18 10:02:20.360 AM [APP/8-0] ERR    (node:60720) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
6/7/18 10:02:20.361 AM [APP/8-0] ERR    (node:60720) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
6/7/18 10:02:21.000 AM [RTR] OUT    IP - - to host "GET /webapp/index.html HTTP/1.1" 200 sent 823 in 5 by 029-a0d60c0a-d072-40e7-996e-
<br>
mta id                                            version
---------------------------------------------------------
com.sap.fileprocessor.XSAC_FILEPROCESSOR          1.0.22
XSAC_PORTAL_SERV                                  1.13.0
com.sap.xs.jobscheduler                           1.6.5
com.sap.xsac_alm_pi_ui                            1.12.5
com.sap.core.account                              1.1.7
com.sap.dwf.runtime                               2.3.1
com.sap.xsa.hrtt                                  2.5.52
alm-product-installer                             1.13.10
com.sap.hana.eadesigner                           1.4.0
com.sap.xsa.admin                                 1.6.3
com.sap.ui5.dist.sapui5-dist-xsa.XSAC_UI5_FESV4   1.52.9
com.sap.ui5.dist.sapui5-dist-xsa.XSAC_UI5_FESV3   1.44.34
com.sap.devx.webide                               4.3.25
com.sap.xs.auditlog.ui                            1.0.0
com.sap.dwf.tools                                 2.3.1
com.sap.xs.messaging-service.xsac.mess.srv        1.3.2
com.sap.xs.xmla                                   1.0.9
com.sap.ui5.dist.sapui5-sb-xsa.XSAC_UI5_SB        1.0.1
<br>